Commit a1cffa44 authored by Mattia Migliorini's avatar Mattia Migliorini

Merge branch 'master' of code.ubuntu-it.org:ubuntu-it-web/www-test

parents 488e8291 6b796190
Drupal 7.34, 2014-11-19
----------------------
- Fixed security issues (multiple vulnerabilities). See SA-CORE-2014-006.
Drupal 7.33, 2014-11-07
-----------------------
- Began storing the file modification time of each module and theme in the
......
......@@ -8,7 +8,7 @@
/**
* The current system version.
*/
define('VERSION', '7.33');
define('VERSION', '7.34');
/**
* Core API compatibility.
......
......@@ -140,7 +140,7 @@ function _password_enforce_log2_boundaries($count_log2) {
* @param $algo
* The string name of a hashing algorithm usable by hash(), like 'sha256'.
* @param $password
* The plain-text password to hash.
* Plain-text password up to 512 bytes (128 to 512 UTF-8 characters) to hash.
* @param $setting
* An existing hash or the output of _password_generate_salt(). Must be
* at least 12 characters (the settings and salt).
......@@ -150,6 +150,10 @@ function _password_enforce_log2_boundaries($count_log2) {
* The return string will be truncated at DRUPAL_HASH_LENGTH characters max.
*/
function _password_crypt($algo, $password, $setting) {
// Prevent DoS attacks by refusing to hash large passwords.
if (strlen($password) > 512) {
return FALSE;
}
// The first 12 characters of an existing hash are its setting string.
$setting = substr($setting, 0, 12);
......
......@@ -79,7 +79,7 @@ function _drupal_session_read($sid) {
// Handle the case of first time visitors and clients that don't store
// cookies (eg. web crawlers).
$insecure_session_name = substr(session_name(), 1);
if (!isset($_COOKIE[session_name()]) && !isset($_COOKIE[$insecure_session_name])) {
if (empty($sid) || (!isset($_COOKIE[session_name()]) && !isset($_COOKIE[$insecure_session_name]))) {
$user = drupal_anonymous_user();
return '';
}
......
......@@ -7,8 +7,8 @@ files[] = aggregator.test
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = block.test
configure = admin/structure/block
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -13,8 +13,8 @@ regions[footer] = Footer
regions[highlighted] = Highlighted
regions[help] = Help
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = blog.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ files[] = book.test
configure = admin/content/book/settings
stylesheets[all][] = book.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = color.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -9,8 +9,8 @@ files[] = comment.test
configure = admin/content/comment
stylesheets[all][] = comment.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = contact.test
configure = admin/structure/contact
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = contextual.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ files[] = dashboard.test
dependencies[] = block
configure = admin/dashboard/customize
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = dblog.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -11,8 +11,8 @@ dependencies[] = field_sql_storage
required = TRUE
stylesheets[all][] = theme/field.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ dependencies[] = field
files[] = field_sql_storage.test
required = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ dependencies[] = field
dependencies[] = options
files[] = tests/list.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = number.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = options.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ dependencies[] = field
files[] = text.test
required = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ files[] = field_test.entity.inc
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = field_ui.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = field
files[] = tests/file.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ files[] = filter.test
required = TRUE
configure = admin/config/content/formats
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -9,8 +9,8 @@ files[] = forum.test
configure = admin/structure/forum
stylesheets[all][] = forum.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = help.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ dependencies[] = file
files[] = image.test
configure = admin/config/media/image-styles
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = image_module_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = locale.test
configure = admin/config/regional/language
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = menu.test
configure = admin/structure/menu
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -9,8 +9,8 @@ required = TRUE
configure = admin/structure/types
stylesheets[all][] = node.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Core
core = 7.x
files[] = openid.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = openid
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ package = Core
version = VERSION
core = 7.x
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = path.test
configure = admin/config/search/path
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = php.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = poll.test
stylesheets[all][] = poll.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -11,8 +11,8 @@ configure = admin/config/people/profile
; See user_system_info_alter().
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
files[] = rdf.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -8,8 +8,8 @@ files[] = search.test
configure = admin/config/search/settings
stylesheets[all][] = search.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = shortcut.test
configure = admin/config/user-interface/shortcut
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -56,8 +56,8 @@ files[] = tests/upgrade/update.trigger.test
files[] = tests/upgrade/update.field.test
files[] = tests/upgrade/update.user.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ stylesheets[all][] = common_test.css
stylesheets[print][] = common_test.print.css
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
dependencies[] = entity_cache_test_dependency
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = file_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -57,4 +57,25 @@ class PasswordHashingTest extends DrupalWebTestCase {
$this->assertFalse(user_needs_new_hash($account), 'Re-hashed password does not need a new hash.');
$this->assertTrue(user_check_password($password, $account), 'Password check succeeds with re-hashed password.');
}
/**
* Verifies that passwords longer than 512 bytes are not hashed.
*/
public function testLongPassword() {
$password = str_repeat('x', 512);
$result = user_hash_password($password);
$this->assertFalse(empty($result), '512 byte long password is allowed.');
$password = str_repeat('x', 513);
$result = user_hash_password($password);
$this->assertFalse($result, '513 byte long password is not allowed.');
// Check a string of 3-byte UTF-8 characters.
$password = str_repeat('€', 170);
$result = user_hash_password($password);
$this->assertFalse(empty($result), '510 byte long password is allowed.');
$password .= 'xx';
$this->assertFalse(empty($result), '512 byte long password is allowed.');
$password = str_repeat('€', 171);
$result = user_hash_password($password);
$this->assertFalse($result, '513 byte long password is not allowed.');
}
}
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ core = 7.x
hidden = TRUE
package = Testing
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = _missing_dependency
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = system_incompatible_core_version_test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 5.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ hidden = TRUE
; system_incompatible_module_version_test declares version 1.0
dependencies[] = system_incompatible_module_version_test (>2.0)
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = 1.0
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = system_test.module
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
dependencies[] = taxonomy
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ hidden = TRUE
settings[basetheme_only] = base theme value
settings[subtheme_override] = base theme value
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ hidden = TRUE
settings[subtheme_override] = subtheme value
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -17,8 +17,8 @@ stylesheets[all][] = system.base.css
settings[theme_test_setting] = default value
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = statistics.test
configure = admin/config/system/statistics
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = syslog.test
configure = admin/config/development/logging
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -12,8 +12,8 @@ files[] = system.test
required = TRUE
configure = admin/config/system
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -8,8 +8,8 @@ files[] = taxonomy.module
files[] = taxonomy.test
configure = admin/structure/taxonomy
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ core = 7.x
package = Core
version = VERSION
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ version = VERSION
core = 7.x
files[] = tracker.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ package = Testing
version = VERSION
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ version = VERSION
core = 7.x
files[] = translation.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ package = Testing
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = trigger.test
configure = admin/structure/trigger
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ package = Testing
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ package = Testing
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ package = Testing
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -3,8 +3,8 @@ description = Test theme which acts as a base theme for other test subthemes.
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ core = 7.x
base theme = update_test_basetheme
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
files[] = update.test
configure = admin/reports/updates/settings
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -9,8 +9,8 @@ required = TRUE
configure = admin/config/people
stylesheets[all][] = user.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ core = 7.x
dependencies[] = block
dependencies[] = dblog
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -24,8 +24,8 @@ dependencies[] = field_ui
dependencies[] = file
dependencies[] = rdf
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -6,8 +6,8 @@ core = 7.x
hidden = TRUE
files[] = drupal_system_listing_compatible_test.test
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -8,8 +8,8 @@ version = VERSION
core = 6.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -4,8 +4,8 @@ version = VERSION
core = 7.x
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
File mode changed from 100755 to 100644
......@@ -4,9 +4,9 @@ core = 7.x
dependencies[] = ctools
package = Chaos tool suite
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -6,9 +6,9 @@ files[] = includes/context.inc
files[] = includes/math-expr.inc
files[] = includes/stylizer.inc
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -298,7 +298,7 @@ function ctools_break_phrase($str) {
/**
* Set a token/value pair to be replaced later in the request, specifically in
* ctools_preprocess_page().
* ctools_page_token_processing().
*
* @param $token
* The token to be replaced later, during page rendering. This should
......@@ -654,15 +654,15 @@ function ctools_page_token_processing($children, $elements) {
list($type, $argument) = $key;
switch ($type) {
case 'variable':
$tokens[$token] = isset($variables[$argument]) ? $variables[$argument] : '';
$tokens[$token] = isset($elements[$argument]) ? $elements[$argument] : '';
break;
case 'callback':
if (is_string($argument) && function_exists($argument)) {
$tokens[$token] = $argument($variables);
$tokens[$token] = $argument($elements);
}
if (is_array($argument) && function_exists($argument[0])) {
$function = array_shift($argument);
$argument = array_merge(array(&$variables), $argument);
$argument = array_merge(array(&$elements), $argument);
$tokens[$token] = call_user_func_array($function, $argument);
}
break;
......
......@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -4,9 +4,9 @@ package = Chaos tool suite
dependencies[] = ctools
core = 7.x
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -7,9 +7,9 @@ dependencies[] = page_manager
dependencies[] = advanced_help
core = 7.x
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -24,6 +24,17 @@ The following information can be specified for each plugin type:
<dt>cache table</dt>
<dd><em>Defaults to:</em> <strong>'cache'</strong></dd>
<dd>If 'cache' is TRUE, then this value specifies the cache table where the cached plugin information will be stored.</dd>
<dt>classes</dt>
<dd><em>Defaults to:</em> <strong>array()</strong></dd>
<dd>An array of <em>class identifiers</em>(i.e. plugin array keys) which a plugin of this type uses to provide classes to the CTools autoloader. For example, if <strong>classes</strong> is set to array('class'), then CTools will search each <strong>$plugin['class']</strong> for a class to autoload. Depending of the plugin structure, a <em>class identifier</em> may be either:</dd>
<dl>
<dt>- a file name:</dt>
<dd>the file which holds the class with the name structure as: <em>[filename].[class].php</em></dd>
<dd>in this case the class name can be different than the <em>class identifier</em></dd>
<dt>- the class name:</dt>
<dd>if the class is in the same file as the $plugin</dd>
<dd>the plugin <em>.inc</em> file can have a different name than the <em>class identifier</em></dd>
</dl>
<dt>defaults</dt>
<dd><em>Defaults to:</em> <strong>array()</strong></dd>
<dd>An array of defaults that should be added to each plugin; this can be used to ensure that every plugin has the basic data necessary. These defaults will not ovewrite data supplied by the plugin. This could also be a function name, in which case the callback will be used to provide defaults. NOTE, however, that the callback-based approach is deprecated as it is redundant with the 'process' callback, and as such will be removed in later versions. Consequently, you should only use the array form for maximum cross-version compatibility.</dd>
......
......@@ -49,6 +49,34 @@ function ctools_ajax_text_button($text, $dest, $alt, $class = '', $type = 'use-a
return l($text, $dest, array('html' => TRUE, 'attributes' => array('class' => array($type, $class), 'title' => $alt)));
}
/**
* Render an icon and related text as a link. This will automatically apply an AJAX class
* to the link and add the appropriate javascript to make this happen.
*
* Note: 'html' => true so be sure any text is vetted! Chances are these kinds of buttons will
* not use user input so this is a very minor concern.
*
* @param $text
* The text that will be displayed as the link.
* @param $image
* The icon image to include in the link.
* @param $dest
* The destination of the link.
* @param $alt
* The title text of the link.
* @param $class
* Any class to apply to the link. @todo this should be a options array.
* @param $type
* A type to use, in case a different behavior should be attached. Defaults
* to ctools-use-ajax.
*/
function ctools_ajax_icon_text_button($text, $image, $dest, $alt, $class = '', $type = 'use-ajax') {
drupal_add_library('system', 'drupal.ajax');
$rendered_image = theme('image', array('path' => $image));
$link_content = $rendered_image . "<span>" . $text . "</span>";
return l($link_content, $dest, array('html' => TRUE, 'attributes' => array('class' => array($type, $class), 'title' => $alt)));
}
/**
* Set a single property to a value, on all matched elements.
*
......
......@@ -188,8 +188,15 @@ function ctools_modal_text_button($text, $dest, $alt, $class = '') {
* Wrap a form so that we can use it properly with AJAX. Essentially if the
* form wishes to render, it automatically does that, otherwise it returns
* so we can see submission results.
* @param array $form
* An associative array containing the structure of the form.
* @param array $form_state
* An associative array containing the current state of the form.
* If the 'reset_html_ids' key is set to TRUE, it will prevent HTML IDs in
* forms from being incremented.
*
* @return
* @return mixed
* The output of the form, if it was rendered. If $form_state['ajax']
* is set, this will use ctools_modal_form_render so it will be
* a $command object suitable for ajax_render already.
......@@ -199,6 +206,13 @@ function ctools_modal_text_button($text, $dest, $alt, $class = '') {
* form will never be redirected.
*/
function ctools_modal_form_wrapper($form_id, &$form_state) {
// Since this will run again on form rebuild while still in the modal, prevent
// form IDs from being incremented.
// @todo https://drupal.org/node/1305882
if (!empty($form_state['reset_html_ids']) && !empty($_POST['ajax_html_ids'])) {
unset($_POST['ajax_html_ids']);
}
// This won't override settings already in.
$form_state += array(
're_render' => FALSE,
......
......@@ -29,16 +29,3 @@ function ctools_passthrough($module, $type, &$items) {
}
}
}
/**
* Implementation of hook_theme_registry_alter()
*/
function ctools_theme_registry_alter(&$registry) {
// Move this one last last last so it can catch changes made by modules and themes.
$key = array_search('ctools_preprocess_page', $registry['page']['preprocess functions']);
if ($key) {
unset($registry['page']['preprocess functions'][$key]);
}
$registry['page']['preprocess functions'][] = 'ctools_preprocess_page';
}
......@@ -258,6 +258,10 @@
$('input[type=submit], button', this).click(function(event) {
Drupal.ajax[base].element = this;
this.form.clk = this;
// Stop autocomplete from submitting.
if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
return false;
}
// An empty event means we were triggered via .click() and
// in jquery 1.4 this won't trigger a submit.
if (event.bubbles == undefined) {
......
......@@ -4,9 +4,9 @@ core = 7.x
dependencies[] = ctools
package = Chaos tool suite
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -443,7 +443,7 @@ function page_manager_page_form_basic($form, &$form_state) {
'#type' => 'checkbox',
'#default_value' => !empty($page->make_frontpage),
'#title' => t('Make this your site home page.'),
'#description' => t('To set this panel as your home page you must create a unique path name with no % placeholders in the path. The site home page is currently set to %homepage on the !siteinfo configuration form.', array('!siteinfo' => l(t('Site Information'), 'admin/settings/site-information'), '%homepage' => '/' . $frontpage)),
'#description' => t('To set this panel as your home page you must create a unique path name with no % placeholders in the path. The site home page is currently set to %homepage on the !siteinfo configuration form.', array('!siteinfo' => l(t('Site Information'), 'admin/config/system/site-information'), '%homepage' => '/' . $frontpage)),
);
$form['admin_paths'] = array(
'#type' => 'checkbox',
......
......@@ -14,6 +14,8 @@ $plugin = array(
'title' => t('String'),
'description' => t('A context that is just a string.'),
'context' => 'ctools_context_create_string',
'edit form' => 'ctools_context_string_settings_form',
'defaults' => '',
'keyword' => 'string',
'no ui' => FALSE,
'context name' => 'string',
......@@ -44,7 +46,8 @@ function ctools_context_create_string($empty, $data = NULL, $conf = FALSE) {
}
if ($data !== FALSE ) {
$context->data = $data;
// Support the array storage from the settings form but also handle direct input from arguments.
$context->data = is_array($data) ? $data['string'] : $data;
$context->title = ($conf) ? check_plain($data['identifier']) : check_plain($data);
return $context;
}
......@@ -62,3 +65,23 @@ function ctools_context_string_convert($context, $type) {
}
}
/**
* String settings form.
*/
function ctools_context_string_settings_form($form, &$form_state) {
$conf = &$form_state['conf'];
$form['string'] = array(
'#title' => t('Enter the string'),
'#type' => 'textfield',
'#maxlength' => 512,
'#weight' => -10,
'#default_value' => $conf['string'],
);
return $form;
}
function ctools_context_string_settings_form_submit($form, &$form_state) {
$form_state['conf']['string'] = $form_state['values']['string'];
}
......@@ -154,6 +154,11 @@ function ctools_entity_from_field_get_children($parent_plugin, $parent) {
* Return a new context based on an existing context.
*/
function ctools_entity_from_field_context($context, $conf) {
// Perform access check on current logged in user.
global $user;
// Clone user object so account can be passed by value to access callback.
$account = clone $user;
$delta = !empty($conf['delta']) ? intval($conf['delta']) : 0;
$plugin = $conf['name'];
list($plugin, $plugin_name) = explode(':', $plugin);
......@@ -176,8 +181,11 @@ function ctools_entity_from_field_context($context, $conf) {
$plugin_info = ctools_get_relationship($conf['name']);
$to_entity_id = $items[$delta][$plugin_info['source key']];
$loaded_to_entity = array_shift(entity_load($to_entity, array($to_entity_id)));
if(function_exists($to_entity_info['access callback']) && !call_user_func($to_entity_info['access callback'], 'view', $loaded_to_entity)) {
$loaded_to_entity = entity_load($to_entity, array($to_entity_id));
$loaded_to_entity = array_shift($loaded_to_entity);
// Pass current user account and entity type to access callback.
if (function_exists($to_entity_info['access callback']) && !call_user_func($to_entity_info['access callback'], 'view', $loaded_to_entity, $account, $to_entity)) {
return ctools_context_create_empty('entity:' . $to_entity, NULL);
}
else {
......
......@@ -5,9 +5,9 @@ package = Chaos tool suite
dependencies[] = ctools
dependencies[] = color
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -3,9 +3,9 @@ description = Controls access to context based upon term depth
core = 7.x
dependencies[] = ctools
package = Chaos tool suite
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -7,9 +7,9 @@ hidden = TRUE
files[] = ctools_export.test
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -11,9 +11,9 @@ files[] = math_expression.test
files[] = math_expression_stack.test
hidden = TRUE
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -145,12 +145,12 @@ function views_content_views_content_type_render($subtype, $conf, $panel_args, $
}
if (!empty($contexts[$cid])) {
$arg = ctools_context_convert_context($contexts[$cid], $converter, array('sanitize' => FALSE));
array_splice($args, $count, 0, array($arg));
}
else {
// Make sure we put an argument in even if it was not there.
$arg = NULL;
}
array_splice($args, $count, 0, array($arg));
}
}
......
......@@ -9,9 +9,9 @@ files[] = plugins/views/views_content_plugin_display_ctools_context.inc
files[] = plugins/views/views_content_plugin_display_panel_pane.inc
files[] = plugins/views/views_content_plugin_style_ctools_context.inc
; Information added by Drupal.org packaging script on 2014-02-12
version = "7.x-1.4"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.x-1.5"
core = "7.x"
project = "ctools"
datestamp = "1392220730"
datestamp = "1416423525"
......@@ -34,8 +34,8 @@ regions[footer] = Footer
settings[shortcut_module_link] = 0
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -7,8 +7,8 @@ stylesheets[all][] = style.css
stylesheets[print][] = print.css
settings[garland_width] = fluid
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -13,8 +13,8 @@ regions[page_bottom] = Page bottom
regions[sidebar_first] = First sidebar
regions_hidden[] = sidebar_first
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
......@@ -5,8 +5,8 @@ version = VERSION
core = 7.x
stylesheets[all][] = layout.css
; Information added by Drupal.org packaging script on 2014-11-07
version = "7.33"
; Information added by Drupal.org packaging script on 2014-11-19
version = "7.34"
project = "drupal"
datestamp = "1415375131"
datestamp = "1416429488"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment