[Pkg-drupal-commits] r2231 - in /branches/drupal7: ./ debian/ includes/ includes/database/ includes/database/mysql/ includes/database/pgsql/ includes/database/sqlite/ misc/ modules/aggregator/ modules/aggregator/tests/ modules/block/ modules/block/tests/ modules/blog/ modules/book/ modules/color/ modules/comment/ modules/contact/ modules/contextual/ modules/dashboard/ modules/dblog/ modules/field/ modules/field/modules/field_sql_storage/ modules/field/modules/list/ modules/field/modules/list/tests/ modules/field/modules/number/ modules/field/modules/options/ modules/field/modules/text/ modules/field/tests/ modules/field_ui/ modules/file/ modules/file/tests/ modules/filter/ modules/forum/ modules/help/ modules/image/ modules/image/tests/ modules/locale/ modules/locale/tests/ modules/menu/ modules/node/ modules/node/tests/ modules/openid/ modules/openid/tests/ modules/overlay/ modules/overlay/images/ modules/path/ modules/php/ modules/poll/ modules/profile/ modules/rdf/ modules/rdf/tests/ modules/search/ modules/search/tests/ modules/shortcut/ modules/simpletest/ modules/simpletest/tests/ modules/simpletest/tests/drupal_system_listing_compatible_test/ modules/simpletest/tests/drupal_system_listing_incompatible_test/ modules/simpletest/tests/upgrade/ modules/statistics/ modules/syslog/ modules/system/ modules/taxonomy/ modules/toolbar/ modules/tracker/ modules/translation/ modules/translation/tests/ modules/trigger/ modules/trigger/tests/ modules/update/ modules/update/tests/ modules/user/ modules/user/tests/ profiles/minimal/ profiles/standard/ profiles/testing/ profiles/testing/modules/drupal_system_listing_compatible_test/ profiles/testing/modules/drupal_system_listing_incompatible_test/ themes/bartik/ themes/bartik/css/ themes/garland/ themes/seven/ themes/seven/images/ themes/stark/ themes/tests/test_theme/ themes/tests/update_test_basetheme/ themes/tests/update_test_subtheme/
luigi at users.alioth.debian.org
luigi at users.alioth.debian.org
Sun Sep 4 19:26:13 UTC 2011
Author: luigi
Date: Sun Sep 4 19:26:12 2011
New Revision: 2231
URL: http://svn.debian.org/wsvn/pkg-drupal/?sc=1&rev=2231
Log:
New upstream release (Closes: #640078)
Added:
branches/drupal7/modules/overlay/images/close-rtl.png
- copied unchanged from r2230, branches/upstream/current-7/modules/overlay/images/close-rtl.png
branches/drupal7/modules/overlay/overlay-child-rtl.css
- copied unchanged from r2230, branches/upstream/current-7/modules/overlay/overlay-child-rtl.css
branches/drupal7/modules/simpletest/tests/common_test_cron_helper.info
- copied unchanged from r2230, branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info
branches/drupal7/modules/simpletest/tests/common_test_cron_helper.module
- copied unchanged from r2230, branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.module
branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.translatable.database.php
- copied unchanged from r2230, branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.translatable.database.php
branches/drupal7/modules/simpletest/tests/upgrade/upgrade.translatable.test
- copied unchanged from r2230, branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.translatable.test
branches/drupal7/themes/seven/ie7.css
- copied unchanged from r2230, branches/upstream/current-7/themes/seven/ie7.css
branches/drupal7/themes/seven/images/list-item-rtl.png
- copied unchanged from r2230, branches/upstream/current-7/themes/seven/images/list-item-rtl.png
branches/drupal7/themes/seven/images/task-item-rtl.png
- copied unchanged from r2230, branches/upstream/current-7/themes/seven/images/task-item-rtl.png
Modified:
branches/drupal7/CHANGELOG.txt
branches/drupal7/MAINTAINERS.txt
branches/drupal7/debian/changelog
branches/drupal7/includes/bootstrap.inc
branches/drupal7/includes/common.inc
branches/drupal7/includes/database/database.inc
branches/drupal7/includes/database/mysql/database.inc
branches/drupal7/includes/database/pgsql/database.inc
branches/drupal7/includes/database/query.inc
branches/drupal7/includes/database/schema.inc
branches/drupal7/includes/database/select.inc
branches/drupal7/includes/database/sqlite/schema.inc
branches/drupal7/includes/entity.inc
branches/drupal7/includes/file.inc
branches/drupal7/includes/file.mimetypes.inc
branches/drupal7/includes/form.inc
branches/drupal7/includes/lock.inc
branches/drupal7/includes/menu.inc
branches/drupal7/includes/pager.inc
branches/drupal7/includes/stream_wrappers.inc
branches/drupal7/includes/theme.inc
branches/drupal7/includes/update.inc
branches/drupal7/misc/tabledrag.js
branches/drupal7/modules/aggregator/aggregator.info
branches/drupal7/modules/aggregator/aggregator.module
branches/drupal7/modules/aggregator/tests/aggregator_test.info
branches/drupal7/modules/block/block.info
branches/drupal7/modules/block/block.install
branches/drupal7/modules/block/block.module
branches/drupal7/modules/block/block.test
branches/drupal7/modules/block/tests/block_test.info
branches/drupal7/modules/blog/blog.info
branches/drupal7/modules/book/book.info
branches/drupal7/modules/color/color.info
branches/drupal7/modules/color/color.module
branches/drupal7/modules/comment/comment.info
branches/drupal7/modules/comment/comment.install
branches/drupal7/modules/contact/contact.info
branches/drupal7/modules/contact/contact.install
branches/drupal7/modules/contextual/contextual.info
branches/drupal7/modules/dashboard/dashboard.info
branches/drupal7/modules/dblog/dblog.info
branches/drupal7/modules/field/field.api.php
branches/drupal7/modules/field/field.default.inc
branches/drupal7/modules/field/field.form.inc
branches/drupal7/modules/field/field.info
branches/drupal7/modules/field/field.module
branches/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info
branches/drupal7/modules/field/modules/list/list.info
branches/drupal7/modules/field/modules/list/tests/list_test.info
branches/drupal7/modules/field/modules/number/number.info
branches/drupal7/modules/field/modules/number/number.module
branches/drupal7/modules/field/modules/options/options.info
branches/drupal7/modules/field/modules/text/text.info
branches/drupal7/modules/field/modules/text/text.install
branches/drupal7/modules/field/modules/text/text.module
branches/drupal7/modules/field/tests/field.test
branches/drupal7/modules/field/tests/field_test.info
branches/drupal7/modules/field_ui/field_ui.admin.inc
branches/drupal7/modules/field_ui/field_ui.api.php
branches/drupal7/modules/field_ui/field_ui.info
branches/drupal7/modules/file/file.info
branches/drupal7/modules/file/tests/file.test
branches/drupal7/modules/file/tests/file_module_test.info
branches/drupal7/modules/filter/filter.info
branches/drupal7/modules/filter/filter.install
branches/drupal7/modules/filter/filter.module
branches/drupal7/modules/forum/forum-list.tpl.php
branches/drupal7/modules/forum/forum-rtl.css
branches/drupal7/modules/forum/forum.css
branches/drupal7/modules/forum/forum.info
branches/drupal7/modules/forum/forum.install
branches/drupal7/modules/forum/forum.module
branches/drupal7/modules/forum/forum.test
branches/drupal7/modules/help/help.info
branches/drupal7/modules/image/image.field.inc
branches/drupal7/modules/image/image.info
branches/drupal7/modules/image/tests/image_module_test.info
branches/drupal7/modules/locale/locale.info
branches/drupal7/modules/locale/tests/locale_test.info
branches/drupal7/modules/menu/menu.info
branches/drupal7/modules/menu/menu.install
branches/drupal7/modules/node/node.info
branches/drupal7/modules/node/node.install
branches/drupal7/modules/node/node.module
branches/drupal7/modules/node/node.pages.inc
branches/drupal7/modules/node/tests/node_access_test.info
branches/drupal7/modules/node/tests/node_test.info
branches/drupal7/modules/node/tests/node_test_exception.info
branches/drupal7/modules/openid/openid.info
branches/drupal7/modules/openid/tests/openid_test.info
branches/drupal7/modules/overlay/overlay-child.css
branches/drupal7/modules/overlay/overlay-parent.js
branches/drupal7/modules/overlay/overlay.info
branches/drupal7/modules/overlay/overlay.module
branches/drupal7/modules/path/path.info
branches/drupal7/modules/php/php.info
branches/drupal7/modules/poll/poll.info
branches/drupal7/modules/poll/poll.module
branches/drupal7/modules/poll/poll.test
branches/drupal7/modules/profile/profile.info
branches/drupal7/modules/rdf/rdf.info
branches/drupal7/modules/rdf/tests/rdf_test.info
branches/drupal7/modules/search/search.info
branches/drupal7/modules/search/search.test
branches/drupal7/modules/search/tests/search_embedded_form.info
branches/drupal7/modules/search/tests/search_extra_type.info
branches/drupal7/modules/shortcut/shortcut-rtl.css
branches/drupal7/modules/shortcut/shortcut.info
branches/drupal7/modules/shortcut/shortcut.module
branches/drupal7/modules/shortcut/shortcut.test
branches/drupal7/modules/simpletest/drupal_web_test_case.php
branches/drupal7/modules/simpletest/simpletest.info
branches/drupal7/modules/simpletest/tests/actions_loop_test.info
branches/drupal7/modules/simpletest/tests/ajax_forms_test.info
branches/drupal7/modules/simpletest/tests/ajax_test.info
branches/drupal7/modules/simpletest/tests/batch_test.info
branches/drupal7/modules/simpletest/tests/cache.test
branches/drupal7/modules/simpletest/tests/common_test.info
branches/drupal7/modules/simpletest/tests/common_test.module
branches/drupal7/modules/simpletest/tests/database_test.info
branches/drupal7/modules/simpletest/tests/database_test.test
branches/drupal7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
branches/drupal7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
branches/drupal7/modules/simpletest/tests/entity_cache_test.info
branches/drupal7/modules/simpletest/tests/entity_cache_test_dependency.info
branches/drupal7/modules/simpletest/tests/entity_crud_hook_test.info
branches/drupal7/modules/simpletest/tests/error_test.info
branches/drupal7/modules/simpletest/tests/file.test
branches/drupal7/modules/simpletest/tests/file_test.info
branches/drupal7/modules/simpletest/tests/filter_test.info
branches/drupal7/modules/simpletest/tests/form_test.info
branches/drupal7/modules/simpletest/tests/image_test.info
branches/drupal7/modules/simpletest/tests/menu_test.info
branches/drupal7/modules/simpletest/tests/module_test.info
branches/drupal7/modules/simpletest/tests/requirements1_test.info
branches/drupal7/modules/simpletest/tests/requirements2_test.info
branches/drupal7/modules/simpletest/tests/session_test.info
branches/drupal7/modules/simpletest/tests/system_dependencies_test.info
branches/drupal7/modules/simpletest/tests/system_test.info
branches/drupal7/modules/simpletest/tests/taxonomy_test.info
branches/drupal7/modules/simpletest/tests/theme_test.info
branches/drupal7/modules/simpletest/tests/update_test_1.info
branches/drupal7/modules/simpletest/tests/update_test_2.info
branches/drupal7/modules/simpletest/tests/update_test_3.info
branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
branches/drupal7/modules/simpletest/tests/upgrade/upgrade.menu.test
branches/drupal7/modules/simpletest/tests/upgrade/upgrade.test
branches/drupal7/modules/simpletest/tests/url_alter_test.info
branches/drupal7/modules/simpletest/tests/xmlrpc_test.info
branches/drupal7/modules/statistics/statistics.info
branches/drupal7/modules/statistics/statistics.module
branches/drupal7/modules/syslog/syslog.info
branches/drupal7/modules/system/system.admin.inc
branches/drupal7/modules/system/system.api.php
branches/drupal7/modules/system/system.info
branches/drupal7/modules/system/system.install
branches/drupal7/modules/system/system.module
branches/drupal7/modules/system/system.test
branches/drupal7/modules/system/system.tokens.inc
branches/drupal7/modules/taxonomy/taxonomy-term.tpl.php
branches/drupal7/modules/taxonomy/taxonomy.info
branches/drupal7/modules/taxonomy/taxonomy.install
branches/drupal7/modules/taxonomy/taxonomy.module
branches/drupal7/modules/taxonomy/taxonomy.test
branches/drupal7/modules/toolbar/toolbar.info
branches/drupal7/modules/tracker/tracker.info
branches/drupal7/modules/translation/tests/translation_test.info
branches/drupal7/modules/translation/translation.info
branches/drupal7/modules/trigger/tests/trigger_test.info
branches/drupal7/modules/trigger/trigger.info
branches/drupal7/modules/update/tests/aaa_update_test.info
branches/drupal7/modules/update/tests/bbb_update_test.info
branches/drupal7/modules/update/tests/ccc_update_test.info
branches/drupal7/modules/update/tests/update_test.info
branches/drupal7/modules/update/update.info
branches/drupal7/modules/update/update.test
branches/drupal7/modules/user/tests/user_form_test.info
branches/drupal7/modules/user/user.admin.inc
branches/drupal7/modules/user/user.info
branches/drupal7/modules/user/user.install
branches/drupal7/profiles/minimal/minimal.info
branches/drupal7/profiles/standard/standard.info
branches/drupal7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
branches/drupal7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
branches/drupal7/profiles/testing/testing.info
branches/drupal7/robots.txt
branches/drupal7/themes/bartik/bartik.info
branches/drupal7/themes/bartik/css/style.css
branches/drupal7/themes/garland/garland.info
branches/drupal7/themes/seven/page.tpl.php
branches/drupal7/themes/seven/seven.info
branches/drupal7/themes/seven/style-rtl.css
branches/drupal7/themes/seven/style.css
branches/drupal7/themes/seven/template.php
branches/drupal7/themes/stark/stark.info
branches/drupal7/themes/tests/test_theme/test_theme.info
branches/drupal7/themes/tests/update_test_basetheme/update_test_basetheme.info
branches/drupal7/themes/tests/update_test_subtheme/update_test_subtheme.info
Modified: branches/drupal7/CHANGELOG.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/CHANGELOG.txt?rev=2231&op=diff
==============================================================================
--- branches/drupal7/CHANGELOG.txt (original)
+++ branches/drupal7/CHANGELOG.txt Sun Sep 4 19:26:12 2011
@@ -1,3 +1,45 @@
+
+Drupal 7.8, 2011-08-31
+----------------------
+- Fixed critical upgrade path issue with multilingual sites, leading to lost
+ content.
+- Numerous fixes to upgrade path, preventing fatal errors due to incorrect
+ dependencies.
+- Fixed issue with saving files on hosts with open_basedir restrictions.
+- Fixed Update manger error when used with Overlay.
+- Fixed RTL support in Seven administration theme and Overlay.
+- Fixes to nested transaction support.
+- Introduced performance pattern to reduce Drupal core's RAM usage.
+- Added support for HTML 5 tags to filter_xss_admin().
+- Added exception handling to cron.
+- Added new hook hook_field_widget_form_alter() for contribtued modules.
+- element_validate_*() functions now available to contrib.
+- Added new maintainers for several subsystems.
+- Numerous testing system improvements.
+- Numerous markup and CSS fixes.
+- Numerous poll module fixes.
+- Numerous notice/warning fixes.
+- Numerous documentation fixes.
+- Numerous token fixes.
+
+Drupal 7.7, 2011-07-27
+----------------------
+- Fixed VERSION string.
+
+Drupal 7.6, 2011-07-27
+----------------------
+- Fixed support for remote streamwrappers.
+- AJAX now binds to 'click' instead of 'mousedown'.
+- 'Translatable' flag on fields created in UI now defaults to FALSE, to match those created via the API.
+- Performance enhancement to permissions page on large numbers of permissions.
+- More secure password generation.
+- Fix for temporary directory on Windows servers.
+- run-tests.sh now uses proc_open() instead of pcntl_fork() for better Windows support.
+- Numerous upgrade path fixes.
+- Numerous documentation fixes.
+- Numerous notice fixes.
+- Numerous fixes to improve PHP 5.4 support.
+- Numerous RTL improvements.
Drupal 7.5, 2011-07-27
----------------------
Modified: branches/drupal7/MAINTAINERS.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/MAINTAINERS.txt?rev=2231&op=diff
==============================================================================
--- branches/drupal7/MAINTAINERS.txt (original)
+++ branches/drupal7/MAINTAINERS.txt Sun Sep 4 19:26:12 2011
@@ -54,7 +54,7 @@
- Károly Négyesi 'chx' <http://drupal.org/user/9446>
Database update system
-- ?
+- Károly Négyesi 'chx' <http://drupal.org/user/9446>
Entity system
- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
@@ -190,7 +190,7 @@
- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
Forum module
-- ?
+- Lee Rowlands 'larowlan' <http://drupal.org/user/395439>
Help module
- ?
@@ -237,6 +237,7 @@
Shortcut module
- David Rothstein 'David_Rothstein' <http://drupal.org/user/124982>
+- Kristof De Jaeger 'swentel' <http://drupal.org/user/107403>
Simpletest module
- Jimmy Berry 'boombatower' <http://drupal.org/user/214218>
Modified: branches/drupal7/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/debian/changelog?rev=2231&op=diff
==============================================================================
--- branches/drupal7/debian/changelog (original)
+++ branches/drupal7/debian/changelog Sun Sep 4 19:26:12 2011
@@ -1,3 +1,9 @@
+drupal7 (7.8-1) UNRELEASED; urgency=low
+
+ * New upstream release (Closes: #640078)
+
+ -- Luigi Gangitano <luigi at debian.openconsulting.it> Sun, 04 Sep 2011 21:22:24 +0200
+
drupal7 (7.6-1) unstable; urgency=high
[ Luigi Gangitano ]
Modified: branches/drupal7/includes/bootstrap.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/bootstrap.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/bootstrap.inc (original)
+++ branches/drupal7/includes/bootstrap.inc Sun Sep 4 19:26:12 2011
@@ -8,7 +8,7 @@
/**
* The current system version.
*/
-define('VERSION', '7.5');
+define('VERSION', '7.8');
/**
* Core API compatibility.
@@ -224,6 +224,195 @@
* @see http://php.net/manual/en/language.functions.php
*/
define('DRUPAL_PHP_FUNCTION_PATTERN', '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*');
+
+/**
+ * Provides a caching wrapper to be used in place of large array structures.
+ *
+ * This class should be extended by systems that need to cache large amounts
+ * of data and have it represented as an array to calling functions. These
+ * arrays can become very large, so ArrayAccess is used to allow different
+ * strategies to be used for caching internally (lazy loading, building caches
+ * over time etc.). This can dramatically reduce the amount of data that needs
+ * to be loaded from cache backends on each request, and memory usage from
+ * static caches of that same data.
+ *
+ * Note that array_* functions do not work with ArrayAccess. Systems using
+ * DrupalCacheArray should use this only internally. If providing API functions
+ * that return the full array, this can be cached separately or returned
+ * directly. However since DrupalCacheArray holds partial content by design, it
+ * should be a normal PHP array or otherwise contain the full structure.
+ *
+ * Note also that due to limitations in PHP prior to 5.3.4, it is impossible to
+ * write directly to the contents of nested arrays contained in this object.
+ * Only writes to the top-level array elements are possible. So if you
+ * previously had set $object['foo'] = array(1, 2, 'bar' => 'baz'), but later
+ * want to change the value of 'bar' from 'baz' to 'foobar', you cannot do so
+ * a targeted write like $object['foo']['bar'] = 'foobar'. Instead, you must
+ * overwrite the entire top-level 'foo' array with the entire set of new
+ * values: $object['foo'] = array(1, 2, 'bar' => 'foobar'). Due to this same
+ * limitation, attempts to create references to any contained data, nested or
+ * otherwise, will fail silently. So $var = &$object['foo'] will not throw an
+ * error, and $var will be populated with the contents of $object['foo'], but
+ * that data will be passed by value, not reference. For more information on
+ * the PHP limitation, see the note in the official PHP documentation at·
+ * http://php.net/manual/en/arrayaccess.offsetget.php on
+ * ArrayAccess::offsetGet().
+ *
+ * By default, the class accounts for caches where calling functions might
+ * request keys in the array that won't exist even after a cache rebuild. This
+ * prevents situations where a cache rebuild would be triggered over and over
+ * due to a 'missing' item. These cases are stored internally as a value of
+ * NULL. This means that the offsetGet() and offsetExists() methods
+ * must be overridden if caching an array where the top level values can
+ * legitimately be NULL, and where $object->offsetExists() needs to correctly
+ * return (equivalent to array_key_exists() vs. isset()). This should not
+ * be necessary in the majority of cases.
+ *
+ * Classes extending this class must override at least the
+ * resolveCacheMiss() method to have a working implementation.
+ *
+ * offsetSet() is not overridden by this class by default. In practice this
+ * means that assigning an offset via arrayAccess will only apply while the
+ * object is in scope and will not be written back to the persistent cache.
+ * This follows a similar pattern to static vs. persistent caching in
+ * procedural code. Extending classes may wish to alter this behaviour, for
+ * example by overriding offsetSet() and adding an automatic call to persist().
+ *
+ * @see SchemaCache
+ */
+abstract class DrupalCacheArray implements ArrayAccess {
+
+ /**
+ * A cid to pass to cache_set() and cache_get().
+ */
+ private $cid;
+
+ /**
+ * A bin to pass to cache_set() and cache_get().
+ */
+ private $bin;
+
+ /**
+ * An array of keys to add to the cache at the end of the request.
+ */
+ protected $keysToPersist = array();
+
+ /**
+ * Storage for the data itself.
+ */
+ protected $storage = array();
+
+ /**
+ * Constructor.
+ *
+ * @param $cid
+ * The cid for the array being cached.
+ * @param $bin
+ * The bin to cache the array.
+ */
+ public function __construct($cid, $bin) {
+ $this->cid = $cid;
+ $this->bin = $bin;
+
+ if ($cached = cache_get($this->cid, $this->bin)) {
+ $this->storage = $cached->data;
+ }
+ }
+
+ public function offsetExists($offset) {
+ return $this->offsetGet($offset) !== NULL;
+ }
+
+ public function offsetGet($offset) {
+ if (isset($this->storage[$offset]) || array_key_exists($offset, $this->storage)) {
+ return $this->storage[$offset];
+ }
+ else {
+ return $this->resolveCacheMiss($offset);
+ }
+ }
+
+ public function offsetSet($offset, $value) {
+ $this->storage[$offset] = $value;
+ }
+
+ public function offsetUnset($offset) {
+ unset($this->storage[$offset]);
+ }
+
+ /**
+ * Flags an offset value to be written to the persistent cache.
+ *
+ * If a value is assigned to a cache object with offsetSet(), by default it
+ * will not be written to the persistent cache unless it is flagged with this
+ * method. This allows items to be cached for the duration of a request,
+ * without necessarily writing back to the persistent cache at the end.
+ *
+ * @param $offset
+ * The array offset that was request.
+ * @param $persist
+ * Optional boolean to specify whether the offset should be persisted or
+ * not, defaults to TRUE. When called with $persist = FALSE the offset will
+ * be unflagged so that it will not written at the end of the request.
+ */
+ protected function persist($offset, $persist = TRUE) {
+ $this->keysToPersist[$offset] = $persist;
+ }
+
+ /**
+ * Resolves a cache miss.
+ *
+ * When an offset is not found in the object, this is treated as a cache
+ * miss. This method allows classes implementing the interface to look up
+ * the actual value and allow it to be cached.
+ *
+ * @param $offset
+ * The offset that was requested.
+ *
+ * @return
+ * The value of the offset, or NULL if no value was found.
+ */
+ abstract protected function resolveCacheMiss($offset);
+
+ /**
+ * Immediately write a value to the persistent cache.
+ *
+ * @param $cid
+ * The cache ID.
+ * @param $bin
+ * The cache bin.
+ * @param $data
+ * The data to write to the persistent cache.
+ * @param $lock
+ * Whether to acquire a lock before writing to cache.
+ */
+ protected function set($cid, $data, $bin, $lock = TRUE) {
+ // Lock cache writes to help avoid stampedes.
+ // To implement locking for cache misses, override __construct().
+ $lock_name = $cid . ':' . $bin;
+ if (!$lock || lock_acquire($lock_name)) {
+ if ($cached = cache_get($cid, $bin)) {
+ $data = $cached->data + $data;
+ }
+ cache_set($cid, $data, $bin);
+ if ($lock) {
+ lock_release($lock_name);
+ }
+ }
+ }
+
+ public function __destruct() {
+ $data = array();
+ foreach ($this->keysToPersist as $offset => $persist) {
+ if ($persist) {
+ $data[$offset] = $this->storage[$offset];
+ }
+ }
+ if (!empty($data)) {
+ $this->set($this->cid, $data, $this->bin);
+ }
+ }
+}
/**
* Start the timer with the specified name. If you start and stop the same
@@ -2532,6 +2721,55 @@
* If true, the schema will be rebuilt instead of retrieved from the cache.
*/
function drupal_get_schema($table = NULL, $rebuild = FALSE) {
+ static $schema;
+
+ if ($rebuild || !isset($table)) {
+ $schema = drupal_get_complete_schema($rebuild);
+ }
+ elseif (!isset($schema)) {
+ $schema = new SchemaCache();
+ }
+
+ if (!isset($table)) {
+ return $schema;
+ }
+ if (isset($schema[$table])) {
+ return $schema[$table];
+ }
+ else {
+ return FALSE;
+ }
+}
+
+/**
+ * Extends DrupalCacheArray to allow for dynamic building of the schema cache.
+ */
+class SchemaCache extends DrupalCacheArray {
+
+ public function __construct() {
+ // Cache by request method.
+ parent::__construct('schema:runtime:' . $_SERVER['REQUEST_METHOD'] == 'GET', 'cache');
+ }
+
+ protected function resolveCacheMiss($offset) {
+ $complete_schema = drupal_get_complete_schema();
+ $value = isset($complete_schema[$offset]) ? $complete_schema[$offset] : NULL;
+ $this->storage[$offset] = $value;
+ $this->persist($offset);
+ return $value;
+ }
+}
+
+/**
+ * Get the whole database schema.
+ *
+ * The returned schema will include any modifications made by any
+ * module that implements hook_schema_alter().
+ *
+ * @param $rebuild
+ * If true, the schema will be rebuilt instead of retrieved from the cache.
+ */
+function drupal_get_complete_schema($rebuild = FALSE) {
static $schema = array();
if (empty($schema) || $rebuild) {
@@ -2573,18 +2811,13 @@
if (!empty($schema) && (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL)) {
cache_set('schema', $schema);
}
- }
- }
-
- if (!isset($table)) {
- return $schema;
- }
- elseif (isset($schema[$table])) {
- return $schema[$table];
- }
- else {
- return FALSE;
- }
+ if ($rebuild) {
+ cache_clear_all('schema:', 'cache', TRUE);
+ }
+ }
+ }
+
+ return $schema;
}
/**
Modified: branches/drupal7/includes/common.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/common.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/common.inc (original)
+++ branches/drupal7/includes/common.inc Sun Sep 4 19:26:12 2011
@@ -89,7 +89,7 @@
* Error code indicating that the request made by drupal_http_request() exceeded
* the specified timeout.
*/
-define('HTTP_REQUEST_TIMEOUT', 1);
+define('HTTP_REQUEST_TIMEOUT', -1);
/**
* Constants defining cache granularity for blocks and renderable arrays.
@@ -1296,7 +1296,7 @@
* for scripts and styles.
*/
function filter_xss_admin($string) {
- return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'));
+ return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'article', 'aside', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'figcaption', 'figure', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'mark', 'menu', 'meter', 'nav', 'ol', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'small', 'span', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time', 'tr', 'tt', 'u', 'ul', 'var', 'wbr'));
}
/**
@@ -2745,13 +2745,14 @@
* @param $data
* (optional) The stylesheet data to be added, depending on what is passed
* through to the $options['type'] parameter:
- * - 'file': The path to the CSS file relative to the base_path(), e.g.,
- * "modules/devel/devel.css". Note that Modules should always prefix the
- * names of their CSS files with the module name; for example,
- * system-menus.css rather than simply menus.css. Themes can override
- * module-supplied CSS files based on their filenames, and this prefixing
- * helps prevent confusing name collisions for theme developers. See
- * drupal_get_css() where the overrides are performed. Also, if the
+ * - 'file': The path to the CSS file relative to the base_path(), or a
+ * stream wrapper URI. For example: "modules/devel/devel.css" or
+ * "public://generated_css/stylesheet_1.css". Note that Modules should
+ * always prefix the names of their CSS files with the module name; for
+ * example, system-menus.css rather than simply menus.css. Themes can
+ * override module-supplied CSS files based on their filenames, and this
+ * prefixing helps prevent confusing name collisions for theme developers.
+ * See drupal_get_css() where the overrides are performed. Also, if the
* direction of the current language is right-to-left (Hebrew, Arabic,
* etc.), the function will also look for an RTL CSS file and append it to
* the list. The name of this file should have an '-rtl.css' suffix. For
@@ -4419,6 +4420,8 @@
* The following states may be applied to an element:
* - enabled
* - disabled
+ * - required
+ * - optional
* - visible
* - invisible
* - checked
@@ -4427,26 +4430,22 @@
* - collapsed
*
* The following states may be used in remote conditions:
- * - enabled
- * - disabled
- * - visible
- * - invisible
+ * - empty
+ * - filled
* - checked
* - unchecked
+ * - expanded
+ * - collapsed
* - value
*
- * The following states exist for both states and remote conditions, but are not
- * fully implemented and may not change anything on the element:
- * - required
- * - optional
+ * The following states exist for both elements and remote conditions, but are
+ * not fully implemented and may not change anything on the element:
* - relevant
* - irrelevant
* - valid
* - invalid
* - touched
* - untouched
- * - filled
- * - empty
* - readwrite
* - readonly
*
@@ -5041,7 +5040,15 @@
drupal_register_shutdown_function('drupal_cron_cleanup');
// Iterate through the modules calling their cron handlers (if any):
- module_invoke_all('cron');
+ foreach (module_implements('cron') as $module) {
+ // Do not let an exception thrown by one module disturb another.
+ try {
+ module_invoke($module, 'cron');
+ }
+ catch (Exception $e) {
+ watchdog_exception('cron', $e);
+ }
+ }
// Record cron time
variable_set('cron_last', REQUEST_TIME);
@@ -7138,7 +7145,7 @@
// Don't clear cache_form - in-progress form submissions may break.
// Ordered so clearing the page cache will always be the last action.
- $core = array('cache', 'cache_filter', 'cache_bootstrap', 'cache_page');
+ $core = array('cache', 'cache_path', 'cache_filter', 'cache_bootstrap', 'cache_page');
$cache_tables = array_merge(module_invoke_all('flush_caches'), $core);
foreach ($cache_tables as $table) {
cache_clear_all('*', $table, TRUE);
@@ -7371,12 +7378,24 @@
*/
function entity_extract_ids($entity_type, $entity) {
$info = entity_get_info($entity_type);
+
// Objects being created might not have id/vid yet.
$id = isset($entity->{$info['entity keys']['id']}) ? $entity->{$info['entity keys']['id']} : NULL;
$vid = ($info['entity keys']['revision'] && isset($entity->{$info['entity keys']['revision']})) ? $entity->{$info['entity keys']['revision']} : NULL;
- // If no bundle key provided, then we assume a single bundle, named after the
- // entity type.
- $bundle = $info['entity keys']['bundle'] ? $entity->{$info['entity keys']['bundle']} : $entity_type;
+
+ if (!empty($info['entity keys']['bundle'])) {
+ // Explicitly fail for malformed entities missing the bundle property.
+ if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
+ throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));
+ }
+ $bundle = $entity->{$info['entity keys']['bundle']};
+ }
+ else {
+ // The entity type provides no bundle key: assume a single bundle, named
+ // after the entity type.
+ $bundle = $entity_type;
+ }
+
return array($id, $vid, $bundle);
}
Modified: branches/drupal7/includes/database/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/database.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/database.inc (original)
+++ branches/drupal7/includes/database/database.inc Sun Sep 4 19:26:12 2011
@@ -1022,7 +1022,9 @@
}
// We need to find the point we're rolling back to, all other savepoints
- // before are no longer needed.
+ // before are no longer needed. If we rolled back other active savepoints,
+ // we need to throw an exception.
+ $rolled_back_other_active_savepoints = FALSE;
while ($savepoint = array_pop($this->transactionLayers)) {
if ($savepoint == $savepoint_name) {
// If it is the last the transaction in the stack, then it is not a
@@ -1032,10 +1034,20 @@
break;
}
$this->query('ROLLBACK TO SAVEPOINT ' . $savepoint);
+ $this->popCommittableTransactions();
+ if ($rolled_back_other_active_savepoints) {
+ throw new DatabaseTransactionOutOfOrderException();
+ }
return;
}
+ else {
+ $rolled_back_other_active_savepoints = TRUE;
+ }
}
parent::rollBack();
+ if ($rolled_back_other_active_savepoints) {
+ throw new DatabaseTransactionOutOfOrderException();
+ }
}
/**
@@ -1084,15 +1096,28 @@
if (!$this->supportsTransactions()) {
return;
}
- if (!$this->inTransaction()) {
+ if (!isset($this->transactionLayers[$name])) {
throw new DatabaseTransactionNoActiveException();
}
- // Commit everything since SAVEPOINT $name.
- while($savepoint = array_pop($this->transactionLayers)) {
- if ($savepoint != $name) continue;
+ // Mark this layer as committable.
+ $this->transactionLayers[$name] = FALSE;
+ $this->popCommittableTransactions();
+ }
+
+ /**
+ * Internal function: commit all the transaction layers that can commit.
+ */
+ protected function popCommittableTransactions() {
+ // Commit all the committable layers.
+ foreach (array_reverse($this->transactionLayers) as $name => $active) {
+ // Stop once we found an active transaction.
+ if ($active) {
+ break;
+ }
// If there are no more layers left then we should commit.
+ unset($this->transactionLayers[$name]);
if (empty($this->transactionLayers)) {
if (!parent::commit()) {
throw new DatabaseTransactionCommitFailedException();
@@ -1100,7 +1125,6 @@
}
else {
$this->query('RELEASE SAVEPOINT ' . $name);
- break;
}
}
}
@@ -1745,6 +1769,11 @@
class DatabaseTransactionExplicitCommitNotAllowedException extends Exception { }
/**
+ * Exception thrown when a rollback() resulted in other active transactions being rolled-back.
+ */
+class DatabaseTransactionOutOfOrderException extends Exception { }
+
+/**
* Exception thrown for merge queries that do not make semantic sense.
*
* There are many ways that a merge query could be malformed. They should all
@@ -1839,7 +1868,7 @@
public function __destruct() {
// If we rolled back then the transaction would have already been popped.
- if ($this->connection->inTransaction() && !$this->rolledBack) {
+ if (!$this->rolledBack) {
$this->connection->popTransaction($this->name);
}
}
Modified: branches/drupal7/includes/database/mysql/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/mysql/database.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/mysql/database.inc (original)
+++ branches/drupal7/includes/database/mysql/database.inc Sun Sep 4 19:26:12 2011
@@ -137,21 +137,16 @@
/**
* Overridden to work around issues to MySQL not supporting transactional DDL.
*/
- public function popTransaction($name) {
- if (!$this->supportsTransactions()) {
- return;
- }
- if (!$this->inTransaction()) {
- throw new DatabaseTransactionNoActiveException();
- }
-
- // Commit everything since SAVEPOINT $name.
- while ($savepoint = array_pop($this->transactionLayers)) {
- if ($savepoint != $name) {
- continue;
+ protected function popCommittableTransactions() {
+ // Commit all the committable layers.
+ foreach (array_reverse($this->transactionLayers) as $name => $active) {
+ // Stop once we found an active transaction.
+ if ($active) {
+ break;
}
// If there are no more layers left then we should commit.
+ unset($this->transactionLayers[$name]);
if (empty($this->transactionLayers)) {
if (!PDO::commit()) {
throw new DatabaseTransactionCommitFailedException();
@@ -173,13 +168,12 @@
if ($e->errorInfo[1] == '1305') {
// If one SAVEPOINT was released automatically, then all were.
// Therefore, we keep just the topmost transaction.
- $this->transactionLayers = array('drupal_transaction');
+ $this->transactionLayers = array('drupal_transaction' => 'drupal_transaction');
}
else {
throw $e;
}
}
- break;
}
}
}
Modified: branches/drupal7/includes/database/pgsql/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/pgsql/database.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/pgsql/database.inc (original)
+++ branches/drupal7/includes/database/pgsql/database.inc Sun Sep 4 19:26:12 2011
@@ -145,10 +145,9 @@
if (!isset($specials)) {
$specials = array(
// In PostgreSQL, 'LIKE' is case-sensitive. For case-insensitive LIKE
- // statements, we need to use ILIKE instead. Use backslash for escaping
- // wildcard characters.
- 'LIKE' => array('operator' => 'ILIKE', 'postfix' => ' ESCAPE ' . $this->quote("\\")),
- 'NOT LIKE' => array('operator' => 'NOT ILIKE', 'postfix' => ' ESCAPE ' . $this->quote("\\")),
+ // statements, we need to use ILIKE instead.
+ 'LIKE' => array('operator' => 'ILIKE'),
+ 'NOT LIKE' => array('operator' => 'NOT ILIKE'),
);
}
Modified: branches/drupal7/includes/database/query.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/query.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/query.inc (original)
+++ branches/drupal7/includes/database/query.inc Sun Sep 4 19:26:12 2011
@@ -142,7 +142,15 @@
* The query this condition belongs to. If not given, the current query is
* used.
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder);
+
+ /**
+ * Check whether a condition has been previously compiled.
+ *
+ * @return
+ * TRUE if the condition has been previously compiled.
+ */
+ public function compiled();
}
@@ -239,12 +247,17 @@
interface QueryPlaceholderInterface {
/**
+ * Returns a unique identifier for this object.
+ */
+ public function uniqueIdentifier();
+
+ /**
* Returns the next placeholder ID for the query.
*
* @return
* The next available placeholder ID as an integer.
*/
- function nextPlaceholder();
+ public function nextPlaceholder();
}
/**
@@ -284,6 +297,11 @@
protected $queryOptions;
/**
+ * A unique identifier for this query object.
+ */
+ protected $uniqueIdentifier;
+
+ /**
* The placeholder counter.
*/
protected $nextPlaceholder = 0;
@@ -304,6 +322,8 @@
* Array of query options.
*/
public function __construct(DatabaseConnection $connection, $options) {
+ $this->uniqueIdentifier = uniqid('', TRUE);
+
$this->connection = $connection;
$this->connectionKey = $this->connection->getKey();
$this->connectionTarget = $this->connection->getTarget();
@@ -321,13 +341,20 @@
}
/**
- * Implements the magic __wakeup function to reconnect to the database.
+ * Implements the magic __wakeup function to reconnect to the database.
*/
public function __wakeup() {
$this->connection = Database::getConnection($this->connectionTarget, $this->connectionKey);
}
/**
+ * Implements the magic __clone function.
+ */
+ public function __clone() {
+ $this->uniqueIdentifier = uniqid('', TRUE);
+ }
+
+ /**
* Runs the query against the database.
*/
abstract protected function execute();
@@ -342,6 +369,13 @@
* A prepared statement query string for this object.
*/
abstract public function __toString();
+
+ /**
+ * Returns a unique identifier for this object.
+ */
+ public function uniqueIdentifier() {
+ return $this->uniqueIdentifier;
+ }
/**
* Gets the next placeholder value for this query object.
@@ -790,8 +824,15 @@
/**
* Implements QueryConditionInterface::compile().
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ return $this->condition->compile($connection, $queryPlaceholder);
+ }
+
+ /**
+ * Implements QueryConditionInterface::compiled().
+ */
+ public function compiled() {
+ return $this->condition->compiled();
}
/**
@@ -864,8 +905,15 @@
/**
* Implements QueryConditionInterface::compile().
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ return $this->condition->compile($connection, $queryPlaceholder);
+ }
+
+ /**
+ * Implements QueryConditionInterface::compiled().
+ */
+ public function compiled() {
+ return $this->condition->compiled();
}
/**
@@ -1025,8 +1073,15 @@
/**
* Implements QueryConditionInterface::compile().
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ return $this->condition->compile($connection, $queryPlaceholder);
+ }
+
+ /**
+ * Implements QueryConditionInterface::compiled().
+ */
+ public function compiled() {
+ return $this->condition->compiled();
}
/**
@@ -1510,8 +1565,15 @@
/**
* Implements QueryConditionInterface::compile().
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ return $this->condition->compile($connection, $queryPlaceholder);
+ }
+
+ /**
+ * Implements QueryConditionInterface::compiled().
+ */
+ public function compiled() {
+ return $this->condition->compiled();
}
/**
@@ -1609,6 +1671,11 @@
protected $changed = TRUE;
/**
+ * The identifier of the query placeholder this condition has been compiled against.
+ */
+ protected $queryPlaceholderIdentifier;
+
+ /**
* Constructs a DataBaseCondition object.
*
* @param string $conjunction
@@ -1718,8 +1785,12 @@
/**
* Implements QueryConditionInterface::compile().
*/
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- if ($this->changed) {
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ // Re-compile if this condition changed or if we are compiled against a
+ // different query placeholder object.
+ if ($this->changed || isset($this->queryPlaceholderIdentifier) && ($this->queryPlaceholderIdentifier != $queryPlaceholder->uniqueIdentifier())) {
+ $this->queryPlaceholderIdentifier = $queryPlaceholder->uniqueIdentifier();
+
$condition_fragments = array();
$arguments = array();
@@ -1792,6 +1863,13 @@
}
/**
+ * Implements QueryConditionInterface::compiled().
+ */
+ public function compiled() {
+ return !$this->changed;
+ }
+
+ /**
* Implements PHP magic __toString method to convert the conditions to string.
*
* @return string
Modified: branches/drupal7/includes/database/schema.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/schema.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/schema.inc (original)
+++ branches/drupal7/includes/database/schema.inc Sun Sep 4 19:26:12 2011
@@ -176,10 +176,33 @@
*/
protected $defaultSchema = 'public';
+ /**
+ * A unique identifier for this query object.
+ */
+ protected $uniqueIdentifier;
+
public function __construct($connection) {
+ $this->uniqueIdentifier = uniqid('', TRUE);
$this->connection = $connection;
}
+ /**
+ * Implements the magic __clone function.
+ */
+ public function __clone() {
+ $this->uniqueIdentifier = uniqid('', TRUE);
+ }
+
+ /**
+ * Implements QueryPlaceHolderInterface::uniqueIdentifier().
+ */
+ public function uniqueIdentifier() {
+ return $this->uniqueIdentifier;
+ }
+
+ /**
+ * Implements QueryPlaceHolderInterface::nextPlaceholder().
+ */
public function nextPlaceholder() {
return $this->placeholder++;
}
Modified: branches/drupal7/includes/database/select.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/select.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/select.inc (original)
+++ branches/drupal7/includes/database/select.inc Sun Sep 4 19:26:12 2011
@@ -549,17 +549,31 @@
protected $connection;
/**
+ * A unique identifier for this query object.
+ */
+ protected $uniqueIdentifier;
+
+ /**
* The placeholder counter.
*/
protected $placeholder = 0;
public function __construct(SelectQueryInterface $query, DatabaseConnection $connection) {
+ $this->uniqueIdentifier = uniqid('', TRUE);
$this->query = $query;
$this->connection = $connection;
}
- /* Implementations of QueryPlaceholderInterface. */
-
+ /**
+ * Implements QueryPlaceholderInterface::uniqueIdentifier().
+ */
+ public function uniqueIdentifier() {
+ return $this->uniqueIdentifier;
+ }
+
+ /**
+ * Implements QueryPlaceholderInterface::nextPlaceholder().
+ */
public function nextPlaceholder() {
return $this->placeholder++;
}
@@ -612,8 +626,12 @@
return $this;
}
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->condition->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ return $this->query->compile($connection, $queryPlaceholder);
+ }
+
+ public function compiled() {
+ return $this->query->compiled();
}
/* Implementations of QueryConditionInterface for the HAVING clause. */
@@ -824,6 +842,8 @@
}
public function __clone() {
+ $this->uniqueIdentifier = uniqid('', TRUE);
+
// We need to deep-clone the query we're wrapping, which in turn may
// deep-clone other objects. Exciting!
$this->query = clone($this->query);
@@ -1013,7 +1033,35 @@
}
public function arguments() {
- return $this->where->arguments();
+ if (!$this->compiled()) {
+ return NULL;
+ }
+
+ $args = $this->where->arguments() + $this->having->arguments();
+
+ foreach ($this->tables as $table) {
+ if ($table['arguments']) {
+ $args += $table['arguments'];
+ }
+ // If this table is a subquery, grab its arguments recursively.
+ if ($table['table'] instanceof SelectQueryInterface) {
+ $args += $table['table']->arguments();
+ }
+ }
+
+ foreach ($this->expressions as $expression) {
+ if ($expression['arguments']) {
+ $args += $expression['arguments'];
+ }
+ }
+
+ // If there are any dependent queries to UNION,
+ // incorporate their arguments recursively.
+ foreach ($this->union as $union) {
+ $args += $union['query']->arguments();
+ }
+
+ return $args;
}
public function where($snippet, $args = array()) {
@@ -1041,8 +1089,44 @@
return $this;
}
- public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder = NULL) {
- return $this->where->compile($connection, isset($queryPlaceholder) ? $queryPlaceholder : $this);
+ public function compile(DatabaseConnection $connection, QueryPlaceholderInterface $queryPlaceholder) {
+ $this->where->compile($connection, $queryPlaceholder);
+ $this->having->compile($connection, $queryPlaceholder);
+
+ foreach ($this->tables as $table) {
+ // If this table is a subquery, compile it recursively.
+ if ($table['table'] instanceof SelectQueryInterface) {
+ $table['table']->compile($connection, $queryPlaceholder);
+ }
+ }
+
+ // If there are any dependent queries to UNION, compile it recursively.
+ foreach ($this->union as $union) {
+ $union['query']->compile($connection, $queryPlaceholder);
+ }
+ }
+
+ public function compiled() {
+ if (!$this->where->compiled() || !$this->having->compiled()) {
+ return FALSE;
+ }
+
+ foreach ($this->tables as $table) {
+ // If this table is a subquery, check its status recursively.
+ if ($table['table'] instanceof SelectQueryInterface) {
+ if (!$table['table']->compiled()) {
+ return FALSE;
+ }
+ }
+ }
+
+ foreach ($this->union as $union) {
+ if (!$union['query']->compiled()) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
}
/* Implementations of QueryConditionInterface for the HAVING clause. */
@@ -1136,33 +1220,8 @@
if (!isset($queryPlaceholder)) {
$queryPlaceholder = $this;
}
- $this->where->compile($this->connection, $queryPlaceholder);
- $this->having->compile($this->connection, $queryPlaceholder);
- $args = $this->where->arguments() + $this->having->arguments();
-
- foreach ($this->tables as $table) {
- if ($table['arguments']) {
- $args += $table['arguments'];
- }
- // If this table is a subquery, grab its arguments recursively.
- if ($table['table'] instanceof SelectQueryInterface) {
- $args += $table['table']->getArguments($queryPlaceholder);
- }
- }
-
- foreach ($this->expressions as $expression) {
- if ($expression['arguments']) {
- $args += $expression['arguments'];
- }
- }
-
- // If there are any dependent queries to UNION,
- // incorporate their arguments recursively.
- foreach ($this->union as $union) {
- $args += $union['query']->getArguments($queryPlaceholder);
- }
-
- return $args;
+ $this->compile($this->connection, $queryPlaceholder);
+ return $this->arguments();
}
/**
@@ -1439,6 +1498,14 @@
}
public function __toString() {
+ // For convenience, we compile the query ourselves if the caller forgot
+ // to do it. This allows constructs like "(string) $query" to work. When
+ // the query will be executed, it will be recompiled using the proper
+ // placeholder generator anyway.
+ if (!$this->compiled()) {
+ $this->compile($this->connection, $this);
+ }
+
// Create a sanitized comment string to prepend to the query.
$comments = $this->connection->makeComment($this->comments);
@@ -1496,14 +1563,6 @@
// WHERE
if (count($this->where)) {
- // The following line will not generate placeholders correctly if there
- // is a subquery. Fortunately, it is also called from getArguments() first
- // so it's not a problem in practice... unless you try to call __toString()
- // before calling getArguments(). That is a problem that we will have to
- // fix in Drupal 8, because it requires more refactoring than we are
- // able to do in Drupal 7.
- // @todo Move away from __toString() For SelectQuery compilation at least.
- $this->where->compile($this->connection, $this);
// There is an implicit string cast on $this->condition.
$query .= "\nWHERE " . $this->where;
}
@@ -1515,7 +1574,6 @@
// HAVING
if (count($this->having)) {
- $this->having->compile($this->connection, $this);
// There is an implicit string cast on $this->having.
$query .= "\nHAVING " . $this->having;
}
Modified: branches/drupal7/includes/database/sqlite/schema.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/database/sqlite/schema.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/database/sqlite/schema.inc (original)
+++ branches/drupal7/includes/database/sqlite/schema.inc Sun Sep 4 19:26:12 2011
@@ -196,6 +196,7 @@
// $map does not use drupal_static as its value never changes.
static $map = array(
'varchar:normal' => 'VARCHAR',
+ 'char:normal' => 'CHAR',
'text:tiny' => 'TEXT',
'text:small' => 'TEXT',
Modified: branches/drupal7/includes/entity.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/entity.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/entity.inc (original)
+++ branches/drupal7/includes/entity.inc Sun Sep 4 19:26:12 2011
@@ -628,8 +628,6 @@
/**
* Adds a condition on field values.
*
- * @param $type
- * The condition array the given conditions should be added to.
* @param $field
* Either a field name or a field array.
* @param $column
@@ -1327,3 +1325,8 @@
}
}
+
+/**
+ * Exception thrown when a malformed entity is passed.
+ */
+class EntityMalformedException extends Exception { }
Modified: branches/drupal7/includes/file.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/file.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/file.inc (original)
+++ branches/drupal7/includes/file.inc Sun Sep 4 19:26:12 2011
@@ -906,7 +906,7 @@
file_ensure_htaccess();
// Perform the copy operation.
if (!@copy($source, $destination)) {
- watchdog('file', 'The specified file %file could not be copied to %destination.', array('%file' => $source, '%destination' => $destination), WATCHDOG_ERR);
+ watchdog('file', 'The specified file %file could not be copied to %destination.', array('%file' => $source, '%destination' => $destination), WATCHDOG_ERROR);
return FALSE;
}
@@ -1538,7 +1538,7 @@
// directory. This overcomes open_basedir restrictions for future file
// operations.
$file->uri = $file->destination;
- if (!move_uploaded_file($_FILES['files']['tmp_name'][$source], $file->uri)) {
+ if (!drupal_move_uploaded_file($_FILES['files']['tmp_name'][$source], $file->uri)) {
form_set_error($source, t('File upload error. Could not move uploaded file.'));
watchdog('file', 'Upload error. Could not move uploaded file %file to destination %destination.', array('%file' => $file->filename, '%destination' => $file->uri));
return FALSE;
@@ -1565,6 +1565,42 @@
return FALSE;
}
+/**
+ * Moves an uploaded file to a new location.
+ *
+ * PHP's move_uploaded_file() does not properly support streams if safe_mode
+ * or open_basedir are enabled, so this function fills that gap.
+ *
+ * Compatibility: normal paths and stream wrappers.
+ * @see http://drupal.org/node/515192
+ *
+ * @param $filename
+ * The filename of the uploaded file.
+ * @param $uri
+ * A string containing the destination URI of the file.
+ *
+ * @return
+ * TRUE on success, or FALSE on failure.
+ *
+ * @see move_uploaded_file()
+ * @ingroup php_wrappers
+ */
+function drupal_move_uploaded_file($filename, $uri) {
+ $result = @move_uploaded_file($filename, $uri);
+ // PHP's move_uploaded_file() does not properly support streams if safe_mode
+ // or open_basedir are enabled so if the move failed, try finding a real path
+ // and retry the move operation.
+ if (!$result) {
+ if ($realpath = drupal_realpath($uri)) {
+ $result = move_uploaded_file($filename, $realpath);
+ }
+ else {
+ $result = move_uploaded_file($filename, $uri);
+ }
+ }
+
+ return $result;
+}
/**
* Check that a file meets the criteria specified by the validators.
@@ -1902,10 +1938,11 @@
* Menu handler for private file transfers.
*
* Call modules that implement hook_file_download() to find out if a file is
- * accessible and what headers it should be transferred with. If a module
- * returns -1 drupal_access_denied() will be returned. If one or more modules
- * returned headers the download will start with the returned headers. If no
- * modules respond drupal_not_found() will be returned.
+ * accessible and what headers it should be transferred with. If one or more
+ * modules returned headers the download will start with the returned headers.
+ * If a module returns -1 drupal_access_denied() will be returned. If the file
+ * exists but no modules responded drupal_access_denied() will be returned.
+ * If the file does not exist drupal_not_found() will be returned.
*
* @see hook_file_download()
*/
@@ -1934,6 +1971,7 @@
if (count($headers)) {
file_transfer($uri, $headers);
}
+ return drupal_access_denied();
}
return drupal_not_found();
}
Modified: branches/drupal7/includes/file.mimetypes.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/file.mimetypes.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/file.mimetypes.inc (original)
+++ branches/drupal7/includes/file.mimetypes.inc Sun Sep 4 19:26:12 2011
@@ -407,7 +407,6 @@
'doc' => 14,
'bin' => 15,
'oda' => 16,
- 'ogg' => 17,
'ogx' => 17,
'pdf' => 18,
'key' => 19,
@@ -629,6 +628,7 @@
'm4a' => 188,
'mp3' => 188,
'mp2' => 188,
+ 'ogg' => 189,
'oga' => 189,
'spx' => 189,
'sid' => 190,
Modified: branches/drupal7/includes/form.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/form.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/form.inc (original)
+++ branches/drupal7/includes/form.inc Sun Sep 4 19:26:12 2011
@@ -4004,6 +4004,36 @@
}
/**
+ * Helper form element validator: integer.
+ */
+function element_validate_integer($element, &$form_state) {
+ $value = $element['#value'];
+ if ($value !== '' && (!is_numeric($value) || intval($value) != $value)) {
+ form_error($element, t('%name must be an integer.', array('%name' => $element['#title'])));
+ }
+}
+
+/**
+ * Helper form element validator: integer > 0.
+ */
+function element_validate_integer_positive($element, &$form_state) {
+ $value = $element['#value'];
+ if ($value !== '' && (!is_numeric($value) || intval($value) != $value || $value <= 0)) {
+ form_error($element, t('%name must be a positive integer.', array('%name' => $element['#title'])));
+ }
+}
+
+/**
+ * Helper form element validator: number.
+ */
+function element_validate_number($element, &$form_state) {
+ $value = $element['#value'];
+ if ($value != '' && !is_numeric($value)) {
+ form_error($element, t('%name must be a number.', array('%name' => $element['#title'])));
+ }
+}
+
+/**
* @} End of "defgroup form_api".
*/
@@ -4033,8 +4063,9 @@
* 'file' => 'path_to_file_containing_myfunctions',
* );
* batch_set($batch);
- * // only needed if not inside a form _submit handler :
- * batch_process();
+ * // Only needed if not inside a form _submit handler.
+ * // Setting redirect in batch_process.
+ * batch_process('node/1');
* @endcode
*
* Note: if the batch 'title', 'init_message', 'progress_message', or
Modified: branches/drupal7/includes/lock.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/lock.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/lock.inc (original)
+++ branches/drupal7/includes/lock.inc Sun Sep 4 19:26:12 2011
@@ -74,7 +74,10 @@
* Helper function to get this request's unique id.
*/
function _lock_id() {
- $lock_id = &drupal_static(__FUNCTION__);
+ // Do not use drupal_static(). This identifier refers to the current
+ // client request, and must not be changed under any circumstances
+ // else the shutdown handler may fail to release our locks.
+ static $lock_id;
if (!isset($lock_id)) {
// Assign a unique id.
Modified: branches/drupal7/includes/menu.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/menu.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/menu.inc (original)
+++ branches/drupal7/includes/menu.inc Sun Sep 4 19:26:12 2011
@@ -2340,7 +2340,7 @@
* menu link ('node/5' if it exists, or fallback to 'node/%').
*
* @return
- * A fully translated menu link, or NULL if not matching menu link was
+ * A fully translated menu link, or NULL if no matching menu link was
* found. The most specific menu link ('node/5' preferred over 'node/%') in
* the most preferred menu (as defined by menu_get_active_menu_names()) is
* returned.
Modified: branches/drupal7/includes/pager.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/pager.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/pager.inc (original)
+++ branches/drupal7/includes/pager.inc Sun Sep 4 19:26:12 2011
@@ -154,7 +154,7 @@
* Note that no collision detection is done when setting an element ID
* explicitly, so it is possible for two pagers to end up using the same ID
* if both are set explicitly.
- *
+ *
* @param $element
*/
public function element($element) {
@@ -574,13 +574,20 @@
*
* @param $variables
* An associative array containing:
+ * - text: The link text. Also used to figure out the title attribute of the
+ * link, if it is not provided in $variables['attributes']['title']; in
+ * this case, $variables['text'] must be one of the standard pager link
+ * text strings that would be generated by the pager theme functions, such
+ * as a number or t('« first').
* - page_new: The first result to display on the linked page.
* - element: An optional integer to distinguish between multiple pagers on
* one page.
* - parameters: An associative array of query string parameters to append to
* the pager link.
- * - attributes: An associative array of HTML attributes to apply to a pager
- * anchor tag.
+ * - attributes: An associative array of HTML attributes to apply to the
+ * pager link.
+ *
+ * @see theme_pager()
*
* @ingroup themeable
*/
Modified: branches/drupal7/includes/stream_wrappers.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/stream_wrappers.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/stream_wrappers.inc (original)
+++ branches/drupal7/includes/stream_wrappers.inc Sun Sep 4 19:26:12 2011
@@ -401,7 +401,7 @@
$this->handle = ($options & STREAM_REPORT_ERRORS) ? fopen($path, $mode) : @fopen($path, $mode);
if ((bool) $this->handle && $options & STREAM_USE_PATH) {
- $opened_url = $path;
+ $opened_path = $path;
}
return (bool) $this->handle;
Modified: branches/drupal7/includes/theme.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/theme.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/theme.inc (original)
+++ branches/drupal7/includes/theme.inc Sun Sep 4 19:26:12 2011
@@ -1820,6 +1820,7 @@
foreach ($items as $i => $item) {
$attributes = array();
$children = array();
+ $data = '';
if (is_array($item)) {
foreach ($item as $key => $value) {
if ($key == 'data') {
@@ -2482,7 +2483,6 @@
$variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? variable_get('site_slogan', '') : '');
$variables['tabs'] = '';
$variables['title'] = drupal_get_title();
- $variables['closure'] = '';
// Compile a list of classes that are going to be applied to the body element.
$variables['classes_array'][] = 'in-maintenance';
Modified: branches/drupal7/includes/update.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/includes/update.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/includes/update.inc (original)
+++ branches/drupal7/includes/update.inc Sun Sep 4 19:26:12 2011
@@ -178,6 +178,14 @@
$_COOKIE[session_name()] = $sid;
session_id($sid);
}
+
+ // Upgrading from D6 to D7.{0,1,2,3,4,8,...} is different than upgrading
+ // from D6 to D7.{5,6,7} which should be considered broken. To be able to
+ // properly handle this difference in node_update_7012 we need to keep track
+ // of whether a D6 > D7 upgrade or a D7 > D7 update is running.
+ // Since variable_set() is not available here, the D6 status is being saved
+ // in a local variable to be able to store it later.
+ $update_d6 = TRUE;
}
// Create the registry tables.
@@ -301,6 +309,11 @@
variable_set('date_temporary_timezone', $timezone_offset);
// Set the timezone for this request only.
$GLOBALS['conf']['date_default_timezone'] = 'UTC';
+ }
+
+ // This allows update functions to tell if an upgrade from D6 is running.
+ if (!empty($update_d6)) {
+ variable_set('update_d6', TRUE);
}
}
@@ -355,6 +368,12 @@
))
->fetchField();
if ($block_exists) {
+ // Delete any existing blocks with the new module+delta.
+ db_delete($table)
+ ->condition('module', $module)
+ ->condition('delta', $new_delta)
+ ->execute();
+ // Rename the old block to the new module+delta.
db_update($table)
->fields(array('delta' => $new_delta))
->condition('module', $module)
@@ -372,6 +391,12 @@
))
->fetchField();
if ($block_exists) {
+ // Delete any existing blocks with the new module+delta.
+ db_delete($table)
+ ->condition('module', $new_module)
+ ->condition('delta', $delta)
+ ->execute();
+ // Rename the old block to the new module+delta.
db_update($table)
->fields(array('module' => $new_module))
->condition('module', $old_module)
@@ -1069,6 +1094,10 @@
* @see update_batch()
*/
function update_finished($success, $results, $operations) {
+ // Remove the D6 upgrade flag variable so that subsequent update runs do not
+ // get the wrong context.
+ variable_del('update_d6');
+
// Clear the caches in case the data has been updated.
drupal_flush_all_caches();
Modified: branches/drupal7/misc/tabledrag.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/misc/tabledrag.js?rev=2231&op=diff
==============================================================================
--- branches/drupal7/misc/tabledrag.js (original)
+++ branches/drupal7/misc/tabledrag.js Sun Sep 4 19:26:12 2011
@@ -131,31 +131,28 @@
}
// Mark the column containing this field so it can be hidden.
- if (hidden && cell[0] && cell.css('display') != 'none') {
+ if (hidden && cell[0]) {
// Add 1 to our indexes. The nth-child selector is 1 based, not 0 based.
// Match immediate children of the parent element to allow nesting.
var columnIndex = $('> td', cell.parent()).index(cell.get(0)) + 1;
- var headerIndex = $('> td:not(:hidden)', cell.parent()).index(cell.get(0)) + 1;
- $('> thead > tr, > tbody > tr, > tr', this.table).each(function (){
- var row = $(this);
- var parentTag = row.parent().get(0).tagName.toLowerCase();
- var index = (parentTag == 'thead') ? headerIndex : columnIndex;
-
- // Adjust the index to take into account colspans.
- row.children().each(function (n) {
- if (n < index) {
- index -= (this.colSpan && this.colSpan > 1) ? this.colSpan - 1 : 0;
+ $('> thead > tr, > tbody > tr, > tr', this.table).each(function () {
+ // Get the columnIndex and adjust for any colspans in this row.
+ var index = columnIndex;
+ var cells = $(this).children();
+ cells.each(function (n) {
+ if (n < index && this.colSpan && this.colSpan > 1) {
+ index -= this.colSpan - 1;
}
});
if (index > 0) {
- cell = row.children(':nth-child(' + index + ')');
- if (cell[0].colSpan > 1) {
+ cell = cells.filter(':nth-child(' + index + ')');
+ if (cell[0].colSpan && cell[0].colSpan > 1) {
// If this cell has a colspan, mark it so we can reduce the colspan.
- $(cell[0]).addClass('tabledrag-has-colspan');
+ cell.addClass('tabledrag-has-colspan');
}
else {
// Mark this cell so we can hide it.
- $(cell[0]).addClass('tabledrag-hide');
+ cell.addClass('tabledrag-hide');
}
}
});
Modified: branches/drupal7/modules/aggregator/aggregator.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/aggregator/aggregator.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/aggregator/aggregator.info (original)
+++ branches/drupal7/modules/aggregator/aggregator.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/aggregator/aggregator.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/aggregator/aggregator.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/aggregator/aggregator.module (original)
+++ branches/drupal7/modules/aggregator/aggregator.module Sun Sep 4 19:26:12 2011
@@ -283,7 +283,7 @@
* otherwise.
*/
function _aggregator_has_categories() {
- return user_access('access news feeds') && db_query('SELECT COUNT(*) FROM {aggregator_category}')->fetchField();
+ return user_access('access news feeds') && (bool) db_query_range('SELECT 1 FROM {aggregator_category}', 0, 1)->fetchField();
}
/**
Modified: branches/drupal7/modules/aggregator/tests/aggregator_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/aggregator/tests/aggregator_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/aggregator/tests/aggregator_test.info (original)
+++ branches/drupal7/modules/aggregator/tests/aggregator_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/block/block.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/block/block.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/block/block.info (original)
+++ branches/drupal7/modules/block/block.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = block.test
configure = admin/structure/block
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/block/block.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/block/block.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/block/block.install (original)
+++ branches/drupal7/modules/block/block.install Sun Sep 4 19:26:12 2011
@@ -190,15 +190,11 @@
* Implements hook_update_dependencies().
*/
function block_update_dependencies() {
- // Block update 7005 needs to query the list of existing text formats and
- // therefore must run after filter_update_7000().
+ // block_update_7005() needs to query the {filter_format} table to get a list
+ // of existing text formats, so it must run after filter_update_7000(), which
+ // creates that table.
$dependencies['block'][7005] = array(
'filter' => 7000,
- );
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['block'][7007] = array(
- 'filter' => 7010,
);
return $dependencies;
Modified: branches/drupal7/modules/block/block.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/block/block.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/block/block.module (original)
+++ branches/drupal7/modules/block/block.module Sun Sep 4 19:26:12 2011
@@ -761,6 +761,12 @@
else {
$enabled = TRUE;
}
+
+ // Limited visibility blocks must list at least one page.
+ if ($block->visibility == BLOCK_VISIBILITY_LISTED && empty($block->pages)) {
+ $enabled = FALSE;
+ }
+
if (!$enabled) {
unset($blocks[$key]);
continue;
Modified: branches/drupal7/modules/block/block.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/block/block.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/block/block.test (original)
+++ branches/drupal7/modules/block/block.test Sun Sep 4 19:26:12 2011
@@ -193,6 +193,49 @@
}
/**
+ * Test block visibility when using "pages" restriction but leaving
+ * "pages" textarea empty
+ */
+ function testBlockVisibilityListedEmpty() {
+ $block = array();
+
+ // Create a random title for the block
+ $title = $this->randomName(8);
+
+ // Create the custom block
+ $custom_block = array();
+ $custom_block['info'] = $this->randomName(8);
+ $custom_block['title'] = $title;
+ $custom_block['body[value]'] = $this->randomName(32);
+ $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
+
+ $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
+ $block['module'] = 'block';
+ $block['delta'] = $bid;
+ $block['title'] = $title;
+
+ // Move block to the first sidebar.
+ $this->moveBlockToRegion($block, $this->regions[1]);
+
+ // Set the block to be hidden on any user path, and to be shown only to
+ // authenticated users.
+ $edit = array();
+ $edit['visibility'] = BLOCK_VISIBILITY_LISTED;
+ $this->drupalPost('admin/structure/block/manage/' . $block['module'] . '/' . $block['delta'] . '/configure', $edit, t('Save block'));
+
+ $this->drupalGet('');
+ $this->assertNoText($title, t('Block was not displayed according to block visibility rules.'));
+
+ $this->drupalGet('user');
+ $this->assertNoText($title, t('Block was not displayed according to block visibility rules regardless of path case.'));
+
+ // Confirm that the block is not displayed to anonymous users.
+ $this->drupalLogout();
+ $this->drupalGet('');
+ $this->assertNoText($title, t('Block was not displayed to anonymous users.'));
+ }
+
+ /**
* Test user customization of block visibility.
*/
function testBlockVisibilityPerUser() {
Modified: branches/drupal7/modules/block/tests/block_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/block/tests/block_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/block/tests/block_test.info (original)
+++ branches/drupal7/modules/block/tests/block_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/blog/blog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/blog/blog.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/blog/blog.info (original)
+++ branches/drupal7/modules/blog/blog.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = blog.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/book/book.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/book/book.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/book/book.info (original)
+++ branches/drupal7/modules/book/book.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
configure = admin/content/book/settings
stylesheets[all][] = book.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/color/color.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/color/color.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/color/color.info (original)
+++ branches/drupal7/modules/color/color.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = color.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/color/color.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/color/color.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/color/color.module (original)
+++ branches/drupal7/modules/color/color.module Sun Sep 4 19:26:12 2011
@@ -314,7 +314,11 @@
// We need at least a copy of the source and a target buffer of the same
// size (both at 32bpp).
$required = $width * $height * 8;
- $usage = memory_get_usage();
+ // We intend to prevent color scheme changes if there isn't enough memory
+ // available. memory_get_usage(TRUE) returns a more accurate number than
+ // memory_get_usage(), therefore we won't inadvertently reject a color
+ // scheme change based on a faulty memory calculation.
+ $usage = memory_get_usage(TRUE);
$limit = parse_size(ini_get('memory_limit'));
if ($usage + $required > $limit) {
drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the <a href="@url">PHP documentation</a> for more information.', array('%size' => format_size($usage + $required - $limit), '@url' => 'http://www.php.net/manual/ini.core.php#ini.sect.resource-limits')), 'error');
Modified: branches/drupal7/modules/comment/comment.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/comment/comment.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/comment/comment.info (original)
+++ branches/drupal7/modules/comment/comment.info Sun Sep 4 19:26:12 2011
@@ -9,8 +9,8 @@
configure = admin/content/comment
stylesheets[all][] = comment.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/comment/comment.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/comment/comment.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/comment/comment.install (original)
+++ branches/drupal7/modules/comment/comment.install Sun Sep 4 19:26:12 2011
@@ -83,14 +83,16 @@
* Implements hook_update_dependencies().
*/
function comment_update_dependencies() {
- // Comment update 7005 creates the comment body field and therefore must run
- // after text module has been enabled and entities have been updated.
+ // comment_update_7005() creates the comment body field and therefore must
+ // run after all Field modules have been enabled, which happens in
+ // system_update_7027().
$dependencies['comment'][7005] = array(
- 'system' => 7021,
- );
-
- // Comment update 7006 needs to query the list of existing text formats and
- // therefore must run after filter_update_7000().
+ 'system' => 7027,
+ );
+
+ // comment_update_7006() needs to query the {filter_format} table to get a
+ // list of existing text formats, so it must run after filter_update_7000(),
+ // which creates that table.
$dependencies['comment'][7006] = array(
'filter' => 7000,
);
Modified: branches/drupal7/modules/contact/contact.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/contact/contact.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/contact/contact.info (original)
+++ branches/drupal7/modules/contact/contact.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = contact.test
configure = admin/structure/contact
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/contact/contact.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/contact/contact.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/contact/contact.install (original)
+++ branches/drupal7/modules/contact/contact.install Sun Sep 4 19:26:12 2011
@@ -89,6 +89,25 @@
}
/**
+ * Implements hook_update_dependencies().
+ */
+function contact_update_dependencies() {
+ // contact_update_7001() relies on the {role_permission} table being updated
+ // to the new format and filled with data.
+ $dependencies['contact'][7001] = array(
+ 'system' => 7007,
+ );
+
+ // contact_update_7002() relies on the {role_permission} table having the
+ // module field, which is created in user_update_7006().
+ $dependencies['contact'][7002] = array(
+ 'user' => 7006,
+ );
+
+ return $dependencies;
+}
+
+/**
* @addtogroup updates-6.x-to-7.x
* @{
*/
Modified: branches/drupal7/modules/contextual/contextual.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/contextual/contextual.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/contextual/contextual.info (original)
+++ branches/drupal7/modules/contextual/contextual.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
version = VERSION
core = 7.x
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/dashboard/dashboard.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/dashboard/dashboard.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/dashboard/dashboard.info (original)
+++ branches/drupal7/modules/dashboard/dashboard.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
dependencies[] = block
configure = admin/dashboard/customize
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/dblog/dblog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/dblog/dblog.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/dblog/dblog.info (original)
+++ branches/drupal7/modules/dblog/dblog.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = dblog.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/field.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/field.api.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/field.api.php (original)
+++ branches/drupal7/modules/field/field.api.php Sun Sep 4 19:26:12 2011
@@ -74,8 +74,8 @@
function hook_field_extra_fields_alter(&$info) {
// Force node title to always be at the top of the list by default.
foreach (node_type_get_types() as $bundle) {
- if (isset($info['node'][$bundle]['title'])) {
- $info['node'][$bundle]['title']['weight'] = -20;
+ if (isset($info['node'][$bundle->type]['title'])) {
+ $info['node'][$bundle->type]['title']['weight'] = -20;
}
}
}
@@ -675,10 +675,6 @@
* Widget hooks are typically called by the Field Attach API during the
* creation of the field form structure with field_attach_form().
*
- * @see hook_field_widget_info_alter()
- * @see hook_field_widget_form()
- * @see hook_field_widget_error()
- *
* @return
* An array describing the widget types implemented by the module.
* The keys are widget type names. To avoid name clashes, widget type
@@ -704,6 +700,12 @@
* - FIELD_BEHAVIOR_DEFAULT: (default) If the widget accepts default
* values.
* - FIELD_BEHAVIOR_NONE: if the widget does not support default values.
+ *
+ * @see hook_field_widget_info_alter()
+ * @see hook_field_widget_form()
+ * @see hook_field_widget_form_alter()
+ * @see hook_field_widget_WIDGET_TYPE_form_alter()
+ * @see hook_field_widget_error()
*/
function hook_field_widget_info() {
return array(
@@ -783,8 +785,8 @@
* properties from $field and $instance and set them as ad-hoc
* $element['#custom'] properties, for later use by its element callbacks.
*
- * @see field_widget_field()
- * @see field_widget_instance()
+ * Other modules may alter the form element provided by this function using
+ * hook_field_widget_form_alter().
*
* @param $form
* The form structure where widgets are being attached to. This might be a
@@ -826,6 +828,11 @@
*
* @return
* The form elements for a single widget for this field.
+ *
+ * @see field_widget_field()
+ * @see field_widget_instance()
+ * @see hook_field_widget_form_alter()
+ * @see hook_field_widget_WIDGET_TYPE_form_alter()
*/
function hook_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
$element += array(
@@ -833,6 +840,69 @@
'#default_value' => isset($items[$delta]) ? $items[$delta] : '',
);
return $element;
+}
+
+/**
+ * Alter forms for field widgets provided by other modules.
+ *
+ * @param $element
+ * The field widget form element as constructed by hook_field_widget_form().
+ * @param $form_state
+ * An associative array containing the current state of the form.
+ * @param $context
+ * An associative array containing the following key-value pairs, matching the
+ * arguments received by hook_field_widget_form():
+ * - "form": The form structure where widgets are being attached to. This
+ * might be a full form structure, or a sub-element of a larger form.
+ * - "field": The field structure.
+ * - "instance": The field instance structure.
+ * - "langcode": The language associated with $items.
+ * - "items": Array of default values for this field.
+ * - "delta": The order of this item in the array of subelements (0, 1, 2,
+ * etc).
+ *
+ * @see hook_field_widget_form()
+ * @see hook_field_widget_WIDGET_TYPE_form_alter
+ */
+function hook_field_widget_form_alter(&$element, &$form_state, $context) {
+ // Add a css class to widget form elements for all fields of type mytype.
+ if ($context['field']['type'] == 'mytype') {
+ // Be sure not to overwrite existing attributes.
+ $element['#attributes']['class'][] = 'myclass';
+ }
+}
+
+/**
+ * Alter widget forms for a specific widget provided by another module.
+ *
+ * Modules can implement hook_field_widget_WIDGET_TYPE_form_alter() to modify a
+ * specific widget form, rather than using hook_field_widget_form_alter() and
+ * checking the widget type.
+ *
+ * @param $element
+ * The field widget form element as constructed by hook_field_widget_form().
+ * @param $form_state
+ * An associative array containing the current state of the form.
+ * @param $context
+ * An associative array containing the following key-value pairs, matching the
+ * arguments received by hook_field_widget_form():
+ * - "form": The form structure where widgets are being attached to. This
+ * might be a full form structure, or a sub-element of a larger form.
+ * - "field": The field structure.
+ * - "instance": The field instance structure.
+ * - "langcode": The language associated with $items.
+ * - "items": Array of default values for this field.
+ * - "delta": The order of this item in the array of subelements (0, 1, 2,
+ * etc).
+ *
+ * @see hook_field_widget_form()
+ * @see hook_field_widget_form_alter()
+ */
+function hook_field_widget_WIDGET_TYPE_form_alter(&$element, &$form_state, $context) {
+ // Code here will only act on widgets of type WIDGET_TYPE. For example,
+ // hook_field_widget_mymodule_autocomplete_form_alter() will only act on
+ // widgets of type 'mymodule_autocomplete'.
+ $element['#autocomplete_path'] = 'mymodule/autocomplete_path';
}
/**
Modified: branches/drupal7/modules/field/field.default.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/field.default.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/field.default.inc (original)
+++ branches/drupal7/modules/field/field.default.inc Sun Sep 4 19:26:12 2011
@@ -168,17 +168,16 @@
}
/**
- * Builds a renderable array for field values.
+ * Builds a renderable array for one field on one entity instance.
*
* @param $entity_type
* The type of $entity; e.g. 'node' or 'user'.
- * @param $entities
- * An array of entities being displayed, keyed by entity id.
- * @param $field
- * The field structure for the operation.
- * @param $instances
- * Array of instance structures for $field for each entity, keyed by entity
- * id.
+ * @param $entity
+ * A single object of type $entity_type.
+ * @param $field
+ * The field structure for the operation.
+ * @param $instance
+ * An array containing each field on $entity's bundle.
* @param $langcode
* The language associated to $items.
* @param $items
Modified: branches/drupal7/modules/field/field.form.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/field.form.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/field.form.inc (original)
+++ branches/drupal7/modules/field/field.form.inc Sun Sep 4 19:26:12 2011
@@ -76,6 +76,17 @@
'#delta' => $delta,
);
if ($element = $function($form, $form_state, $field, $instance, $langcode, $items, $delta, $element)) {
+ // Allow modules to alter the field widget form element.
+ $context = array(
+ 'form' => $form,
+ 'field' => $field,
+ 'instance' => $instance,
+ 'langcode' => $langcode,
+ 'items' => $items,
+ 'delta' => $delta,
+ );
+ drupal_alter(array('field_widget_form', 'field_widget_' . $instance['widget']['type'] . '_form'), $element, $form_state, $context);
+
// If we're processing a specific delta value for a field where the
// field module handles multiples, set the delta in the result.
// For fields that handle their own processing, we can't make
@@ -193,6 +204,18 @@
'#weight' => 100,
);
}
+
+ // Allow modules to alter the field widget form element.
+ $context = array(
+ 'form' => $form,
+ 'field' => $field,
+ 'instance' => $instance,
+ 'langcode' => $langcode,
+ 'items' => $items,
+ 'delta' => $delta,
+ );
+ drupal_alter(array('field_widget_form', 'field_widget_' . $instance['widget']['type'] . '_form'), $element, $form_state, $context);
+
$field_elements[$delta] = $element;
}
}
Modified: branches/drupal7/modules/field/field.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/field.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/field.info (original)
+++ branches/drupal7/modules/field/field.info Sun Sep 4 19:26:12 2011
@@ -10,8 +10,8 @@
required = TRUE
stylesheets[all][] = theme/field.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/field.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/field.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/field.module (original)
+++ branches/drupal7/modules/field/field.module Sun Sep 4 19:26:12 2011
@@ -306,13 +306,6 @@
class FieldUpdateForbiddenException extends FieldException {}
/**
- * Implements hook_flush_caches().
- */
-function field_flush_caches() {
- return array('cache_field');
-}
-
-/**
* Implements hook_help().
*/
function field_help($path, $arg) {
@@ -370,6 +363,7 @@
* Purges some deleted Field API data, if any exists.
*/
function field_cron() {
+ field_sync_field_status();
$limit = variable_get('field_purge_batch_size', 10);
field_purge_batch($limit);
}
@@ -386,45 +380,84 @@
}
/**
- * Implements hook_modules_enabled().
- */
-function field_modules_enabled($modules) {
- foreach ($modules as $module) {
- field_associate_fields($module);
- }
- field_cache_clear();
-}
-
-/**
- * Implements hook_modules_disabled().
- */
-function field_modules_disabled($modules) {
- // Track fields whose field type is being disabled.
+ * Implements hook_system_info_alter().
+ *
+ * Goes through a list of all modules that provide a field type, and makes them
+ * required if there are any active fields of that type.
+ */
+function field_system_info_alter(&$info, $file, $type) {
+ if ($type == 'module' && module_hook($file->name, 'field_info')) {
+ $fields = field_read_fields(array('module' => $file->name), array('include_deleted' => TRUE));
+ if ($fields) {
+ $info['required'] = TRUE;
+
+ // Provide an explanation message (only mention pending deletions if there
+ // remains no actual, non-deleted fields)
+ $non_deleted = FALSE;
+ foreach ($fields as $field) {
+ if (empty($field['deleted'])) {
+ $non_deleted = TRUE;
+ break;
+ }
+ }
+ if ($non_deleted) {
+ if (module_exists('field_ui')) {
+ $explanation = t('Field type(s) in use - see !link', array('!link' => l(t('Field list'), 'admin/reports/fields')));
+ }
+ else {
+ $explanation = t('Fields type(s) in use');
+ }
+ }
+ else {
+ $explanation = t('Fields pending deletion');
+ }
+ $info['explanation'] = $explanation;
+ }
+ }
+}
+
+/**
+ * Implements hook_flush_caches().
+ */
+function field_flush_caches() {
+ field_sync_field_status();
+ return array('cache_field');
+}
+
+/**
+ * Refreshes the 'active' and 'storage_active' columns for fields.
+ */
+function field_sync_field_status() {
+ // Refresh the 'active' and 'storage_active' columns according to the current
+ // set of enabled modules.
+ $all_modules = system_rebuild_module_data();
+ $modules = array();
+ foreach ($all_modules as $module_name => $module) {
+ if ($module->status) {
+ $modules[] = $module_name;
+ field_associate_fields($module_name);
+ }
+ }
db_update('field_config')
->fields(array('active' => 0))
- ->condition('module', $modules, 'IN')
+ ->condition('module', $modules, 'NOT IN')
->execute();
-
- // Track fields whose storage backend is being disabled.
db_update('field_config')
->fields(array('storage_active' => 0))
- ->condition('storage_module', $modules, 'IN')
+ ->condition('storage_module', $modules, 'NOT IN')
->execute();
-
- field_cache_clear();
}
/**
* Allows a module to update the database for fields and columns it controls.
*
- * @param string $module
+ * @param $module
* The name of the module to update on.
*/
function field_associate_fields($module) {
// Associate field types.
- $field_types =(array) module_invoke($module, 'field_info');
+ $field_types = (array) module_invoke($module, 'field_info');
foreach ($field_types as $name => $field_info) {
- watchdog('field', 'Updating field type %type with module %module.', array('%type' => $name, '%module' => $module));
db_update('field_config')
->fields(array('module' => $module, 'active' => 1))
->condition('type', $name)
@@ -433,7 +466,6 @@
// Associate storage backends.
$storage_types = (array) module_invoke($module, 'field_storage_info');
foreach ($storage_types as $name => $storage_info) {
- watchdog('field', 'Updating field storage %type with module %module.', array('%type' => $name, '%module' => $module));
db_update('field_config')
->fields(array('storage_module' => $module, 'storage_active' => 1))
->condition('storage_type', $name)
@@ -1176,31 +1208,37 @@
}
/**
- * Helper form element validator: integer.
+ * DEPRECATED: Helper form element validator: integer.
+ *
+ * Use element_validate_integer() instead.
+ *
+ * @deprecated
+ * @see element_validate_integer()
*/
function _element_validate_integer($element, &$form_state) {
- $value = $element['#value'];
- if ($value !== '' && (!is_numeric($value) || intval($value) != $value)) {
- form_error($element, t('%name must be an integer.', array('%name' => $element['#title'])));
- }
-}
-
-/**
- * Helper form element validator: integer > 0.
+ element_validate_integer($element, $form_state);
+}
+
+/**
+ * DEPRECATED: Helper form element validator: integer > 0.
+ *
+ * Use element_validate_integer_positive() instead.
+ *
+ * @deprecated
+ * @see element_validate_number_positive()
*/
function _element_validate_integer_positive($element, &$form_state) {
- $value = $element['#value'];
- if ($value !== '' && (!is_numeric($value) || intval($value) != $value || $value <= 0)) {
- form_error($element, t('%name must be a positive integer.', array('%name' => $element['#title'])));
- }
-}
-
-/**
- * Helper form element validator: number.
+ element_validate_integer_positive($element, $form_state);
+}
+
+/**
+ * DEPRECATED: Helper form element validator: number.
+ *
+ * Use element_validate_number() instead.
+ *
+ * @deprecated
+ * @see element_validate_number()
*/
function _element_validate_number($element, &$form_state) {
- $value = $element['#value'];
- if ($value != '' && !is_numeric($value)) {
- form_error($element, t('%name must be a number.', array('%name' => $element['#title'])));
- }
-}
+ element_validate_number($element, $form_state);
+}
Modified: branches/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info (original)
+++ branches/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
files[] = field_sql_storage.test
required = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/list/list.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/list/list.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/list/list.info (original)
+++ branches/drupal7/modules/field/modules/list/list.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
dependencies[] = options
files[] = tests/list.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/list/tests/list_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/list/tests/list_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/list/tests/list_test.info (original)
+++ branches/drupal7/modules/field/modules/list/tests/list_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/number/number.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/number/number.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/number/number.info (original)
+++ branches/drupal7/modules/field/modules/number/number.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = field
files[] = number.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/number/number.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/number/number.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/number/number.module (original)
+++ branches/drupal7/modules/field/modules/number/number.module Sun Sep 4 19:26:12 2011
@@ -98,14 +98,14 @@
'#title' => t('Minimum'),
'#default_value' => $settings['min'],
'#description' => t('The minimum value that should be allowed in this field. Leave blank for no minimum.'),
- '#element_validate' => array('_element_validate_number'),
+ '#element_validate' => array('element_validate_number'),
);
$form['max'] = array(
'#type' => 'textfield',
'#title' => t('Maximum'),
'#default_value' => $settings['max'],
'#description' => t('The maximum value that should be allowed in this field. Leave blank for no maximum.'),
- '#element_validate' => array('_element_validate_number'),
+ '#element_validate' => array('element_validate_number'),
);
$form['prefix'] = array(
'#type' => 'textfield',
Modified: branches/drupal7/modules/field/modules/options/options.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/options/options.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/options/options.info (original)
+++ branches/drupal7/modules/field/modules/options/options.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = field
files[] = options.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/text/text.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/text/text.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/text/text.info (original)
+++ branches/drupal7/modules/field/modules/text/text.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
files[] = text.test
required = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field/modules/text/text.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/text/text.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/text/text.install (original)
+++ branches/drupal7/modules/field/modules/text/text.install Sun Sep 4 19:26:12 2011
@@ -67,19 +67,6 @@
}
/**
- * Implements hook_update_dependencies().
- */
-function text_update_dependencies() {
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['text'][7000] = array(
- 'filter' => 7010,
- );
-
- return $dependencies;
-}
-
-/**
* Change text field 'format' columns into varchar.
*/
function text_update_7000() {
Modified: branches/drupal7/modules/field/modules/text/text.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/modules/text/text.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/modules/text/text.module (original)
+++ branches/drupal7/modules/field/modules/text/text.module Sun Sep 4 19:26:12 2011
@@ -71,7 +71,7 @@
'#default_value' => $settings['max_length'],
'#required' => TRUE,
'#description' => t('The maximum length of the field in characters.'),
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
// @todo: If $has_data, add a validate handler that only allows
// max_length to increase.
'#disabled' => $has_data,
@@ -227,7 +227,7 @@
'#type' => 'textfield',
'#size' => 10,
'#default_value' => $settings['trim_length'],
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
'#required' => TRUE,
);
}
@@ -480,7 +480,7 @@
'#title' => t('Size of textfield'),
'#default_value' => $settings['size'],
'#required' => TRUE,
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
);
}
else {
@@ -489,7 +489,7 @@
'#title' => t('Rows'),
'#default_value' => $settings['rows'],
'#required' => TRUE,
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
);
}
Modified: branches/drupal7/modules/field/tests/field.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/tests/field.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/tests/field.test (original)
+++ branches/drupal7/modules/field/tests/field.test Sun Sep 4 19:26:12 2011
@@ -2356,6 +2356,7 @@
$this->assertTrue($field_definition <= $field, t('The field was properly read.'));
module_disable($modules, FALSE);
+ drupal_flush_all_caches();
$fields = field_read_fields(array('field_name' => $field_name), array('include_inactive' => TRUE));
$this->assertTrue(isset($fields[$field_name]) && $field_definition < $field, t('The field is properly read when explicitly fetching inactive fields.'));
@@ -2368,6 +2369,7 @@
$module = array_shift($modules);
module_enable(array($module), FALSE);
+ drupal_flush_all_caches();
}
// Check that the field is active again after all modules have been
Modified: branches/drupal7/modules/field/tests/field_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field/tests/field_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field/tests/field_test.info (original)
+++ branches/drupal7/modules/field/tests/field_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/field_ui/field_ui.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field_ui/field_ui.admin.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field_ui/field_ui.admin.inc (original)
+++ branches/drupal7/modules/field_ui/field_ui.admin.inc Sun Sep 4 19:26:12 2011
@@ -12,17 +12,27 @@
$instances = field_info_instances();
$field_types = field_info_field_types();
$bundles = field_info_bundles();
+
+ $modules = system_rebuild_module_data();
+
$header = array(t('Field name'), t('Field type'), t('Used in'));
$rows = array();
foreach ($instances as $entity_type => $type_bundles) {
foreach ($type_bundles as $bundle => $bundle_instances) {
foreach ($bundle_instances as $field_name => $instance) {
$field = field_info_field($field_name);
+
+ // Initialize the row if we encounter the field for the first time.
+ if (!isset($rows[$field_name])) {
+ $rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
+ $rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
+ $module_name = $field_types[$field['type']]['module'];
+ $rows[$field_name]['data'][1] = $field_types[$field['type']]['label'] . ' ' . t('(module: !module)', array('!module' => $modules[$module_name]->info['name']));
+ }
+
+ // Add the current instance.
$admin_path = _field_ui_bundle_admin_path($entity_type, $bundle);
- $rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
- $rows[$field_name]['data'][1] = $field_types[$field['type']]['label'];
$rows[$field_name]['data'][2][] = $admin_path ? l($bundles[$entity_type][$bundle]['label'], $admin_path . '/fields') : $bundles[$entity_type][$bundle]['label'];
- $rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
}
}
}
@@ -1717,6 +1727,14 @@
$admin_path = _field_ui_bundle_admin_path($entity_type, $bundle);
$form_state['redirect'] = field_ui_get_destinations(array($admin_path . '/fields'));
+
+ // Fields are purged on cron. However field module prevents disabling modules
+ // when field types they provided are used in a field until it is fully
+ // purged. In the case that a field has minimal or no content, a single call
+ // to field_purge_batch() will remove it from the system. Call this with a
+ // low batch limit to avoid administrators having to wait for cron runs when
+ // removing instances that meet this criteria.
+ field_purge_batch(10);
}
/**
Modified: branches/drupal7/modules/field_ui/field_ui.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field_ui/field_ui.api.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field_ui/field_ui.api.php (original)
+++ branches/drupal7/modules/field_ui/field_ui.api.php Sun Sep 4 19:26:12 2011
@@ -42,7 +42,7 @@
'#title' => t('Maximum length'),
'#default_value' => $settings['max_length'],
'#required' => FALSE,
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
'#description' => t('The maximum length of the field in characters. Leave blank for an unlimited size.'),
);
return $form;
@@ -113,7 +113,7 @@
'#type' => 'textfield',
'#title' => t('Size of textfield'),
'#default_value' => $settings['size'],
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
'#required' => TRUE,
);
}
@@ -122,7 +122,7 @@
'#type' => 'textfield',
'#title' => t('Rows'),
'#default_value' => $settings['rows'],
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
'#required' => TRUE,
);
}
@@ -160,7 +160,7 @@
'#type' => 'textfield',
'#size' => 20,
'#default_value' => $settings['trim_length'],
- '#element_validate' => array('_element_validate_integer_positive'),
+ '#element_validate' => array('element_validate_integer_positive'),
'#required' => TRUE,
);
}
Modified: branches/drupal7/modules/field_ui/field_ui.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/field_ui/field_ui.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/field_ui/field_ui.info (original)
+++ branches/drupal7/modules/field_ui/field_ui.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = field
files[] = field_ui.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/file/file.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/file/file.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/file/file.info (original)
+++ branches/drupal7/modules/file/file.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = field
files[] = tests/file.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/file/tests/file.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/file/tests/file.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/file/tests/file.test (original)
+++ branches/drupal7/modules/file/tests/file.test Sun Sep 4 19:26:12 2011
@@ -1104,6 +1104,6 @@
$this->assertResponse(200, t('Confirmed that the generated URL is correct by downloading the shipped file.'));
$this->drupalLogOut();
$this->drupalGet(file_create_url($node_file->uri));
- $this->assertNoResponse(200, t('Confirmed that access is denied for the file without the needed permission.'));
+ $this->assertResponse(403, t('Confirmed that access is denied for the file without the needed permission.'));
}
}
Modified: branches/drupal7/modules/file/tests/file_module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/file/tests/file_module_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/file/tests/file_module_test.info (original)
+++ branches/drupal7/modules/file/tests/file_module_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/filter/filter.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/filter/filter.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/filter/filter.info (original)
+++ branches/drupal7/modules/filter/filter.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
required = TRUE
configure = admin/config/content/formats
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/filter/filter.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/filter/filter.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/filter/filter.install (original)
+++ branches/drupal7/modules/filter/filter.install Sun Sep 4 19:26:12 2011
@@ -152,8 +152,9 @@
* Implements hook_update_dependencies().
*/
function filter_update_dependencies() {
- // Filter update 7007 migrates permissions and therefore needs to run after
- // the {role} table is properly set up.
+ // filter_update_7005() migrates role permissions and therefore must run
+ // after the {role} and {role_permission} tables are properly set up, which
+ // happens in user_update_7007().
$dependencies['filter'][7005] = array(
'user' => 7007,
);
Modified: branches/drupal7/modules/filter/filter.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/filter/filter.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/filter/filter.module (original)
+++ branches/drupal7/modules/filter/filter.module Sun Sep 4 19:26:12 2011
@@ -671,7 +671,8 @@
if (!isset($filters[$format_id])) {
$format_filters = array();
- foreach ($filters['all'][$format_id] as $name => $filter) {
+ $filter_map = isset($filters['all'][$format_id]) ? $filters['all'][$format_id] : array();
+ foreach ($filter_map as $name => $filter) {
if (isset($filter_info[$name])) {
$filter->title = $filter_info[$name]['title'];
// Unpack stored filter settings.
@@ -759,9 +760,12 @@
}
}
- // Store in cache with a minimum expiration time of 1 day.
+ // Cache the filtered text. This cache is infinitely valid. It becomes
+ // obsolete when $text changes (which leads to a new $cache_id). It is
+ // automatically flushed when the text format is updated.
+ // @see filter_format_save()
if ($cache) {
- cache_set($cache_id, $text, 'cache_filter', REQUEST_TIME + (60 * 60 * 24));
+ cache_set($cache_id, $text, 'cache_filter');
}
return $text;
Modified: branches/drupal7/modules/forum/forum-list.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum-list.tpl.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum-list.tpl.php (original)
+++ branches/drupal7/modules/forum/forum-list.tpl.php Sun Sep 4 19:26:12 2011
@@ -15,6 +15,8 @@
* FALSE if the forum can contain only topics.
* - $forum->depth: How deep the forum is in the current hierarchy.
* - $forum->zebra: 'even' or 'odd' string used for row class.
+ * - $forum->icon_class: 'default' or 'new' string used for forum icon class.
+ * - $forum->icon_title: Text alternative for the forum icon.
* - $forum->name: The name of the forum.
* - $forum->link: The URL to link to this forum.
* - $forum->description: The description of this forum.
@@ -48,6 +50,9 @@
* left-margin for indenting.
*/ ?>
<?php print str_repeat('<div class="indent">', $forum->depth); ?>
+ <div class="icon forum-status-<?php print $forum->icon_class; ?>" title="<?php print $forum->icon_title; ?>">
+ <span class="element-invisible"><?php print $forum->icon_title; ?></span>
+ </div>
<div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->name; ?></a></div>
<?php if ($forum->description): ?>
<div class="description"><?php print $forum->description; ?></div>
Modified: branches/drupal7/modules/forum/forum-rtl.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum-rtl.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum-rtl.css (original)
+++ branches/drupal7/modules/forum/forum-rtl.css Sun Sep 4 19:26:12 2011
@@ -1,8 +1,7 @@
-#forum tr td.forum {
- padding-left: 0.5em;
- padding-right: 25px;
- background-position: 98% 2px;
+#forum td.forum .icon {
+ float: right;
+ margin: 0 0 0 9px;
}
.forum-topic-navigation {
padding: 1em 3em 0 0;
Modified: branches/drupal7/modules/forum/forum.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum.css (original)
+++ branches/drupal7/modules/forum/forum.css Sun Sep 4 19:26:12 2011
@@ -11,15 +11,19 @@
#forum td.pager {
white-space: nowrap;
}
-#forum tr td.forum {
- padding-left: 25px; /* LTR */
- background-position: 2px 2px; /* LTR */
- background-image: url(../../misc/forum-default.png);
+
+#forum td.forum .icon {
+ background-image: url(../../misc/forum-icons.png);
background-repeat: no-repeat;
+ float: left; /* LTR */
+ height: 24px;
+ margin: 0 9px 0 0; /* LTR */
+ width: 24px;
}
-#forum tr.new-topics td.forum {
- background-image: url(../../misc/forum-new.png);
+#forum td.forum .forum-status-new {
+ background-position: -24px 0;
}
+
#forum div.indent {
margin-left: 20px;
}
Modified: branches/drupal7/modules/forum/forum.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum.info (original)
+++ branches/drupal7/modules/forum/forum.info Sun Sep 4 19:26:12 2011
@@ -9,8 +9,8 @@
configure = admin/structure/forum
stylesheets[all][] = forum.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/forum/forum.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum.install (original)
+++ branches/drupal7/modules/forum/forum.install Sun Sep 4 19:26:12 2011
@@ -113,6 +113,11 @@
variable_del('forum_block_num_active');
variable_del('forum_block_num_new');
variable_del('node_options_forum');
+
+ field_delete_field('taxonomy_forums');
+ // Purge field data now to allow taxonomy module to be uninstalled
+ // if this is the only field remaining.
+ field_purge_batch(10);
}
/**
Modified: branches/drupal7/modules/forum/forum.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum.module (original)
+++ branches/drupal7/modules/forum/forum.module Sun Sep 4 19:26:12 2011
@@ -370,7 +370,7 @@
}
// If the node has a shadow forum topic, update the record for this
// revision.
- if ($node->shadow) {
+ if (!empty($node->shadow)) {
db_delete('forum')
->condition('nid', $node->nid)
->condition('vid', $node->vid)
@@ -1064,11 +1064,15 @@
$variables['forums'][$id]->new_url = '';
$variables['forums'][$id]->new_topics = 0;
$variables['forums'][$id]->old_topics = $forum->num_topics;
+ $variables['forums'][$id]->icon_class = 'default';
+ $variables['forums'][$id]->icon_title = t('No new posts');
if ($user->uid) {
$variables['forums'][$id]->new_topics = _forum_topics_unread($forum->tid, $user->uid);
if ($variables['forums'][$id]->new_topics) {
$variables['forums'][$id]->new_text = format_plural($variables['forums'][$id]->new_topics, '1 new', '@count new');
$variables['forums'][$id]->new_url = url("forum/$forum->tid", array('fragment' => 'new'));
+ $variables['forums'][$id]->icon_class = 'new';
+ $variables['forums'][$id]->icon_title = t('New posts');
}
$variables['forums'][$id]->old_topics = $forum->num_topics - $variables['forums'][$id]->new_topics;
}
Modified: branches/drupal7/modules/forum/forum.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/forum/forum.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/forum/forum.test (original)
+++ branches/drupal7/modules/forum/forum.test Sun Sep 4 19:26:12 2011
@@ -31,6 +31,7 @@
// Create users.
$this->admin_user = $this->drupalCreateUser(array(
'access administration pages',
+ 'administer modules',
'administer blocks',
'administer forums',
'administer menu',
@@ -49,6 +50,30 @@
'delete own forum content',
));
$this->web_user = $this->drupalCreateUser(array());
+ }
+
+ /**
+ * Tests disabling and re-enabling forum.
+ */
+ function testEnableForumField() {
+ $this->drupalLogin($this->admin_user);
+
+ // Disable the forum module.
+ $edit = array();
+ $edit['modules[Core][forum][enable]'] = FALSE;
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
+ module_list(TRUE);
+ $this->assertFalse(module_exists('forum'), t('Forum module is not enabled.'));
+
+ // Attempt to re-enable the forum module and ensure it does not try to
+ // recreate the taxonomy_forums field.
+ $edit = array();
+ $edit['modules[Core][forum][enable]'] = 'forum';
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
+ module_list(TRUE);
+ $this->assertTrue(module_exists('forum'), t('Forum module is enabled.'));
}
/**
Modified: branches/drupal7/modules/help/help.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/help/help.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/help/help.info (original)
+++ branches/drupal7/modules/help/help.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = help.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/image/image.field.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/image/image.field.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/image/image.field.inc (original)
+++ branches/drupal7/modules/image/image.field.inc Sun Sep 4 19:26:12 2011
@@ -547,7 +547,7 @@
$output = theme('image', $image);
}
- if ($variables['path']) {
+ if (!empty($variables['path']['path'])) {
$path = $variables['path']['path'];
$options = $variables['path']['options'];
// When displaying an image inside a link, the html option must be TRUE.
Modified: branches/drupal7/modules/image/image.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/image/image.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/image/image.info (original)
+++ branches/drupal7/modules/image/image.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
files[] = image.test
configure = admin/config/media/image-styles
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/image/tests/image_module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/image/tests/image_module_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/image/tests/image_module_test.info (original)
+++ branches/drupal7/modules/image/tests/image_module_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = image_module_test.module
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/locale/locale.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/locale/locale.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/locale/locale.info (original)
+++ branches/drupal7/modules/locale/locale.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = locale.test
configure = admin/config/regional/language
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/locale/tests/locale_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/locale/tests/locale_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/locale/tests/locale_test.info (original)
+++ branches/drupal7/modules/locale/tests/locale_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/menu/menu.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/menu/menu.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/menu/menu.info (original)
+++ branches/drupal7/modules/menu/menu.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = menu.test
configure = admin/structure/menu
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/menu/menu.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/menu/menu.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/menu/menu.install (original)
+++ branches/drupal7/modules/menu/menu.install Sun Sep 4 19:26:12 2011
@@ -120,6 +120,8 @@
}
// Rename each menu, and any settings that refer to the old menu name.
+ // - "Primary Links" has become system menu "Main menu".
+ // - "Secondary Links" has become a new custom menu "Secondary menu".
$rename = array(
'primary-links' => array('main-menu', 'Main menu'),
'secondary-links' => array('secondary-menu', 'Secondary menu'),
@@ -161,6 +163,23 @@
}
/**
+ * Rename the primary/secondary menu blocks to match previously renamed menus.
+ */
+function menu_update_7002(&$sandbox) {
+ $renamed_deltas = array(
+ 'menu' => array(
+ 'primary-links' => 'main-menu',
+ 'secondary-links' => 'secondary-menu',
+ ),
+ );
+
+ $moved_deltas = array(
+ 'menu' => array('main-menu' => 'system'),
+ );
+
+ update_fix_d7_block_deltas($sandbox, $renamed_deltas, $moved_deltas);
+}
+/**
* @} End of "defgroup updates-7.x-extra"
* The next series of updates should start at 8000.
*/
Modified: branches/drupal7/modules/node/node.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/node.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/node.info (original)
+++ branches/drupal7/modules/node/node.info Sun Sep 4 19:26:12 2011
@@ -9,8 +9,8 @@
configure = admin/structure/types
stylesheets[all][] = node.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/node/node.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/node.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/node.install (original)
+++ branches/drupal7/modules/node/node.install Sun Sep 4 19:26:12 2011
@@ -447,17 +447,23 @@
* Implements hook_update_dependencies().
*/
function node_update_dependencies() {
- // Node update 7006 migrates node data to fields and therefore must run after
- // the Field module has been enabled, but before upgrading field data.
+ // node_update_7006() migrates node data to fields and therefore must run
+ // after all Field modules have been enabled, which happens in
+ // system_update_7027(). It also needs to query the {filter_format} table to
+ // get a list of existing text formats, so it must run after
+ // filter_update_7000(), which creates that table.
$dependencies['node'][7006] = array(
- 'system' => 7049,
- // It must also run after filter_update_7000() because it needs to query
- // the list of existing text formats.
+ 'system' => 7027,
'filter' => 7000,
);
- $dependencies['system'][7050] = array(
- 'node' => 7006,
+
+ // node_update_7008() migrates role permissions and therefore must run after
+ // the {role} and {role_permission} tables are properly set up, which happens
+ // in user_update_7007().
+ $dependencies['node'][7008] = array(
+ 'user' => 7007,
);
+
return $dependencies;
}
@@ -610,6 +616,7 @@
'module' => 'text',
'cardinality' => 1,
'entity_types' => array('node'),
+ 'translatable' => TRUE,
);
_update_7000_field_create_field($body_field);
@@ -861,5 +868,37 @@
}
/**
+ * Switches body fields to untranslatable while upgrading from D6 and makes them language neutral.
+ */
+function node_update_7012() {
+ // If we are upgrading from D6, then body fields should be set back to
+ // untranslatable, as D6 did not know about the idea of translating fields,
+ // but only nodes. If a D7 > D7 update is running we need to skip this update,
+ // as it is a valid use case to have translatable body fields in this context.
+ if (variable_get('update_d6', FALSE)) {
+ // Make node bodies untranslatable: field_update_field() cannot be used
+ // throughout the upgrade process and we do not have an update counterpart
+ // for _update_7000_field_create_field(). Hence we are forced to update the
+ // 'field_config' table directly. This is a safe operation since it is
+ // being performed while upgrading from D6. Perfoming the same operation
+ // during a D7 update is highly discouraged.
+ db_update('field_config')
+ ->fields(array('translatable' => 0))
+ ->condition('field_name', 'body')
+ ->execute();
+
+ // Switch field languages to LANGUAGE_NONE, since initially they were
+ // assigned $node->language.
+ foreach (array('field_data_body', 'field_revision_body') as $table) {
+ db_update($table)
+ ->fields(array('language' => LANGUAGE_NONE))
+ ->execute();
+ }
+
+ node_type_cache_reset();
+ }
+}
+
+/**
* @} End of "addtogroup updates-6.x-to-7.x"
*/
Modified: branches/drupal7/modules/node/node.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/node.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/node.module (original)
+++ branches/drupal7/modules/node/node.module Sun Sep 4 19:26:12 2011
@@ -2075,6 +2075,15 @@
return $node->title;
}
+/**
+ * Finds the last time a node was changed.
+ *
+ * @param $nid
+ * The ID of a node.
+ *
+ * @return
+ * A unix timestamp indicating the last time the node was changed.
+ */
function node_last_changed($nid) {
return db_query('SELECT changed FROM {node} WHERE nid = :nid', array(':nid' => $nid))->fetch()->changed;
}
@@ -2785,8 +2794,9 @@
* hook_node_access() is not called on each node for performance reasons and for
* proper functioning of the pager system. When adding a node listing to your
* module, be sure to use a dynamic query created by db_select() and add a tag
- * of "node_access" to ensure that only nodes to which the user has access
- * are retrieved.
+ * of "node_access". This will allow modules dealing with node access to ensure
+ * only nodes to which the user has access are retrieved, through the use of
+ * hook_query_TAG_alter().
*
* Note: Even a single module returning NODE_ACCESS_DENY from hook_node_access()
* will block access to the node. Therefore, implementers should take care to
Modified: branches/drupal7/modules/node/node.pages.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/node.pages.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/node.pages.inc (original)
+++ branches/drupal7/modules/node/node.pages.inc Sun Sep 4 19:26:12 2011
@@ -7,7 +7,7 @@
/**
- * Menu callback; presents the node editing form, or redirects to delete confirmation.
+ * Menu callback; presents the node editing form.
*/
function node_page_edit($node) {
$type_name = node_type_get_name($node);
Modified: branches/drupal7/modules/node/tests/node_access_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/tests/node_access_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/tests/node_access_test.info (original)
+++ branches/drupal7/modules/node/tests/node_access_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/node/tests/node_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/tests/node_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/tests/node_test.info (original)
+++ branches/drupal7/modules/node/tests/node_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/node/tests/node_test_exception.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/node/tests/node_test_exception.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/node/tests/node_test_exception.info (original)
+++ branches/drupal7/modules/node/tests/node_test_exception.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/openid/openid.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/openid/openid.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/openid/openid.info (original)
+++ branches/drupal7/modules/openid/openid.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = openid.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/openid/tests/openid_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/openid/tests/openid_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/openid/tests/openid_test.info (original)
+++ branches/drupal7/modules/openid/tests/openid_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = openid
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/overlay/overlay-child.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/overlay/overlay-child.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/overlay/overlay-child.css (original)
+++ branches/drupal7/modules/overlay/overlay-child.css Sun Sep 4 19:26:12 2011
@@ -17,7 +17,7 @@
min-width: 700px;
position: relative;
padding: .2em;
- padding-right: 26px;
+ padding-right: 26px; /* LTR */
width: 88%;
}
#overlay-titlebar {
@@ -39,7 +39,7 @@
}
#overlay-title {
color: #fff;
- float: left;
+ float: left; /* LTR */
font-size: 20px;
margin: 0;
padding: 0.3em 0;
@@ -58,14 +58,14 @@
#overlay-close-wrapper {
position: absolute;
- right: 0;
+ right: 0; /* LTR */
}
#overlay-close,
#overlay-close:hover {
- background: transparent url(images/close.png) no-repeat;
- -moz-border-radius-topleft: 0;
- -webkit-border-top-left-radius: 0;
- border-top-left-radius: 0;
+ background: transparent url(images/close.png) no-repeat; /* LTR */
+ -moz-border-radius-topleft: 0; /* LTR */
+ -webkit-border-top-left-radius: 0; /* LTR */
+ border-top-left-radius: 0; /* LTR */
display: block;
height: 26px;
margin: 0;
@@ -82,13 +82,13 @@
line-height: 27px;
margin: -28px 0 0 0;
position: absolute;
- right: 20px;
+ right: 20px; /* LTR */
text-transform: uppercase;
}
#overlay-tabs li {
display: inline;
list-style: none;
- margin: 0 0 0 -3px;
+ margin: 0 0 0 -3px; /* LTR */
padding: 0;
}
#overlay-tabs li a,
Modified: branches/drupal7/modules/overlay/overlay-parent.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/overlay/overlay-parent.js?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/overlay/overlay-parent.js (original)
+++ branches/drupal7/modules/overlay/overlay-parent.js Sun Sep 4 19:26:12 2011
@@ -346,6 +346,10 @@
* TRUE if the URL represents an administrative link, FALSE otherwise.
*/
Drupal.overlay.isAdminLink = function (url) {
+ if (Drupal.overlay.isExternalLink(url)) {
+ return false;
+ }
+
var path = this.getPath(url);
// Turn the list of administrative paths into a regular expression.
@@ -363,6 +367,20 @@
};
/**
+ * Determine whether a link is external to the site.
+ *
+ * @param url
+ * The url to be tested.
+ *
+ * @return boolean
+ * TRUE if the URL is external to the site, FALSE otherwise.
+ */
+Drupal.overlay.isExternalLink = function (url) {
+ var re = RegExp('^((f|ht)tps?:)?//(?!' + window.location.host + ')');
+ return re.test(url);
+};
+
+/**
* Event handler: resizes overlay according to the size of the parent window.
*
* @param event
@@ -412,6 +430,27 @@
var documentWidth = this.iframeWindow.document.body.clientWidth;
// IE6 doesn't support maxWidth, use width instead.
var maxWidthName = (typeof document.body.style.maxWidth == 'string') ? 'maxWidth' : 'width';
+
+ if (Drupal.overlay.leftSidedScrollbarOffset === undefined && $(document.documentElement).attr('dir') === 'rtl') {
+ // We can't use element.clientLeft to detect whether scrollbars are placed
+ // on the left side of the element when direction is set to "rtl" as most
+ // browsers dont't support it correctly.
+ // http://www.gtalbot.org/BugzillaSection/DocumentAllDHTMLproperties.html
+ // There seems to be absolutely no way to detect whether the scrollbar
+ // is on the left side in Opera; always expect scrollbar to be on the left.
+ if ($.browser.opera) {
+ Drupal.overlay.leftSidedScrollbarOffset = document.documentElement.clientWidth - this.iframeWindow.document.documentElement.clientWidth + this.iframeWindow.document.documentElement.clientLeft;
+ }
+ else if (this.iframeWindow.document.documentElement.clientLeft) {
+ Drupal.overlay.leftSidedScrollbarOffset = this.iframeWindow.document.documentElement.clientLeft;
+ }
+ else {
+ var el1 = $('<div style="direction: rtl; overflow: scroll;"></div>').appendTo(document.body);
+ var el2 = $('<div></div>').appendTo(el1);
+ Drupal.overlay.leftSidedScrollbarOffset = parseInt(el2[0].offsetLeft - el1[0].offsetLeft);
+ el1.remove();
+ }
+ }
// Consider any element that should be visible above the overlay (such as
// a toolbar).
@@ -423,6 +462,10 @@
maxWidth -= 1;
}
+ if (Drupal.overlay.leftSidedScrollbarOffset) {
+ $(this).css('left', Drupal.overlay.leftSidedScrollbarOffset);
+ }
+
// Prevent displaced elements overlapping window's scrollbar.
var currentMaxWidth = parseInt($(this).css(maxWidthName));
if ((data.drupalOverlay && data.drupalOverlay.maxWidth) || isNaN(currentMaxWidth) || currentMaxWidth > maxWidth || currentMaxWidth <= 0) {
@@ -435,7 +478,12 @@
var offset = $(this).offset();
var offsetRight = offset.left + $(this).outerWidth();
if ((data.drupalOverlay && data.drupalOverlay.clip) || offsetRight > maxWidth) {
- $(this).css('clip', 'rect(auto, ' + (maxWidth - offset.left) + 'px, ' + (documentHeight - offset.top) + 'px, auto)');
+ if (Drupal.overlay.leftSidedScrollbarOffset) {
+ $(this).css('clip', 'rect(auto, auto, ' + (documentHeight - offset.top) + 'px, ' + (Drupal.overlay.leftSidedScrollbarOffset + 2) + 'px)');
+ }
+ else {
+ $(this).css('clip', 'rect(auto, ' + (maxWidth - offset.left) + 'px, ' + (documentHeight - offset.top) + 'px, auto)');
+ }
(data.drupalOverlay = data.drupalOverlay || {}).clip = true;
}
});
Modified: branches/drupal7/modules/overlay/overlay.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/overlay/overlay.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/overlay/overlay.info (original)
+++ branches/drupal7/modules/overlay/overlay.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
version = VERSION
core = 7.x
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/overlay/overlay.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/overlay/overlay.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/overlay/overlay.module (original)
+++ branches/drupal7/modules/overlay/overlay.module Sun Sep 4 19:26:12 2011
@@ -137,8 +137,15 @@
}
if (isset($_GET['render']) && $_GET['render'] == 'overlay') {
- // If this page shouldn't be rendered here, redirect to the parent.
- if (!path_is_admin($current_path)) {
+ // If a previous page requested that we close the overlay, close it and
+ // redirect to the final destination.
+ if (isset($_SESSION['overlay_close_dialog'])) {
+ call_user_func_array('overlay_close_dialog', $_SESSION['overlay_close_dialog']);
+ unset($_SESSION['overlay_close_dialog']);
+ }
+ // If this page shouldn't be rendered inside the overlay, redirect to the
+ // parent.
+ elseif (!path_is_admin($current_path)) {
overlay_close_dialog($current_path);
}
@@ -226,14 +233,23 @@
/**
* Implements hook_drupal_goto_alter().
- *
- * If the current page request is inside the overlay, add ?render=overlay to
- * the new path, so that it appears correctly inside the overlay.
- *
- * @see overlay_get_mode()
*/
function overlay_drupal_goto_alter(&$path, &$options, &$http_response_code) {
if (overlay_get_mode() == 'child') {
+ // The authorize.php script bootstraps Drupal to a very low level, where
+ // the PHP code that is necessary to close the overlay properly will not be
+ // loaded. Therefore, if we are redirecting to authorize.php inside the
+ // overlay, instead redirect back to the current page with instructions to
+ // close the overlay there before redirecting to the final destination; see
+ // overlay_init().
+ if ($path == system_authorized_get_url() || $path == system_authorized_batch_processing_url()) {
+ $_SESSION['overlay_close_dialog'] = array($path, $options);
+ $path = current_path();
+ $options = drupal_get_query_parameters();
+ }
+
+ // If the current page request is inside the overlay, add ?render=overlay
+ // to the new path, so that it appears correctly inside the overlay.
if (isset($options['query'])) {
$options['query'] += array('render' => 'overlay');
}
Modified: branches/drupal7/modules/path/path.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/path/path.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/path/path.info (original)
+++ branches/drupal7/modules/path/path.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = path.test
configure = admin/config/search/path
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/php/php.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/php/php.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/php/php.info (original)
+++ branches/drupal7/modules/php/php.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = php.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/poll/poll.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/poll/poll.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/poll/poll.info (original)
+++ branches/drupal7/modules/poll/poll.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = poll.test
stylesheets[all][] = poll.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/poll/poll.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/poll/poll.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/poll/poll.module (original)
+++ branches/drupal7/modules/poll/poll.module Sun Sep 4 19:26:12 2011
@@ -583,13 +583,20 @@
'chvotes' => (int) $choice['chvotes'],
'weight' => $choice['weight'],
))
- ->insertFields(array('nid' => $node->nid))
+ ->insertFields(array(
+ 'nid' => $node->nid,
+ 'chtext' => $choice['chtext'],
+ ))
->execute();
}
else {
db_delete('poll_vote')
->condition('nid', $node->nid)
->condition('chid', $key)
+ ->execute();
+ db_delete('poll_choice')
+ ->condition('nid', $node->nid)
+ ->condition('chid', $choice['chid'])
->execute();
}
}
Modified: branches/drupal7/modules/poll/poll.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/poll/poll.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/poll/poll.test (original)
+++ branches/drupal7/modules/poll/poll.test Sun Sep 4 19:26:12 2011
@@ -188,7 +188,7 @@
function testPollCreate() {
$title = $this->randomName();
$choices = $this->_generateChoices(7);
- $this->pollCreate($title, $choices, TRUE);
+ $poll_nid = $this->pollCreate($title, $choices, TRUE);
// Verify poll appears on 'poll' page.
$this->drupalGet('poll');
@@ -198,6 +198,25 @@
// Click on the poll title to go to node page.
$this->clickLink($title);
$this->assertText('Total votes: 0', 'Link to poll correct.');
+
+ // Now add a new option to make sure that when we update the node the
+ // option is displayed.
+ $node = node_load($poll_nid);
+
+ $new_option = $this->randomName();
+
+ $node->choice[] = array(
+ 'chid' => '',
+ 'chtext' => $new_option,
+ 'chvotes' => 0,
+ 'weight' => 0,
+ );
+
+ node_save($node);
+
+ $this->drupalGet('poll');
+ $this->clickLink($title);
+ $this->assertText($new_option, 'New option found.');
}
function testPollClose() {
@@ -727,3 +746,39 @@
$this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), t('Poll has expired.'));
}
}
+
+class PollDeleteChoiceTestCase extends PollTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Poll choice deletion',
+ 'description' => 'Test the poll choice deletion logic.',
+ 'group' => 'Poll',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('poll');
+ }
+
+ function testChoiceRemoval() {
+ // Set up a poll with three choices.
+ $title = $this->randomName();
+ $choices = array('First choice', 'Second choice', 'Third choice');
+ $poll_nid = $this->pollCreate($title, $choices, FALSE);
+ $this->assertTrue($poll_nid, t('Poll for choice deletion logic test created.'));
+
+ // Edit the poll, and try to delete first poll choice.
+ $this->drupalGet("node/$poll_nid/edit");
+ $edit['choice[chid:1][chtext]'] = '';
+ $this->drupalPost(NULL, $edit, t('Save'));
+
+ // Click on the poll title to go to node page.
+ $this->drupalGet('poll');
+ $this->clickLink($title);
+
+ // Check the first poll choice is deleted, while the others remain.
+ $this->assertNoText('First choice', t('First choice removed.'));
+ $this->assertText('Second choice', t('Second choice remains.'));
+ $this->assertText('Third choice', t('Third choice remains.'));
+ }
+}
Modified: branches/drupal7/modules/profile/profile.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/profile/profile.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/profile/profile.info (original)
+++ branches/drupal7/modules/profile/profile.info Sun Sep 4 19:26:12 2011
@@ -11,8 +11,8 @@
; See user_system_info_alter().
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/rdf/rdf.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/rdf/rdf.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/rdf/rdf.info (original)
+++ branches/drupal7/modules/rdf/rdf.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = rdf.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/rdf/tests/rdf_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/rdf/tests/rdf_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/rdf/tests/rdf_test.info (original)
+++ branches/drupal7/modules/rdf/tests/rdf_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/search/search.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/search/search.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/search/search.info (original)
+++ branches/drupal7/modules/search/search.info Sun Sep 4 19:26:12 2011
@@ -8,8 +8,8 @@
configure = admin/config/search/settings
stylesheets[all][] = search.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/search/search.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/search/search.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/search/search.test (original)
+++ branches/drupal7/modules/search/search.test Sun Sep 4 19:26:12 2011
@@ -1947,3 +1947,46 @@
$this->assertNoText(t('Languages'), t('No languages to choose from.'));
}
}
+
+/**
+ * Tests node search with node access control.
+ */
+class SearchNodeAccessTest extends DrupalWebTestCase {
+ public $test_user;
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Search and node access',
+ 'description' => 'Tests search functionality with node access control.',
+ 'group' => 'Search',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('search', 'node_access_test');
+ node_access_rebuild();
+
+ // Create a test user and log in.
+ $this->test_user = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search'));
+ $this->drupalLogin($this->test_user);
+ }
+
+ /**
+ * Tests that search returns results with punctuation in the search phrase.
+ */
+ function testPhraseSearchPunctuation() {
+ $node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => "The bunny's ears were furry.")))));
+
+ // Update the search index.
+ module_invoke_all('update_index');
+ search_update_totals();
+
+ // Refresh variables after the treatment.
+ $this->refreshVariables();
+
+ // Submit a phrase wrapped in double quotes to include the punctuation.
+ $edit = array('keys' => '"bunny\'s"');
+ $this->drupalPost('search/node', $edit, t('Search'));
+ $this->assertText($node->title);
+ }
+}
Modified: branches/drupal7/modules/search/tests/search_embedded_form.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/search/tests/search_embedded_form.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/search/tests/search_embedded_form.info (original)
+++ branches/drupal7/modules/search/tests/search_embedded_form.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/search/tests/search_extra_type.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/search/tests/search_extra_type.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/search/tests/search_extra_type.info (original)
+++ branches/drupal7/modules/search/tests/search_extra_type.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/shortcut/shortcut-rtl.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/shortcut/shortcut-rtl.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/shortcut/shortcut-rtl.css (original)
+++ branches/drupal7/modules/shortcut/shortcut-rtl.css Sun Sep 4 19:26:12 2011
@@ -28,6 +28,7 @@
padding-right: 10px;
padding-left: 0;
}
+div.add-or-remove-shortcuts a:focus span.text,
div.add-or-remove-shortcuts a:hover span.text {
-moz-border-radius: 5px 0 0 5px;
-webkit-border-top-left-radius: 5px;
Modified: branches/drupal7/modules/shortcut/shortcut.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/shortcut/shortcut.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/shortcut/shortcut.info (original)
+++ branches/drupal7/modules/shortcut/shortcut.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = shortcut.test
configure = admin/config/user-interface/shortcut
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/shortcut/shortcut.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/shortcut/shortcut.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/shortcut/shortcut.module (original)
+++ branches/drupal7/modules/shortcut/shortcut.module Sun Sep 4 19:26:12 2011
@@ -460,7 +460,7 @@
* to any set.
*/
function shortcut_set_unassign_user($account) {
- $deleted = db_delete('shortcut_set')
+ $deleted = db_delete('shortcut_set_users')
->condition('uid', $account->uid)
->execute();
return (bool) $deleted;
Modified: branches/drupal7/modules/shortcut/shortcut.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/shortcut/shortcut.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/shortcut/shortcut.test (original)
+++ branches/drupal7/modules/shortcut/shortcut.test Sun Sep 4 19:26:12 2011
@@ -313,6 +313,19 @@
}
/**
+ * Tests unassigning a shortcut set.
+ */
+ function testShortcutSetUnassign() {
+ $new_set = $this->generateShortcutSet($this->randomName(10));
+
+ shortcut_set_assign_user($new_set, $this->shortcut_user);
+ shortcut_set_unassign_user($this->shortcut_user);
+ $current_set = shortcut_current_displayed_set($this->shortcut_user);
+ $default_set = shortcut_default_set($this->shortcut_user);
+ $this->assertTrue($current_set->set_name == $default_set->set_name, "Successfully unassigned another user's shortcut set.");
+ }
+
+ /**
* Tests deleting a shortcut set.
*/
function testShortcutSetDelete() {
Modified: branches/drupal7/modules/simpletest/drupal_web_test_case.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/drupal_web_test_case.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/drupal_web_test_case.php (original)
+++ branches/drupal7/modules/simpletest/drupal_web_test_case.php Sun Sep 4 19:26:12 2011
@@ -1254,6 +1254,11 @@
$this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
$this->originalProfile = drupal_get_profile();
$clean_url_original = variable_get('clean_url', 0);
+
+ // Set to English to prevent exceptions from utf8_truncate() from t()
+ // during install if the current language is not 'en'.
+ // The following array/object conversion is copied from language_default().
+ $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => '');
// Save and clean shutdown callbacks array because it static cached and
// will be changed by the test run. If we don't, then it will contain
Modified: branches/drupal7/modules/simpletest/simpletest.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/simpletest.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/simpletest.info (original)
+++ branches/drupal7/modules/simpletest/simpletest.info Sun Sep 4 19:26:12 2011
@@ -45,11 +45,12 @@
files[] = tests/upgrade/upgrade.menu.test
files[] = tests/upgrade/upgrade.node.test
files[] = tests/upgrade/upgrade.taxonomy.test
+files[] = tests/upgrade/upgrade.translatable.test
files[] = tests/upgrade/upgrade.upload.test
files[] = tests/upgrade/upgrade.user.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/actions_loop_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/actions_loop_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/actions_loop_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/actions_loop_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/ajax_forms_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/ajax_forms_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/ajax_forms_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/ajax_forms_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/ajax_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/ajax_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/ajax_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/ajax_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/batch_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/batch_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/batch_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/batch_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/cache.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/cache.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/cache.test (original)
+++ branches/drupal7/modules/simpletest/tests/cache.test Sun Sep 4 19:26:12 2011
@@ -309,6 +309,27 @@
|| $this->checkCacheExists('test_cid_clear2', $this->default_value)
|| $this->checkCacheExists('test_cid_clear3', $this->default_value),
t('All cache entries removed when the array exceeded the cache clear threshold.'));
+ }
+
+ /**
+ * Test drupal_flush_all_caches().
+ */
+ function testFlushAllCaches() {
+ // Create cache entries for each flushed cache bin.
+ $bins = array('cache', 'cache_filter', 'cache_page', 'cache_boostrap', 'cache_path');
+ $bins = array_merge(module_invoke_all('flush_caches'), $bins);
+ foreach ($bins as $id => $bin) {
+ $id = 'test_cid_clear' . $id;
+ cache_set($id, $this->default_value, $bin);
+ }
+
+ // Remove all caches then make sure that they are cleared.
+ drupal_flush_all_caches();
+
+ foreach ($bins as $id => $bin) {
+ $id = 'test_cid_clear' . $id;
+ $this->assertFalse($this->checkCacheExists($id, $this->default_value, $bin), t('All cache entries removed from @bin.', array('@bin' => $bin)));
+ }
}
}
Modified: branches/drupal7/modules/simpletest/tests/common_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/common_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/common_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/common_test.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
stylesheets[print][] = common_test.print.css
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/common_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/common_test.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/common_test.module (original)
+++ branches/drupal7/modules/simpletest/tests/common_test.module Sun Sep 4 19:26:12 2011
@@ -225,3 +225,16 @@
drupal_add_css('/' . drupal_get_path('module', 'node') . '/node-fake.css?arg1=value1&arg2=value2');
return '';
}
+
+/**
+ * Implements hook_cron().
+ *
+ * System module should handle if a module does not catch an exception and keep
+ * cron going.
+ *
+ * @see common_test_cron_helper()
+ *
+ */
+function common_test_cron() {
+ throw new Exception(t('Uncaught exception'));
+}
Modified: branches/drupal7/modules/simpletest/tests/database_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/database_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/database_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/database_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/database_test.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/database_test.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/database_test.test (original)
+++ branches/drupal7/modules/simpletest/tests/database_test.test Sun Sep 4 19:26:12 2011
@@ -1629,22 +1629,28 @@
$subquery->addField('tt', 'task', 'task');
$subquery->condition('priority', 1);
- // Create another query that joins against the virtual table resulting
- // from the subquery.
- $select = db_select($subquery, 'tt2');
- $select->join('test', 't', 't.id=tt2.pid');
- $select->addField('t', 'name');
-
- $select->condition('task', 'code');
-
- // The resulting query should be equivalent to:
- // SELECT t.name
- // FROM (SELECT tt.pid AS pid, tt.task AS task FROM test_task tt WHERE priority=1) tt
- // INNER JOIN test t ON t.id=tt.pid
- // WHERE tt.task = 'code'
- $people = $select->execute()->fetchCol();
-
- $this->assertEqual(count($people), 1, t('Returned the correct number of rows.'));
+ for ($i = 0; $i < 2; $i++) {
+ // Create another query that joins against the virtual table resulting
+ // from the subquery.
+ $select = db_select($subquery, 'tt2');
+ $select->join('test', 't', 't.id=tt2.pid');
+ $select->addField('t', 'name');
+ if ($i) {
+ // Use a different number of conditions here to confuse the subquery
+ // placeholder counter, testing http://drupal.org/node/1112854.
+ $select->condition('name', 'John');
+ }
+ $select->condition('task', 'code');
+
+ // The resulting query should be equivalent to:
+ // SELECT t.name
+ // FROM (SELECT tt.pid AS pid, tt.task AS task FROM test_task tt WHERE priority=1) tt
+ // INNER JOIN test t ON t.id=tt.pid
+ // WHERE tt.task = 'code'
+ $people = $select->execute()->fetchCol();
+
+ $this->assertEqual(count($people), 1, t('Returned the correct number of rows.'));
+ }
}
/**
@@ -3433,7 +3439,7 @@
$this->assertIdentical($count, '0', t('Table was successfully created inside a transaction.'));
}
catch (Exception $e) {
- $this->fail($e->getMessage());
+ $this->fail((string) $e);
}
// If we rollback the transaction, an exception might be thrown.
@@ -3450,6 +3456,163 @@
// An exception also lets the test pass.
$this->assertTrue(true, t('Exception thrown on rollback after a DDL statement was executed.'));
}
+ }
+
+ /**
+ * Insert a single row into the testing table.
+ */
+ protected function insertRow($name) {
+ db_insert('test')
+ ->fields(array(
+ 'name' => $name,
+ ))
+ ->execute();
+ }
+
+ /**
+ * Start over for a new test.
+ */
+ protected function cleanUp() {
+ db_truncate('test')
+ ->execute();
+ }
+
+ /**
+ * Assert that a given row is present in the test table.
+ *
+ * @param $name
+ * The name of the row.
+ * @param $message
+ * The message to log for the assertion.
+ */
+ function assertRowPresent($name, $message = NULL) {
+ if (!isset($message)) {
+ $message = t('Row %name is present.', array('%name' => $name));
+ }
+ $present = (boolean) db_query('SELECT 1 FROM {test} WHERE name = :name', array(':name' => $name))->fetchField();
+ return $this->assertTrue($present, $message);
+ }
+
+ /**
+ * Assert that a given row is absent from the test table.
+ *
+ * @param $name
+ * The name of the row.
+ * @param $message
+ * The message to log for the assertion.
+ */
+ function assertRowAbsent($name, $message = NULL) {
+ if (!isset($message)) {
+ $message = t('Row %name is absent.', array('%name' => $name));
+ }
+ $present = (boolean) db_query('SELECT 1 FROM {test} WHERE name = :name', array(':name' => $name))->fetchField();
+ return $this->assertFalse($present, $message);
+ }
+
+ /**
+ * Test transaction stacking and commit / rollback.
+ */
+ function testTransactionStacking() {
+ // This test won't work right if transactions are supported.
+ if (Database::getConnection()->supportsTransactions()) {
+ return;
+ }
+
+ $database = Database::getConnection();
+
+ // Standard case: pop the inner transaction before the outer transaction.
+ $transaction = db_transaction();
+ $this->insertRow('outer');
+ $transaction2 = db_transaction();
+ $this->insertRow('inner');
+ // Pop the inner transaction.
+ unset($transaction2);
+ $this->assertTrue($database->inTransaction(), t('Still in a transaction after popping the inner transaction'));
+ // Pop the outer transaction.
+ unset($transaction);
+ $this->assertFalse($database->inTransaction(), t('Transaction closed after popping the outer transaction'));
+ $this->assertRowPresent('outer');
+ $this->assertRowPresent('inner');
+
+ // Pop the transaction in a different order they have been pushed.
+ $this->cleanUp();
+ $transaction = db_transaction();
+ $this->insertRow('outer');
+ $transaction2 = db_transaction();
+ $this->insertRow('inner');
+ // Pop the outer transaction, nothing should happen.
+ unset($transaction);
+ $this->insertRow('inner-after-outer-commit');
+ $this->assertTrue($database->inTransaction(), t('Still in a transaction after popping the outer transaction'));
+ // Pop the inner transaction, the whole transaction should commit.
+ unset($transaction2);
+ $this->assertFalse($database->inTransaction(), t('Transaction closed after popping the inner transaction'));
+ $this->assertRowPresent('outer');
+ $this->assertRowPresent('inner');
+ $this->assertRowPresent('inner-after-outer-commit');
+
+ // Rollback the inner transaction.
+ $this->cleanUp();
+ $transaction = db_transaction();
+ $this->insertRow('outer');
+ $transaction2 = db_transaction();
+ $this->insertRow('inner');
+ // Now rollback the inner transaction.
+ $transaction2->rollback();
+ unset($transaction2);
+ $this->assertTrue($database->inTransaction(), t('Still in a transaction after popping the outer transaction'));
+ // Pop the outer transaction, it should commit.
+ $this->insertRow('outer-after-inner-rollback');
+ unset($transaction);
+ $this->assertFalse($database->inTransaction(), t('Transaction closed after popping the inner transaction'));
+ $this->assertRowPresent('outer');
+ $this->assertRowAbsent('inner');
+ $this->assertRowPresent('outer-after-inner-rollback');
+
+ // Rollback the inner transaction after committing the outer one.
+ $this->cleanUp();
+ $transaction = db_transaction();
+ $this->insertRow('outer');
+ $transaction2 = db_transaction();
+ $this->insertRow('inner');
+ // Pop the outer transaction, nothing should happen.
+ unset($transaction);
+ $this->assertTrue($database->inTransaction(), t('Still in a transaction after popping the outer transaction'));
+ // Now rollback the inner transaction, it should rollback.
+ $transaction2->rollback();
+ unset($transaction2);
+ $this->assertFalse($database->inTransaction(), t('Transaction closed after popping the inner transaction'));
+ $this->assertRowPresent('outer');
+ $this->assertRowAbsent('inner');
+
+ // Rollback the outer transaction while the inner transaction is active.
+ // In that case, an exception will be triggered because we cannot
+ // ensure that the final result will have any meaning.
+ $this->cleanUp();
+ $transaction = db_transaction();
+ $this->insertRow('outer');
+ $transaction2 = db_transaction();
+ $this->insertRow('inner');
+ // Rollback the outer transaction.
+ try {
+ $transaction->rollback();
+ unset($transaction);
+ $this->fail(t('Rolling back the outer transaction while the inner transaction is active resulted in an exception.'));
+ }
+ catch (Exception $e) {
+ $this->pass(t('Rolling back the outer transaction while the inner transaction is active resulted in an exception.'));
+ }
+ $this->assertFalse($database->inTransaction(), t('No more in a transaction after rolling back the outer transaction'));
+ // Try to commit the inner transaction.
+ try {
+ unset($transaction2);
+ $this->fail(t('Trying to commit the inner transaction resulted in an exception.'));
+ }
+ catch (Exception $e) {
+ $this->pass(t('Trying to commit the inner transaction resulted in an exception.'));
+ }
+ $this->assertRowAbsent('outer');
+ $this->assertRowAbsent('inner');
}
}
Modified: branches/drupal7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/entity_cache_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/entity_cache_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/entity_cache_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/entity_cache_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = entity_cache_test_dependency
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/entity_cache_test_dependency.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/entity_cache_test_dependency.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/entity_cache_test_dependency.info (original)
+++ branches/drupal7/modules/simpletest/tests/entity_cache_test_dependency.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/entity_crud_hook_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/entity_crud_hook_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/entity_crud_hook_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/entity_crud_hook_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/error_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/error_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/error_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/error_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/file.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/file.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/file.test (original)
+++ branches/drupal7/modules/simpletest/tests/file.test Sun Sep 4 19:26:12 2011
@@ -2618,6 +2618,7 @@
'foo.file_test_1' => 'madeup/file_test_1',
'foo.file_test_2' => 'madeup/file_test_2',
'foo.doc' => 'madeup/doc',
+ 'test.ogg' => 'audio/ogg',
);
// Test using default mappings.
@@ -2656,6 +2657,7 @@
'foo.file_test_1' => 'application/octet-stream',
'foo.file_test_2' => 'application/octet-stream',
'foo.doc' => 'application/octet-stream',
+ 'test.ogg' => 'application/octet-stream',
);
foreach ($test_case as $input => $expected) {
Modified: branches/drupal7/modules/simpletest/tests/file_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/file_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/file_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/file_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = file_test.module
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/filter_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/filter_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/filter_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/filter_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/form_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/form_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/form_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/form_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/image_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/image_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/image_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/image_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/menu_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/menu_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/menu_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/menu_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/module_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/module_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/module_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/requirements1_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/requirements1_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/requirements1_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/requirements1_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/requirements2_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/requirements2_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/requirements2_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/requirements2_test.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/session_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/session_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/session_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/session_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/system_dependencies_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/system_dependencies_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/system_dependencies_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/system_dependencies_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
hidden = TRUE
dependencies[] = _missing_dependency
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/system_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/system_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/system_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/system_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = system_test.module
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/taxonomy_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/taxonomy_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/taxonomy_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/taxonomy_test.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
hidden = TRUE
dependencies[] = taxonomy
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/theme_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/theme_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/theme_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/theme_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/update_test_1.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/update_test_1.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/update_test_1.info (original)
+++ branches/drupal7/modules/simpletest/tests/update_test_1.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/update_test_2.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/update_test_2.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/update_test_2.info (original)
+++ branches/drupal7/modules/simpletest/tests/update_test_2.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/update_test_3.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/update_test_3.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/update_test_3.info (original)
+++ branches/drupal7/modules/simpletest/tests/update_test_3.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.menu.database.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.menu.database.php (original)
+++ branches/drupal7/modules/simpletest/tests/upgrade/drupal-6.menu.database.php Sun Sep 4 19:26:12 2011
@@ -127,3 +127,49 @@
'updated' => '0',
))
->execute();
+db_insert('blocks')->fields(array(
+ 'bid',
+ 'module',
+ 'delta',
+ 'theme',
+ 'status',
+ 'weight',
+ 'region',
+ 'custom',
+ 'throttle',
+ 'visibility',
+ 'pages',
+ 'title',
+ 'cache',
+))
+->values(array(
+ 'bid' => '4',
+ 'module' => 'menu',
+ 'delta' => 'primary-links',
+ 'theme' => 'garland',
+ 'status' => '1',
+ 'weight' => '0',
+ 'region' => 'left',
+ 'custom' => '0',
+ 'throttle' => '0',
+ 'visibility' => '0',
+ 'pages' => '',
+ 'title' => 'My Primary Links',
+ 'cache' => '-1',
+))
+->values(array(
+ 'bid' => '5',
+ 'module' => 'menu',
+ 'delta' => 'secondary-links',
+ 'theme' => 'garland',
+ 'status' => '1',
+ 'weight' => '0',
+ 'region' => 'left',
+ 'custom' => '0',
+ 'throttle' => '0',
+ 'visibility' => '0',
+ 'pages' => '',
+ 'title' => 'My Secondary Links',
+ 'cache' => '-1',
+))
+->execute();
Modified: branches/drupal7/modules/simpletest/tests/upgrade/upgrade.menu.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/upgrade/upgrade.menu.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/upgrade/upgrade.menu.test (original)
+++ branches/drupal7/modules/simpletest/tests/upgrade/upgrade.menu.test Sun Sep 4 19:26:12 2011
@@ -74,5 +74,10 @@
$this->drupalGet('admin/structure/menu/settings');
$this->assertOptionSelected('edit-menu-main-links-source', 'secondary-menu');
$this->assertOptionSelected('edit-menu-secondary-links-source', 'main-menu');
+
+ // Check that both primary/secondary links blocks are visible.
+ $this->drupalGet('node');
+ $this->assertText('My Primary Links', '(Formerly) Primary Links block is still visible');
+ $this->assertText('My Secondary Links', '(Formerly) Secondary Links block is still visible');
}
}
Modified: branches/drupal7/modules/simpletest/tests/upgrade/upgrade.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/upgrade/upgrade.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/upgrade/upgrade.test (original)
+++ branches/drupal7/modules/simpletest/tests/upgrade/upgrade.test Sun Sep 4 19:26:12 2011
@@ -402,5 +402,9 @@
// Confirm that no {menu_links} entry exists for user/autocomplete.
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
+
+ // Test that the environment after the upgrade is in a consistent status.
+ $update_d6 = variable_get('update_d6', FALSE);
+ $this->assertFalse($update_d6, t('The D6 upgrade flag variable has been correctly disabled.'));
}
}
Modified: branches/drupal7/modules/simpletest/tests/url_alter_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/url_alter_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/url_alter_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/url_alter_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/simpletest/tests/xmlrpc_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/simpletest/tests/xmlrpc_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/simpletest/tests/xmlrpc_test.info (original)
+++ branches/drupal7/modules/simpletest/tests/xmlrpc_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/statistics/statistics.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/statistics/statistics.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/statistics/statistics.info (original)
+++ branches/drupal7/modules/statistics/statistics.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = statistics.test
configure = admin/config/system/statistics
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/statistics/statistics.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/statistics/statistics.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/statistics/statistics.module (original)
+++ branches/drupal7/modules/statistics/statistics.module Sun Sep 4 19:26:12 2011
@@ -80,7 +80,7 @@
->fields(array(
'title' => strip_tags(drupal_get_title()),
'path' => $_GET['q'],
- 'url' => $_SERVER['HTTP_REFERER'],
+ 'url' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
'hostname' => ip_address(),
'uid' => $user->uid,
'sid' => session_id(),
Modified: branches/drupal7/modules/syslog/syslog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/syslog/syslog.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/syslog/syslog.info (original)
+++ branches/drupal7/modules/syslog/syslog.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
files[] = syslog.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/system/system.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.admin.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.admin.inc (original)
+++ branches/drupal7/modules/system/system.admin.inc Sun Sep 4 19:26:12 2011
@@ -799,7 +799,7 @@
$extra['enabled'] = (bool) $module->status;
if (!empty($module->info['required'] )) {
$extra['disabled'] = TRUE;
- $extra['required_by'][] = $distribution_name;
+ $extra['required_by'][] = $distribution_name . (!empty($module->info['explanation']) ? ' ('. $module->info['explanation'] .')' : '');
}
// If this module requires other modules, add them to the array.
Modified: branches/drupal7/modules/system/system.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.api.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.api.php (original)
+++ branches/drupal7/modules/system/system.api.php Sun Sep 4 19:26:12 2011
@@ -1016,8 +1016,33 @@
* return db_query("SELECT * FROM {mymodule_abc} WHERE abc_id = :abc_id", array(':abc_id' => $abc_id))->fetchObject();
* }
* @endcode
- * This 'abc' object will then be passed into the page callback function
- * mymodule_abc_edit() to replace the integer 1 in the page arguments.
+ * This 'abc' object will then be passed into the callback functions defined
+ * for the menu item, such as the page callback function mymodule_abc_edit()
+ * to replace the integer 1 in the argument array.
+ *
+ * You can also define a %wildcard_to_arg() function (for the example menu
+ * entry above this would be 'mymodule_abc_to_arg()'). The _to_arg() function
+ * is invoked to retrieve a value that is used in the path in place of the
+ * wildcard. A good example is user.module, which defines
+ * user_uid_optional_to_arg() (corresponding to the menu entry
+ * 'user/%user_uid_optional'). This function returns the user ID of the
+ * current user.
+ *
+ * The _to_arg() function will get called with three arguments:
+ * - $arg: A string representing whatever argument may have been supplied by
+ * the caller (this is particularly useful if you want the _to_arg()
+ * function only supply a (default) value if no other value is specified,
+ * as in the case of user_uid_optional_to_arg().
+ * - $map: An array of all path fragments (e.g. array('node','123','edit') for
+ * 'node/123/edit').
+ * - $index: An integer indicating which element of $map corresponds to $arg.
+ *
+ * _load() and _to_arg() functions may seem similar at first glance, but they
+ * have different purposes and are called at different times. _load()
+ * functions are called when the menu system is collecting arguments to pass
+ * to the callback functions defined for the menu item. _to_arg() functions
+ * are called when the menu system is generating links to related paths, such
+ * as the tabs for a set of MENU_LOCAL_TASK items.
*
* You can also make groups of menu items to be rendered (by default) as tabs
* on a page. To do that, first create one menu item of type MENU_NORMAL_ITEM,
@@ -2859,7 +2884,7 @@
);
}
- $requirements['cron']['description'] .= ' ' . t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/logs/status/run-cron')));
+ $requirements['cron']['description'] .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/logs/status/run-cron')));
$requirements['cron']['title'] = $t('Cron maintenance tasks');
}
Modified: branches/drupal7/modules/system/system.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.info (original)
+++ branches/drupal7/modules/system/system.info Sun Sep 4 19:26:12 2011
@@ -12,8 +12,8 @@
required = TRUE
configure = admin/config/system
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/system/system.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.install (original)
+++ branches/drupal7/modules/system/system.install Sun Sep 4 19:26:12 2011
@@ -1681,9 +1681,17 @@
* Implements hook_update_dependencies().
*/
function system_update_dependencies() {
- // Update 7053 adds new blocks, so make sure the block tables are updated.
+ // system_update_7053() queries the {block} table, so it must run after
+ // block_update_7002(), which creates that table.
$dependencies['system'][7053] = array(
'block' => 7002,
+ );
+
+ // system_update_7067() migrates role permissions and therefore must run
+ // after the {role} and {role_permission} tables are properly set up, which
+ // happens in user_update_7007().
+ $dependencies['system'][7067] = array(
+ 'user' => 7007,
);
return $dependencies;
@@ -1866,9 +1874,6 @@
/**
* Convert to new method of storing permissions.
- *
- * This update is in system.install rather than user.install so that
- * all modules can use the updated permission scheme during their updates.
*/
function system_update_7007() {
// Copy the permissions from the old {permission} table to the new {role_permission} table.
Modified: branches/drupal7/modules/system/system.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.module (original)
+++ branches/drupal7/modules/system/system.module Sun Sep 4 19:26:12 2011
@@ -649,7 +649,7 @@
// Modules.
$items['admin/modules'] = array(
'title' => 'Modules',
- 'description' => 'Enable or disable modules.',
+ 'description' => 'Extend site functionality.',
'page callback' => 'drupal_get_form',
'page arguments' => array('system_modules'),
'access arguments' => array('administer modules'),
@@ -1790,6 +1790,13 @@
}
/**
+ * Returns the URL for the authorize.php script when it is processing a batch.
+ */
+function system_authorized_batch_processing_url() {
+ return system_authorized_get_url(array('query' => array('batch' => '1')));
+}
+
+/**
* Setup and invoke an operation using authorize.php.
*
* @see system_authorized_init()
@@ -1806,7 +1813,7 @@
*/
function system_authorized_batch_process() {
$finish_url = system_authorized_get_url();
- $process_url = system_authorized_get_url(array('query' => array('batch' => '1')));
+ $process_url = system_authorized_batch_processing_url();
batch_process($finish_url, $process_url);
}
@@ -2997,7 +3004,7 @@
}
}
- $core = array('cache', 'cache_filter', 'cache_page', 'cache_form', 'cache_menu');
+ $core = array('cache', 'cache_path', 'cache_filter', 'cache_page', 'cache_form', 'cache_menu');
$cache_tables = array_merge(module_invoke_all('flush_caches'), $core);
foreach ($cache_tables as $table) {
cache_clear_all(NULL, $table);
@@ -3864,7 +3871,7 @@
if (!empty($date_format['locales'])) {
foreach ($date_format['locales'] as $langcode) {
// Only proceed if language is enabled.
- if (in_array($langcode, $languages)) {
+ if (isset($languages[$langcode])) {
$is_existing = (bool) db_query_range('SELECT 1 FROM {date_format_locale} WHERE type = :type AND language = :language', 0, 1, array(':type' => $date_format['type'], ':language' => $langcode))->fetchField();
if (!$is_existing) {
$locale_format['language'] = $langcode;
Modified: branches/drupal7/modules/system/system.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.test (original)
+++ branches/drupal7/modules/system/system.test Sun Sep 4 19:26:12 2011
@@ -446,39 +446,6 @@
}
/**
- * Tests re-enabling forum with taxonomy disabled.
- */
- function testEnableForumTaxonomyFieldDependency() {
- // Enable the forum module.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = 'forum';
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('forum'), TRUE);
-
- // Disable the forum module.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = FALSE;
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('forum'), FALSE);
-
- // Disable the taxonomy module.
- $edit = array();
- $edit['modules[Core][taxonomy][enable]'] = FALSE;
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('taxonomy'), FALSE);
-
- // Attempt to re-enable the forum module with taxonomy disabled and ensure
- // forum does not try to recreate the taxonomy_forums field.
- $edit = array();
- $edit['modules[Core][forum][enable]'] = 'forum';
- $this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertText(t('Some required modules must be enabled'), t('Dependency required.'));
- $this->drupalPost(NULL, NULL, t('Continue'));
- $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
- $this->assertModules(array('taxonomy', 'forum'), TRUE);
- }
-
- /**
* Tests that module dependencies are enabled in the correct order via the
* UI. Dependencies should be enabled before their dependents.
*/
@@ -516,18 +483,18 @@
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum'), TRUE);
- // Disable forum and taxonomy. Both should now be installed but disabled.
+ // Disable forum and comment. Both should now be installed but disabled.
$edit = array('modules[Core][forum][enable]' => FALSE);
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertModules(array('forum'), FALSE);
- $edit = array('modules[Core][taxonomy][enable]' => FALSE);
+ $edit = array('modules[Core][comment][enable]' => FALSE);
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertModules(array('taxonomy'), FALSE);
+ $this->assertModules(array('comment'), FALSE);
// Check that the taxonomy module cannot be uninstalled.
$this->drupalGet('admin/modules/uninstall');
- $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="uninstall[taxonomy]"]');
- $this->assert(count($checkbox) == 1, t('Checkbox for uninstalling the taxonomy module is disabled.'));
+ $checkbox = $this->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="uninstall[comment]"]');
+ $this->assert(count($checkbox) == 1, t('Checkbox for uninstalling the comment module is disabled.'));
// Uninstall the forum module, and check that taxonomy now can also be
// uninstalled.
@@ -535,7 +502,7 @@
$this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
$this->drupalPost(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), t('Modules status has been updated.'));
- $edit = array('uninstall[taxonomy]' => 'taxonomy');
+ $edit = array('uninstall[comment]' => 'comment');
$this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
$this->drupalPost(NULL, NULL, t('Uninstall'));
$this->assertText(t('The selected modules have been uninstalled.'), t('Modules status has been updated.'));
@@ -728,6 +695,10 @@
);
}
+ function setUp() {
+ parent::setUp(array('common_test', 'common_test_cron_helper'));
+ }
+
/**
* Test cron runs.
*/
@@ -832,6 +803,19 @@
$this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was correctly ignored.'));
$this->assertTrue(file_exists($perm_new->uri), t('New permanent file was correctly ignored.'));
}
+
+ /**
+ * Make sure exceptions thrown on hook_cron() don't affect other modules.
+ */
+ function testCronExceptions() {
+ variable_del('common_test_cron');
+ // The common_test module throws an exception. If it isn't caught, the tests
+ // won't finish successfully.
+ // The common_test_cron_helper module sets the 'common_test_cron' variable.
+ $this->cronRun();
+ $result = variable_get('common_test_cron');
+ $this->assertEqual($result, 'success', t('Cron correctly handles exceptions thrown during hook_cron() invocations.'));
+ }
}
class AdminMetaTagTestCase extends DrupalWebTestCase {
@@ -1091,7 +1075,7 @@
}
function setUp() {
- parent::setUp();
+ parent::setUp(array('locale'));
// Create admin user and log in admin user.
$this->admin_user = $this->drupalCreateUser(array('administer site configuration'));
@@ -1199,6 +1183,74 @@
$this->drupalPost($this->getUrl(), array(), t('Remove'));
$this->assertEqual($this->getUrl(), url('admin/config/regional/date-time/formats', array('absolute' => TRUE)), t('Correct page redirection.'));
$this->assertText(t('Removed date format'), 'Custom date format removed successfully.');
+ }
+
+ /**
+ * Test if the date formats are stored properly.
+ */
+ function testDateFormatStorage() {
+ $date_format = array(
+ 'type' => 'short',
+ 'format' => 'dmYHis',
+ 'locked' => 0,
+ 'is_new' => 1,
+ );
+ system_date_format_save($date_format);
+
+ $format = db_select('date_formats', 'df')
+ ->fields('df', array('format'))
+ ->condition('type', 'short')
+ ->condition('format', 'dmYHis')
+ ->execute()
+ ->fetchField();
+ $this->verbose($format);
+ $this->assertEqual('dmYHis', $format, 'Unlocalized date format resides in general table.');
+
+ $format = db_select('date_format_locale', 'dfl')
+ ->fields('dfl', array('format'))
+ ->condition('type', 'short')
+ ->condition('format', 'dmYHis')
+ ->execute()
+ ->fetchField();
+ $this->assertFalse($format, 'Unlocalized date format resides not in localized table.');
+
+ // Enable German language
+ locale_add_language('de', NULL, NULL, LANGUAGE_LTR, '', '', TRUE, 'en');
+
+ $date_format = array(
+ 'type' => 'short',
+ 'format' => 'YMDHis',
+ 'locales' => array('de', 'tr'),
+ 'locked' => 0,
+ 'is_new' => 1,
+ );
+ system_date_format_save($date_format);
+
+ $format = db_select('date_format_locale', 'dfl')
+ ->fields('dfl', array('format'))
+ ->condition('type', 'short')
+ ->condition('format', 'YMDHis')
+ ->condition('language', 'de')
+ ->execute()
+ ->fetchField();
+ $this->assertEqual('YMDHis', $format, 'Localized date format resides in localized table.');
+
+ $format = db_select('date_formats', 'df')
+ ->fields('df', array('format'))
+ ->condition('type', 'short')
+ ->condition('format', 'YMDHis')
+ ->execute()
+ ->fetchField();
+ $this->assertEqual('YMDHis', $format, 'Localized date format resides in general table too.');
+
+ $format = db_select('date_format_locale', 'dfl')
+ ->fields('dfl', array('format'))
+ ->condition('type', 'short')
+ ->condition('format', 'YMDHis')
+ ->condition('language', 'tr')
+ ->execute()
+ ->fetchColumn();
+ $this->assertFalse($format, 'Localized date format for disabled language is ignored.');
}
}
Modified: branches/drupal7/modules/system/system.tokens.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/system/system.tokens.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/system/system.tokens.inc (original)
+++ branches/drupal7/modules/system/system.tokens.inc Sun Sep 4 19:26:12 2011
@@ -98,7 +98,7 @@
);
$file['size'] = array(
'name' => t("File size"),
- 'description' => t("The size of the file, in kilobytes."),
+ 'description' => t("The size of the file."),
);
$file['url'] = array(
'name' => t("URL"),
@@ -130,10 +130,13 @@
*/
function system_tokens($type, $tokens, array $data = array(), array $options = array()) {
$url_options = array('absolute' => TRUE);
- if (isset($language)) {
- $url_options['language'] = $language;
- }
- $langcode = (isset($language) ? $language->language : NULL);
+ if (isset($options['language'])) {
+ $url_options['language'] = $options['language'];
+ $language_code = $options['language']->language;
+ }
+ else {
+ $language_code = NULL;
+ }
$sanitize = !empty($options['sanitize']);
$replacements = array();
@@ -181,19 +184,19 @@
foreach ($tokens as $name => $original) {
switch ($name) {
case 'short':
- $replacements[$original] = format_date($date, 'short', '', NULL, $langcode);
+ $replacements[$original] = format_date($date, 'short', '', NULL, $language_code);
break;
case 'medium':
- $replacements[$original] = format_date($date, 'medium', '', NULL, $langcode);
+ $replacements[$original] = format_date($date, 'medium', '', NULL, $language_code);
break;
case 'long':
- $replacements[$original] = format_date($date, 'long', '', NULL, $langcode);
+ $replacements[$original] = format_date($date, 'long', '', NULL, $language_code);
break;
case 'since':
- $replacements[$original] = format_interval((REQUEST_TIME - $date), 2, $langcode);
+ $replacements[$original] = format_interval((REQUEST_TIME - $date), 2, $language_code);
break;
case 'raw':
@@ -204,7 +207,7 @@
if ($created_tokens = token_find_with_prefix($tokens, 'custom')) {
foreach ($created_tokens as $name => $original) {
- $replacements[$original] = format_date($date, 'custom', $name, NULL, $langcode);
+ $replacements[$original] = format_date($date, 'custom', $name, NULL, $language_code);
}
}
}
@@ -242,7 +245,7 @@
// These tokens are default variations on the chained tokens handled below.
case 'timestamp':
- $replacements[$original] = format_date($file->timestamp, 'medium', '', NULL, $langcode);
+ $replacements[$original] = format_date($file->timestamp, 'medium', '', NULL, $language_code);
break;
case 'owner':
Modified: branches/drupal7/modules/taxonomy/taxonomy-term.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/taxonomy/taxonomy-term.tpl.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/taxonomy/taxonomy-term.tpl.php (original)
+++ branches/drupal7/modules/taxonomy/taxonomy-term.tpl.php Sun Sep 4 19:26:12 2011
@@ -12,6 +12,7 @@
* hide($content['field_example']) to temporarily suppress the printing of a
* given element.
* - $term_url: Direct url of the current term.
+ * - $term_name: Name of the current term.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
@@ -37,7 +38,7 @@
* @see template_process()
*/
?>
-<div id="taxonomy-term-<?php print $term->tid; ?>" class="<?php print $classes; ?> clearfix">
+<div id="taxonomy-term-<?php print $term->tid; ?>" class="<?php print $classes; ?>">
<?php if (!$page): ?>
<h2><a href="<?php print $term_url; ?>"><?php print $term_name; ?></a></h2>
Modified: branches/drupal7/modules/taxonomy/taxonomy.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/taxonomy/taxonomy.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/taxonomy/taxonomy.info (original)
+++ branches/drupal7/modules/taxonomy/taxonomy.info Sun Sep 4 19:26:12 2011
@@ -8,8 +8,8 @@
files[] = taxonomy.test
configure = admin/structure/taxonomy
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/taxonomy/taxonomy.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/taxonomy/taxonomy.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/taxonomy/taxonomy.install (original)
+++ branches/drupal7/modules/taxonomy/taxonomy.install Sun Sep 4 19:26:12 2011
@@ -251,26 +251,11 @@
* Implements hook_update_dependencies().
*/
function taxonomy_update_dependencies() {
- // Taxonomy update 7002 creates comment Field API bundles and therefore must
- // run after the Field module has been enabled, but before upgrading field
- // data.
- $dependencies['taxonomy'][7002] = array(
- 'system' => 7049,
- );
- $dependencies['user'][7006] = array(
- 'taxonomy' => 7002,
- );
- $dependencies['system'][7050] = array(
- 'taxonomy' => 7002,
- );
- // It also must run before nodes are upgraded to use the Field API.
- $dependencies['node'][7006] = array(
- 'taxonomy' => 7002,
- );
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['taxonomy'][7009] = array(
- 'filter' => 7010,
+ // taxonomy_update_7004() migrates taxonomy term data to fields and therefore
+ // must run after all Field modules have been enabled, which happens in
+ // system_update_7027().
+ $dependencies['taxonomy'][7004] = array(
+ 'system' => 7027,
);
return $dependencies;
Modified: branches/drupal7/modules/taxonomy/taxonomy.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/taxonomy/taxonomy.module?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/taxonomy/taxonomy.module (original)
+++ branches/drupal7/modules/taxonomy/taxonomy.module Sun Sep 4 19:26:12 2011
@@ -380,7 +380,26 @@
}
/**
- * Save a vocabulary given a vocabulary object.
+ * Saves a vocabulary.
+ *
+ * @param $vocabulary
+ * A vocabulary object with the following properties:
+ * - vid: The ID of the vocabulary.
+ * - name: The human-readable name of the vocabulary.
+ * - machine_name: The machine name of the vocabulary.
+ * - description: (optional) The vocabulary's description.
+ * - hierarchy: The hierarchy level of the vocabulary.
+ * - module: (optional) The module altering the vocabulary.
+ * - weight: (optional) The weight of this vocabulary in relation to other
+ * vocabularies.
+ * - original: (optional) The original vocabulary object before any changes
+ * are applied.
+ * - old_machine_name: (optional) The original machine name of the
+ * vocabulary.
+ *
+ * @return
+ * Status constant indicating whether the vocabulary was inserted (SAVED_NEW)
+ * or updated(SAVED_UPDATED).
*/
function taxonomy_vocabulary_save($vocabulary) {
// Prevent leading and trailing spaces in vocabulary names.
@@ -491,19 +510,22 @@
}
/**
- * Dynamically check and update the hierarchy flag of a vocabulary.
+ * Checks and updates the hierarchy flag of a vocabulary.
*
* Checks the current parents of all terms in a vocabulary and updates the
- * vocabularies hierarchy setting to the lowest possible level. A hierarchy with
- * no parents in any of its terms will be given a hierarchy of 0. If terms
- * contain at most a single parent, the vocabulary will be given a hierarchy of
- * 1. If any term contain multiple parents, the vocabulary will be given a
- * hierarchy of 2.
+ * vocabulary's hierarchy setting to the lowest possible level. If no term
+ * has parent terms then the vocabulary will be given a hierarchy of 0.
+ * If any term has a single parent then the vocabulary will be given a
+ * hierarchy of 1. If any term has multiple parents then the vocabulary
+ * will be given a hierarchy of 2.
*
* @param $vocabulary
* A vocabulary object.
* @param $changed_term
* An array of the term structure that was updated.
+ *
+ * @return
+ * An integer that represents the level of the vocabulary's hierarchy.
*/
function taxonomy_check_vocabulary_hierarchy($vocabulary, $changed_term) {
$tree = taxonomy_get_tree($vocabulary->vid);
@@ -879,7 +901,8 @@
* An optional vocabulary ID to restrict the child search.
*
* @return
- * An array of term objects which are the children of the term $tid.
+ * An array of term objects that are the children of the term $tid, or an
+ * empty array when no children exist.
*/
function taxonomy_get_children($tid, $vid = 0) {
$children = &drupal_static(__FUNCTION__, array());
@@ -1213,10 +1236,11 @@
if (isset($tag->name)) {
// Commas and quotes in tag names are special cases, so encode 'em.
if (strpos($tag->name, ',') !== FALSE || strpos($tag->name, '"') !== FALSE) {
- $tag->name = '"' . str_replace('"', '""', $tag->name) . '"';
+ $typed_tags[] = '"' . str_replace('"', '""', $tag->name) . '"';
}
-
- $typed_tags[] = $tag->name;
+ else {
+ $typed_tags[] = $tag->name;
+ }
}
}
}
Modified: branches/drupal7/modules/taxonomy/taxonomy.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/taxonomy/taxonomy.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/taxonomy/taxonomy.test (original)
+++ branches/drupal7/modules/taxonomy/taxonomy.test Sun Sep 4 19:26:12 2011
@@ -360,7 +360,6 @@
$this->field_name = drupal_strtolower($this->randomName() . '_field_name');
$this->field = array('field_name' => $this->field_name, 'type' => 'text', 'cardinality' => 4);
$this->field = field_create_field($this->field);
- $this->field_id = $this->field['id'];
$this->instance = array(
'field_name' => $this->field_name,
'entity_type' => 'taxonomy_term',
@@ -370,6 +369,7 @@
field_create_instance($this->instance);
module_disable(array('taxonomy'));
+ drupal_flush_all_caches();
require_once DRUPAL_ROOT . '/includes/install.inc';
drupal_uninstall_modules(array('taxonomy'));
module_enable(array('taxonomy'));
Modified: branches/drupal7/modules/toolbar/toolbar.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/toolbar/toolbar.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/toolbar/toolbar.info (original)
+++ branches/drupal7/modules/toolbar/toolbar.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
package = Core
version = VERSION
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/tracker/tracker.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/tracker/tracker.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/tracker/tracker.info (original)
+++ branches/drupal7/modules/tracker/tracker.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
core = 7.x
files[] = tracker.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/translation/tests/translation_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/translation/tests/translation_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/translation/tests/translation_test.info (original)
+++ branches/drupal7/modules/translation/tests/translation_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
version = VERSION
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/translation/translation.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/translation/translation.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/translation/translation.info (original)
+++ branches/drupal7/modules/translation/translation.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
core = 7.x
files[] = translation.test
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/trigger/tests/trigger_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/trigger/tests/trigger_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/trigger/tests/trigger_test.info (original)
+++ branches/drupal7/modules/trigger/tests/trigger_test.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/trigger/trigger.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/trigger/trigger.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/trigger/trigger.info (original)
+++ branches/drupal7/modules/trigger/trigger.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = trigger.test
configure = admin/structure/trigger
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/tests/aaa_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/tests/aaa_update_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/tests/aaa_update_test.info (original)
+++ branches/drupal7/modules/update/tests/aaa_update_test.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/tests/bbb_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/tests/bbb_update_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/tests/bbb_update_test.info (original)
+++ branches/drupal7/modules/update/tests/bbb_update_test.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/tests/ccc_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/tests/ccc_update_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/tests/ccc_update_test.info (original)
+++ branches/drupal7/modules/update/tests/ccc_update_test.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/tests/update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/tests/update_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/tests/update_test.info (original)
+++ branches/drupal7/modules/update/tests/update_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/update.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/update.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/update.info (original)
+++ branches/drupal7/modules/update/update.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
files[] = update.test
configure = admin/reports/updates/settings
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/update/update.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/update/update.test?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/update/update.test (original)
+++ branches/drupal7/modules/update/update.test Sun Sep 4 19:26:12 2011
@@ -441,6 +441,11 @@
'hidden' => FALSE,
),
);
+ // When there are contributed modules in the site's file system, the
+ // total number of attempts made in the test may exceed the default value
+ // of update_max_fetch_attempts. Therefore this variable is set very high
+ // to avoid test failures in those cases.
+ variable_set('update_max_fetch_attempts', 99999);
variable_set('update_test_system_info', $system_info);
$xml_mapping = array(
'drupal' => '0',
Modified: branches/drupal7/modules/user/tests/user_form_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/user/tests/user_form_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/user/tests/user_form_test.info (original)
+++ branches/drupal7/modules/user/tests/user_form_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/user/user.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/user/user.admin.inc?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/user/user.admin.inc (original)
+++ branches/drupal7/modules/user/user.admin.inc Sun Sep 4 19:26:12 2011
@@ -841,7 +841,7 @@
$form['roles'][$rid]['#weight'] = $order;
$form['roles'][$rid]['weight'] = array(
'#type' => 'textfield',
- '#title' => t('Weight for @title', array('@title' => $name['label'])),
+ '#title' => t('Weight for @title', array('@title' => $name)),
'#title_display' => 'invisible',
'#size' => 4,
'#default_value' => $order,
Modified: branches/drupal7/modules/user/user.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/user/user.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/user/user.info (original)
+++ branches/drupal7/modules/user/user.info Sun Sep 4 19:26:12 2011
@@ -9,8 +9,8 @@
configure = admin/config/people
stylesheets[all][] = user.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/modules/user/user.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/modules/user/user.install?rev=2231&op=diff
==============================================================================
--- branches/drupal7/modules/user/user.install (original)
+++ branches/drupal7/modules/user/user.install Sun Sep 4 19:26:12 2011
@@ -340,24 +340,31 @@
* Implements hook_update_dependencies().
*/
function user_update_dependencies() {
- // Run all the critical user upgrades before everything.
- $dependencies['system'][7000] = array(
- 'user' => 7008,
- );
- // Both user_update_7006() and user_update_7010() need to query the list of
- // existing text formats and therefore must run after filter_update_7003().
- // @todo: move user_update_7006 down below in the upgrade process.
+ // user_update_7006() updates data in the {role_permission} table, so it must
+ // run after system_update_7007(), which populates that table.
$dependencies['user'][7006] = array(
- 'filter' => 7003,
- );
- // user_update_7013 relies on system_update_7060.
+ 'system' => 7007,
+ );
+
+ // user_update_7010() needs to query the {filter_format} table to get a list
+ // of existing text formats, so it must run after filter_update_7000(), which
+ // creates that table.
+ $dependencies['user'][7010] = array(
+ 'filter' => 7000,
+ );
+
+ // user_update_7012() uses the file API, which relies on the {file_managed}
+ // table, so it must run after system_update_7034(), which creates that
+ // table.
+ $dependencies['user'][7012] = array(
+ 'system' => 7034,
+ );
+
+ // user_update_7013() uses the file usage API, which relies on the
+ // {file_usage} table, so it must run after system_update_7059(), which
+ // creates that table.
$dependencies['user'][7013] = array(
'system' => 7059,
- );
- // Ensure that format columns are only changed after Filter module has changed
- // the primary records.
- $dependencies['user'][7015] = array(
- 'filter' => 7010,
);
return $dependencies;
@@ -591,13 +598,6 @@
// Add a new field for the fid.
db_add_field('role_permission', 'module', $module_field);
}
- $permissions = user_permission_get_modules();
- foreach ($permissions as $key => $value) {
- db_update('role_permission')
- ->fields(array('module' => $value))
- ->condition('permission', $key)
- ->execute();
- }
}
/**
Modified: branches/drupal7/profiles/minimal/minimal.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/profiles/minimal/minimal.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/profiles/minimal/minimal.info (original)
+++ branches/drupal7/profiles/minimal/minimal.info Sun Sep 4 19:26:12 2011
@@ -6,8 +6,8 @@
dependencies[] = dblog
files[] = minimal.profile
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/profiles/standard/standard.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/profiles/standard/standard.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/profiles/standard/standard.info (original)
+++ branches/drupal7/profiles/standard/standard.info Sun Sep 4 19:26:12 2011
@@ -25,8 +25,8 @@
dependencies[] = rdf
files[] = standard.profile
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info (original)
+++ branches/drupal7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info (original)
+++ branches/drupal7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info Sun Sep 4 19:26:12 2011
@@ -8,8 +8,8 @@
core = 6.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/profiles/testing/testing.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/profiles/testing/testing.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/profiles/testing/testing.info (original)
+++ branches/drupal7/profiles/testing/testing.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/robots.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/robots.txt?rev=2231&op=diff
==============================================================================
--- branches/drupal7/robots.txt (original)
+++ branches/drupal7/robots.txt Sun Sep 4 19:26:12 2011
@@ -30,6 +30,7 @@
Disallow: /cron.php
Disallow: /INSTALL.mysql.txt
Disallow: /INSTALL.pgsql.txt
+Disallow: /INSTALL.sqlite.txt
Disallow: /install.php
Disallow: /INSTALL.txt
Disallow: /LICENSE.txt
Modified: branches/drupal7/themes/bartik/bartik.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/bartik/bartik.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/bartik/bartik.info (original)
+++ branches/drupal7/themes/bartik/bartik.info Sun Sep 4 19:26:12 2011
@@ -34,8 +34,8 @@
settings[shortcut_module_link] = 0
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/bartik/css/style.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/bartik/css/style.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/bartik/css/style.css (original)
+++ branches/drupal7/themes/bartik/css/style.css Sun Sep 4 19:26:12 2011
@@ -458,10 +458,6 @@
#main-menu {
clear: both;
-}
-#main-menu-links a {
- color: #d9d9d9;
- padding: 0.6em 1em 0.4em;
}
#main-menu-links {
font-size: 0.929em;
@@ -1435,9 +1431,6 @@
div.vertical-tabs .vertical-tabs-panes fieldset.vertical-tabs-pane {
padding: 1em;
}
-#forum tr td.forum {
- padding-left: 35px;
-}
#forum .name {
font-size: 1.083em;
}
Modified: branches/drupal7/themes/garland/garland.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/garland/garland.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/garland/garland.info (original)
+++ branches/drupal7/themes/garland/garland.info Sun Sep 4 19:26:12 2011
@@ -7,8 +7,8 @@
stylesheets[print][] = print.css
settings[garland_width] = fluid
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/seven/page.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/seven/page.tpl.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/seven/page.tpl.php (original)
+++ branches/drupal7/themes/seven/page.tpl.php Sun Sep 4 19:26:12 2011
@@ -11,7 +11,9 @@
</div>
<div id="page">
- <?php print render($secondary_local_tasks); ?>
+ <?php if ($secondary_local_tasks): ?>
+ <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+ <?php endif; ?>
<div id="content" class="clearfix">
<div class="element-invisible"><a id="main-content"></a></div>
Modified: branches/drupal7/themes/seven/seven.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/seven/seven.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/seven/seven.info (original)
+++ branches/drupal7/themes/seven/seven.info Sun Sep 4 19:26:12 2011
@@ -13,8 +13,8 @@
regions[sidebar_first] = First sidebar
regions_hidden[] = sidebar_first
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/seven/style-rtl.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/seven/style-rtl.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/seven/style-rtl.css (original)
+++ branches/drupal7/themes/seven/style-rtl.css Sun Sep 4 19:26:12 2011
@@ -2,23 +2,248 @@
/**
* Generic elements.
*/
+dl dd,
+dl dl {
+ margin-right: 20px;
+}
ul,
.block ul,
.item-list ul,
.item-list ul {
margin: 0.25em 1.5em 0.25em 0;
}
+ol {
+ margin: 0.25em 2em 0.25em 0;
+}
+
+/**
+ * Skip link.
+ */
+#skip-link {
+ right: 50%;
+ margin-right: -5.25em;
+}
+#skip-link a,
+#skip-link a:link,
+#skip-link a:visited {
+ padding: 1px 10px 2px 10px;
+}
+
+/**
+ * Branding.
+ */
+#branding {
+ padding: 20px 20px 0 20px;
+}
+
+#branding div.block {
+ float: left;
+ padding-left: 0;
+ padding-right: 10px;
+}
+#branding div.block form div.form-item {
+ float: right;
+}
+#branding div.block form input.form-text {
+ margin-left: 10px;
+ margin-right: 0;
+}
+
+/**
+ * Help.
+ */
+#help div.more-help-link {
+ text-align: left;
+}
+
+/**
+ * Page title.
+ */
+#branding h1.page-title {
+ float: right;
+}
+
+/**
+ * Tabs.
+ */
+ul.primary li,
+ul.primary li a:link,
+ul.primary li a.active {
+ float: right;
+}
+ul.primary,
+ul.secondary {
+ float: left;
+}
+ul.secondary li {
+ float: none;
+}
+ul.primary {
+ padding-top: 0;
+}
+
+/**
+ * Page layout.
+ */
+#page {
+ padding: 20px 0 40px 0;
+ margin-left: 40px;
+ margin-right: 40px;
+}
+#secondary-links ul.links li {
+ padding: 0 0 10px 10px;
+}
+ul.links li,
+ul.inline li {
+ padding-left: 1em;
+ padding-right: 0;
+}
+ul.admin-list li {
+ padding: 9px 30px 0 0;
+ margin-right: 0;
+ background: url(images/list-item-rtl.png) no-repeat right 11px;
+}
+ul.admin-list li a {
+ margin-right: -30px;
+ margin-left: 0;
+ padding: 0 30px 4px 0;
+}
+ul.admin-list.compact li a {
+ margin-right: 0;
+}
+ul.admin-list li div.description a {
+ margin-right: 0;
+}
+
+/**
+ * Tables.
+ */
+table th.active a {
+ padding: 0 0 0 25px;
+}
+table th.active img {
+ left: 3px;
+ right: auto;
+}
+/**
+ * Exception for webkit bug with the right border of the last cell
+ * in some tables, since it's webkit only, we can use :last-child
+ */
+tr td:last-child {
+ border-left: 1px solid #bebfb9;
+ border-right: none;
+}
+
+/**
+ * Fieldsets.
+ */
+fieldset {
+ padding: 2.5em 0 0 0;
+}
+fieldset .fieldset-legend {
+ padding-right: 15px;
+ right: 0;
+}
+fieldset .fieldset-wrapper {
+ padding: 0 15px 13px 13px;
+}
+
+/* Filter */
+.filter-wrapper .form-item,
+.filter-wrapper .filter-guidelines,
+.filter-wrapper .filter-help {
+ padding: 2px 0 0 0;
+}
+ul.tips li {
+ margin: 0.25em 1.5em 0.25em 0;
+}
+body div.form-type-radio div.description,
+body div.form-type-checkbox div.description {
+ margin-left: 0;
+ margin-right: 1.5em;
+}
+input.form-submit,
+a.button {
+ margin-left: 1em;
+ margin-right: 0;
+}
+ul.action-links li {
+ float: right;
+ margin: 0 0 0 1em;
+}
+ul.action-links a {
+ padding-left: 0;
+ padding-right: 15px;
+ background-position: right center;
+}
+
+/* admin/content and admin/people */
+dl.multiselect,
+dl.multiselect dt,
+dl.multiselect dd {
+ margin: 0 0 0 10px;
+}
+
+/* Update options. */
+div.admin-options label,
+div.admin-options div.form-item {
+ margin-left: 10px;
+ margin-right: 0;
+ float: right;
+}
+
+/* Maintenance theming */
+body.in-maintenance #sidebar-first {
+ float: right;
+}
+body.in-maintenance #content {
+ float: left;
+ padding-left: 20px;
+ padding-right: 0;
+}
+ol.task-list {
+ margin-right: 0;
+}
+ol.task-list li {
+ padding: 0.5em 20px 0.5em 1em;
+}
+ol.task-list li.active {
+ background: transparent url(images/task-item-rtl.png) no-repeat right 50%;
+ padding: 0.5em 20px 0.5em 1em;
+}
+
+/* Overlay theming */
+.overlay #branding div.breadcrumb {
+ float: right;
+}
+.overlay ul.secondary {
+ margin: -1.4em 0 0.3em 0;
+}
+
+/* Shortcut theming */
+div.add-or-remove-shortcuts {
+ float: none;
+ padding-left: 0;
+ padding-right: 6px;
+}
+
+/* Dashboard */
+#dashboard div.block div.content {
+ padding: 10px 5px 5px 5px;
+}
+#dashboard div.block div.content ul.menu {
+ margin-right: 20px;
+}
+
+/* Recent content block */
+#block-node-recent .more-link {
+ padding: 0 0 5px 5px;
+}
/* User login block */
#user-login-form .openid-links {
margin-right: 0;
}
#user-login-form .openid-links .user-link {
- margin-left: 0;
margin-right: 1.5em;
}
-
-/* Sortable tables */
-table th.active a {
- padding: 0 0 0 25px;
-}
Modified: branches/drupal7/themes/seven/style.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/seven/style.css?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/seven/style.css (original)
+++ branches/drupal7/themes/seven/style.css Sun Sep 4 19:26:12 2011
@@ -19,7 +19,7 @@
padding: 0;
border: none;
height: 1px;
- background: #CCCCCC;
+ background: #cccccc;
}
legend {
font-weight: bold;
@@ -57,7 +57,7 @@
}
dl dd,
dl dl {
- margin-left: 20px;
+ margin-left: 20px; /* LTR */
margin-bottom: 10px;
}
blockquote {
@@ -117,7 +117,7 @@
}
ol {
list-style-type: decimal;
- margin: 0.25em 0 0.25em 2em;
+ margin: 0.25em 0 0.25em 2em; /* LTR */
}
.item-list ul li.collapsed,
ul.menu li.collapsed {
@@ -149,8 +149,8 @@
#skip-link {
margin-top: 0;
position: absolute;
- left: 50%;
- margin-left: -5.25em;
+ left: 50%; /* LTR */
+ margin-left: -5.25em; /* LTR */
width: auto;
z-index: 50;
}
@@ -161,7 +161,7 @@
background: #444;
color: #fff;
font-size: 0.94em;
- padding: 1px 10px 2px 10px;
+ padding: 1px 10px 2px 10px; /* LTR */
text-decoration: none;
-moz-border-radius: 0 0 10px 10px;
-webkit-border-top-left-radius: 0;
@@ -181,7 +181,7 @@
*/
#branding {
overflow: hidden;
- padding: 20px 20px 0 20px;
+ padding: 20px 20px 0 20px; /* LTR */
position: relative;
background-color: #e0e0d8;
}
@@ -191,23 +191,23 @@
}
#branding div.block {
position: relative;
- float: right;
+ float: right; /* LTR */
width: 240px;
- padding-left: 10px;
+ padding-left: 10px; /* LTR */
background: #333;
}
#branding div.block form label {
display: none;
}
#branding div.block form div.form-item {
- float: left;
+ float: left; /* LTR */
border: 0;
margin: 0;
padding: 0;
}
#branding div.block form input.form-text {
width: 140px;
- margin-right: 10px;
+ margin-right: 10px; /* LTR */
}
#branding div.block form input.form-submit {
text-align: center;
@@ -225,7 +225,7 @@
margin: 0 0 10px;
}
#help div.more-help-link {
- text-align: right;
+ text-align: right; /* LTR */
}
/**
@@ -241,7 +241,7 @@
padding-bottom: 10px;
font-size: 1.385em;
font-weight: normal;
- float: left;
+ float: left; /* LTR */
}
/**
@@ -255,26 +255,33 @@
* Tabs.
*/
ul.primary {
- float: right;
+ float: right; /* LTR */
border-bottom: none;
- padding: 0.769em 0 5px 8px;
text-transform: uppercase;
font-size: 0.923em;
+ height: 2.60em;
+ margin: 0;
+ padding-top: 0;
}
ul.primary li {
- display: inline;
+ float: left; /* LTR */
list-style: none;
-}
-ul.primary li a,
+ margin: 0 2px;
+}
+ul.primary li a:link,
ul.primary li a.active,
ul.primary li a:active,
ul.primary li a:visited,
ul.primary li a:hover,
ul.primary li.active a {
+ display: block;
+ float: left; /* LTR */
+ height: 2.60em;
+ line-height: 2.60em;
+ padding: 0 18px 8px;
background-color: #a6a7a2;
color: #000;
font-weight: bold;
- padding: 6px 20px;
border-width: 1px 1px 0 1px;
border-style: solid;
border-color: #a6a7a2;
@@ -296,22 +303,25 @@
ul.primary li.active a:hover {
color: #000;
}
+.tabs-secondary {
+ clear: both;
+}
ul.secondary {
- float: none;
- clear: both;
+ float: right; /* LTR */
font-size: 0.923em;
- text-align: right;
- padding: 4px 10px 10px;
+ padding: 0 3px 5px;
line-height: 1.385em;
overflow: hidden;
background-color: #fff;
}
ul.secondary li {
- padding-left: 10px;
+ margin: 0 5px;
+ float: right; /* LTR */
}
ul.secondary li a {
background-color: #ddd;
color: #000;
+ display: inline-block;
}
ul.secondary li a,
ul.secondary li a:hover,
@@ -328,20 +338,23 @@
color: #fff;
background: #666;
}
+#content {
+ clear: left;
+}
/**
* Page layout.
*/
#page {
- padding: 20px 0 40px 0;
- margin-right: 40px;
- margin-left: 40px;
+ padding: 20px 0 40px 0; /* LTR */
+ margin-right: 40px; /* LTR */
+ margin-left: 40px; /* LTR */
background: #fff;
position: relative;
color: #333;
}
#secondary-links ul.links li {
- padding: 0 10px 10px 0;
+ padding: 0 10px 10px 0; /* LTR */
}
#secondary-links ul.links li a {
font-size: 0.923em;
@@ -361,7 +374,7 @@
}
ul.links li,
ul.inline li {
- padding-right: 1em;
+ padding-right: 1em; /* LTR */
}
ul.inline li {
display: inline;
@@ -372,12 +385,12 @@
}
ul.admin-list li {
position: relative;
- padding-left: 30px;
+ padding-left: 30px; /* LTR */
padding-top: 9px;
border-top: 1px solid #ccc;
- margin-left: 0;
+ margin-left: 0; /* LTR */
margin-bottom: 10px;
- background: url(images/list-item.png) no-repeat 0 11px;
+ background: url(images/list-item.png) no-repeat 0 11px; /* LTR */
list-style-type: none;
list-style-image: none;
}
@@ -402,17 +415,17 @@
border-bottom: none;
}
ul.admin-list li a {
- margin-left: -30px;
- padding: 0px 0 4px 30px;
+ margin-left: -30px; /* LTR */
+ padding: 0 0 4px 30px; /* LTR */
min-height: 0;
}
ul.admin-list.compact li a {
- margin-left: 0;
+ margin-left: 0; /* LTR */
padding: 0;
}
ul.admin-list li div.description a {
- margin-left: 0px;
- padding: 0px;
+ margin-left: 0; /* LTR */
+ padding: 0;
min-height: inherit;
}
div.submitted {
@@ -473,7 +486,7 @@
table th.active img {
position: absolute;
top: 3px;
- right: 3px;
+ right: 3px; /* LTR */
}
table td.active {
background: #e9e9dd;
@@ -510,7 +523,7 @@
* in some tables, since it's webkit only, we can use :last-child
*/
tr td:last-child {
- border-right: 1px solid #BEBFB9;
+ border-right: 1px solid #bebfb9; /* LTR */
}
@@ -534,18 +547,18 @@
*/
fieldset {
border: 1px solid #ccc;
- padding: 2.5em 0 0 0;
+ padding: 2.5em 0 0 0; /* LTR */
position: relative;
margin: 1em 0;
}
fieldset .fieldset-legend {
margin-top: 0.5em;
- padding-left: 15px;
+ padding-left: 15px; /* LTR */
position: absolute;
text-transform: uppercase;
}
fieldset .fieldset-wrapper {
- padding: 0 13px 13px 15px;
+ padding: 0 13px 13px 15px; /* LTR */
}
fieldset.collapsed {
background-color: transparent;
@@ -615,7 +628,7 @@
.filter-wrapper .filter-guidelines,
.filter-wrapper .filter-help {
font-size: 0.923em;
- padding: 2px 0 0 0;
+ padding: 2px 0 0 0; /* LTR */
}
ul.tips,
div.description,
@@ -626,18 +639,18 @@
color: #666;
}
ul.tips li {
- margin: 0.25em 0 0.25em 1.5em;
+ margin: 0.25em 0 0.25em 1.5em; /* LTR */
}
body div.form-type-radio div.description,
body div.form-type-checkbox div.description {
- margin-left: 1.5em;
+ margin-left: 1.5em; /* LTR */
}
input.form-submit,
a.button {
cursor: pointer;
padding: 4px 17px;
margin-bottom: 1em;
- margin-right: 1em;
+ margin-right: 1em; /* LTR */
color: #5a5a5a;
text-align: center;
font-weight: normal;
@@ -645,8 +658,8 @@
font-family: "Lucida Grande", Verdana, sans-serif;
border: 1px solid #e4e4e4;
border-bottom: 1px solid #b4b4b4;
- border-left-color: #D2D2D2;
- border-right-color: #D2D2D2;
+ border-left-color: #d2d2d2;
+ border-right-color: #d2d2d2;
background: url(images/buttons.png) 0 0 repeat-x;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
@@ -659,20 +672,11 @@
text-decoration: none;
color: #5a5a5a;
}
-div.node-form input#edit-submit,
-div.node-form input#edit-submit-1 {
- border: 1px solid #8eB7cd;
- border-left-color: #8eB7cd;
- border-right-color: #8eB7cd;
- border-bottom-color: #7691a2;
- background: url(images/buttons.png) 0px -40px repeat-x;
- color: #133B54;
-}
input.form-submit:active {
background: #666;
color: #fff;
border-color: #555;
- text-shadow: #222 0px -1px 0px;
+ text-shadow: #222 0 -1px 0;
}
input.form-button-disabled,
input.form-button-disabled:active {
@@ -707,16 +711,16 @@
}
ul.action-links {
margin: 1em 0;
- padding: 0 20px 0 20px;
+ padding: 0 20px 0 20px; /* LTR */
list-style-type: none;
overflow: hidden;
}
ul.action-links li {
- float: left;
- margin: 0 1em 0 0;
+ float: left; /* LTR */
+ margin: 0 1em 0 0; /* LTR */
}
ul.action-links a {
- padding-left: 15px;
+ padding-left: 15px; /* LTR */
background: transparent url(images/add.png) no-repeat 0 center;
line-height: 30px;
}
@@ -772,7 +776,7 @@
dl.multiselect,
dl.multiselect dt,
dl.multiselect dd {
- margin: 0 10px 0 0;
+ margin: 0 10px 0 0; /* LTR */
}
dl.multiselect select,
dl.multiselect dd select {
@@ -796,8 +800,8 @@
}
div.admin-options label,
div.admin-options div.form-item {
- margin-right: 10px;
- float: left;
+ margin-right: 10px; /* LTR */
+ float: left; /* LTR */
}
div.admin-options div.form-item {
padding: 0;
@@ -811,13 +815,14 @@
/* Maintenance theming */
body.in-maintenance #sidebar-first {
- float: left;
+ float: left; /* LTR */
width: 200px;
}
body.in-maintenance #content {
- float: right;
+ float: right; /* LTR */
width: 550px;
- padding-right: 20px;
+ padding-right: 20px; /* LTR */
+ clear: none;
}
body.in-maintenance #page {
overflow: auto;
@@ -860,7 +865,7 @@
}
ol.task-list li.done {
color: #393;
- background: transparent url(images/task-check.png) no-repeat 0px 50%; /* LTR */
+ background: transparent url(images/task-check.png) no-repeat 0 50%;
color: green;
}
@@ -879,7 +884,7 @@
padding: 0 20px;
}
.overlay #branding div.breadcrumb {
- float: left;
+ float: left; /* LTR */
position: relative;
z-index: 10;
}
@@ -894,7 +899,8 @@
}
.overlay ul.secondary {
background: transparent none;
- margin: -2.4em 0 0.3em 0;
+ margin: -1.4em 0 0.3em 0; /* LTR */
+ overflow: visible;
}
.overlay #content {
padding: 0;
@@ -905,9 +911,9 @@
/* Shortcut theming */
div.add-or-remove-shortcuts {
- float: left;
+ float: left; /* LTR */
padding-top: 6px;
- padding-left: 6px;
+ padding-left: 6px; /* LTR */
}
/* Dashboard */
@@ -920,10 +926,10 @@
padding: 3px 10px;
}
#dashboard div.block div.content {
- padding: 10px 5px 5px 5px;
+ padding: 10px 5px 5px 5px; /* LTR */
}
#dashboard div.block div.content ul.menu {
- margin-left: 20px;
+ margin-left: 20px; /* LTR */
}
#dashboard .dashboard-region .block {
border: #ccc 1px solid;
@@ -960,7 +966,7 @@
border: none;
}
#block-node-recent .more-link {
- padding: 0 5px 5px 0;
+ padding: 0 5px 5px 0; /* LTR */
}
/* User login block */
@@ -988,7 +994,7 @@
padding: 0.4em 0.6em;
}
.overlay-disable-message-focused #overlay-dismiss-message {
- background-color: #59A0D8;
+ background-color: #59a0d8;
color: #fff;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
Modified: branches/drupal7/themes/seven/template.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/seven/template.php?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/seven/template.php (original)
+++ branches/drupal7/themes/seven/template.php Sun Sep 4 19:26:12 2011
@@ -17,9 +17,11 @@
*/
function seven_preprocess_html(&$vars) {
// Add conditional CSS for IE8 and below.
- drupal_add_css(path_to_theme() . '/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
+ drupal_add_css(path_to_theme() . '/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
+ // Add conditional CSS for IE7 and below.
+ drupal_add_css(path_to_theme() . '/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
// Add conditional CSS for IE6.
- drupal_add_css(path_to_theme() . '/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
+ drupal_add_css(path_to_theme() . '/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 6', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
}
/**
Modified: branches/drupal7/themes/stark/stark.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/stark/stark.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/stark/stark.info (original)
+++ branches/drupal7/themes/stark/stark.info Sun Sep 4 19:26:12 2011
@@ -5,8 +5,8 @@
core = 7.x
stylesheets[all][] = layout.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/tests/test_theme/test_theme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/tests/test_theme/test_theme.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/tests/test_theme/test_theme.info (original)
+++ branches/drupal7/themes/tests/test_theme/test_theme.info Sun Sep 4 19:26:12 2011
@@ -15,8 +15,8 @@
; file within the theme folder.
stylesheets[all][] = system.base.css
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/tests/update_test_basetheme/update_test_basetheme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/tests/update_test_basetheme/update_test_basetheme.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/tests/update_test_basetheme/update_test_basetheme.info (original)
+++ branches/drupal7/themes/tests/update_test_basetheme/update_test_basetheme.info Sun Sep 4 19:26:12 2011
@@ -3,8 +3,8 @@
core = 7.x
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
Modified: branches/drupal7/themes/tests/update_test_subtheme/update_test_subtheme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/drupal7/themes/tests/update_test_subtheme/update_test_subtheme.info?rev=2231&op=diff
==============================================================================
--- branches/drupal7/themes/tests/update_test_subtheme/update_test_subtheme.info (original)
+++ branches/drupal7/themes/tests/update_test_subtheme/update_test_subtheme.info Sun Sep 4 19:26:12 2011
@@ -4,8 +4,8 @@
base theme = update_test_basetheme
hidden = TRUE
-; Information added by drupal.org packaging script on 2011-07-27
-version = "7.6"
+; Information added by drupal.org packaging script on 2011-08-31
+version = "7.8"
project = "drupal"
-datestamp = "1311798715"
+datestamp = "1314817616"
More information about the Pkg-drupal-commits
mailing list