updated core to 7.54
This commit is contained in:
parent
44557a31f0
commit
b9ffb21f32
@ -1,4 +1,32 @@
|
||||
|
||||
Drupal 7.54, 2017-02-01
|
||||
-----------------------
|
||||
- Modules are now able to define theme engines (API addition:
|
||||
https://www.drupal.org/node/2826480).
|
||||
- Logging of searches can now be disabled (new option in the administrative
|
||||
interface).
|
||||
- Added menu tree render structure to (pre-)process hooks for theme_menu_tree()
|
||||
(API addition: https://www.drupal.org/node/2827134).
|
||||
- Added new function for determining whether an HTTPS request is being served
|
||||
(API addition: https://www.drupal.org/node/2824590).
|
||||
- Fixed incorrect default value for short and medium date formats on the date
|
||||
type configuration page.
|
||||
- File validation error message is now removed after subsequent upload of valid
|
||||
file.
|
||||
- Numerous bug fixes.
|
||||
- Numerous API documentation improvements.
|
||||
- Additional performance improvements.
|
||||
- Additional automated test coverage.
|
||||
|
||||
Drupal 7.53, 2016-12-07
|
||||
-----------------------
|
||||
- Fixed drag and drop support on newer Chrome/IE 11+ versions after 7.51 update
|
||||
when jQuery is updated to 1.7-1.11.0.
|
||||
|
||||
Drupal 7.52, 2016-11-16
|
||||
-----------------------
|
||||
- Fixed security issues (multiple vulnerabilities). See SA-CORE-2016-005.
|
||||
|
||||
Drupal 7.51, 2016-10-05
|
||||
-----------------------
|
||||
- The Update module now also checks for updates to a disabled theme that is
|
||||
|
@ -8,7 +8,7 @@
|
||||
/**
|
||||
* The current system version.
|
||||
*/
|
||||
define('VERSION', '7.51');
|
||||
define('VERSION', '7.54');
|
||||
|
||||
/**
|
||||
* Core API compatibility.
|
||||
@ -718,6 +718,16 @@ function drupal_valid_http_host($host) {
|
||||
&& preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether an HTTPS request is being served.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the request is HTTPS, FALSE otherwise.
|
||||
*/
|
||||
function drupal_is_https() {
|
||||
return isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the base URL, cookie domain, and session name from configuration.
|
||||
*/
|
||||
@ -731,7 +741,7 @@ function drupal_settings_initialize() {
|
||||
if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) {
|
||||
include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php';
|
||||
}
|
||||
$is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
|
||||
$is_https = drupal_is_https();
|
||||
|
||||
if (isset($base_url)) {
|
||||
// Parse fixed base URL from settings.php.
|
||||
|
@ -122,7 +122,12 @@ function cache_get_multiple(array &$cids, $bin = 'cache') {
|
||||
* the administrator panel.
|
||||
* - cache_path: Stores the system paths that have an alias.
|
||||
* @param $expire
|
||||
* (optional) One of the following values:
|
||||
* (optional) Controls the maximum lifetime of this cache entry. Note that
|
||||
* caches might be subject to clearing at any time, so this setting does not
|
||||
* guarantee a minimum lifetime. With this in mind, the cache should not be
|
||||
* used for data that must be kept during a cache clear, like sessions.
|
||||
*
|
||||
* Use one of the following values:
|
||||
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
|
||||
* explicitly told to using cache_clear_all() with a cache ID.
|
||||
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next
|
||||
@ -262,7 +267,12 @@ interface DrupalCacheInterface {
|
||||
* 1MB in size to be stored by default. When caching large arrays or
|
||||
* similar, take care to ensure $data does not exceed this size.
|
||||
* @param $expire
|
||||
* (optional) One of the following values:
|
||||
* (optional) Controls the maximum lifetime of this cache entry. Note that
|
||||
* caches might be subject to clearing at any time, so this setting does not
|
||||
* guarantee a minimum lifetime. With this in mind, the cache should not be
|
||||
* used for data that must be kept during a cache clear, like sessions.
|
||||
*
|
||||
* Use one of the following values:
|
||||
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
|
||||
* explicitly told to using cache_clear_all() with a cache ID.
|
||||
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next
|
||||
|
@ -3986,7 +3986,11 @@ function drupal_html_id($id) {
|
||||
// be merged with content already on the base page. The HTML IDs must be
|
||||
// unique for the fully merged content. Therefore, initialize $seen_ids to
|
||||
// take into account IDs that are already in use on the base page.
|
||||
$seen_ids_init = &drupal_static(__FUNCTION__ . ':init');
|
||||
static $drupal_static_fast;
|
||||
if (!isset($drupal_static_fast['seen_ids_init'])) {
|
||||
$drupal_static_fast['seen_ids_init'] = &drupal_static(__FUNCTION__ . ':init');
|
||||
}
|
||||
$seen_ids_init = &$drupal_static_fast['seen_ids_init'];
|
||||
if (!isset($seen_ids_init)) {
|
||||
// Ideally, Drupal would provide an API to persist state information about
|
||||
// prior page requests in the database, and we'd be able to add this
|
||||
@ -4031,7 +4035,10 @@ function drupal_html_id($id) {
|
||||
}
|
||||
}
|
||||
}
|
||||
$seen_ids = &drupal_static(__FUNCTION__, $seen_ids_init);
|
||||
if (!isset($drupal_static_fast['seen_ids'])) {
|
||||
$drupal_static_fast['seen_ids'] = &drupal_static(__FUNCTION__, $seen_ids_init);
|
||||
}
|
||||
$seen_ids = &$drupal_static_fast['seen_ids'];
|
||||
|
||||
$id = strtr(drupal_strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
|
||||
|
||||
|
@ -1231,6 +1231,21 @@ class SelectQuery extends Query implements SelectQueryInterface {
|
||||
|
||||
// Modules may alter all queries or only those having a particular tag.
|
||||
if (isset($this->alterTags)) {
|
||||
// Many contrib modules assume that query tags used for access-checking
|
||||
// purposes follow the pattern $entity_type . '_access'. But this is
|
||||
// not the case for taxonomy terms, since core used to add term_access
|
||||
// instead of taxonomy_term_access to its queries. Provide backwards
|
||||
// compatibility by adding both tags here instead of attempting to fix
|
||||
// all contrib modules in a coordinated effort.
|
||||
// TODO:
|
||||
// - Extract this mechanism into a hook as part of a public (non-security)
|
||||
// issue.
|
||||
// - Emit E_USER_DEPRECATED if term_access is used.
|
||||
// https://www.drupal.org/node/2575081
|
||||
$term_access_tags = array('term_access' => 1, 'taxonomy_term_access' => 1);
|
||||
if (array_intersect_key($this->alterTags, $term_access_tags)) {
|
||||
$this->alterTags += $term_access_tags;
|
||||
}
|
||||
$hooks = array('query');
|
||||
foreach ($this->alterTags as $tag => $value) {
|
||||
$hooks[] = 'query_' . $tag;
|
||||
|
@ -12,11 +12,6 @@ function system_default_date_formats() {
|
||||
$formats = array();
|
||||
|
||||
// Short date formats.
|
||||
$formats[] = array(
|
||||
'type' => 'short',
|
||||
'format' => 'Y-m-d H:i',
|
||||
'locales' => array(),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'short',
|
||||
'format' => 'm/d/Y - H:i',
|
||||
@ -37,6 +32,11 @@ function system_default_date_formats() {
|
||||
'format' => 'd.m.Y - H:i',
|
||||
'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'short',
|
||||
'format' => 'Y-m-d H:i',
|
||||
'locales' => array(),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'short',
|
||||
'format' => 'm/d/Y - g:ia',
|
||||
@ -84,11 +84,6 @@ function system_default_date_formats() {
|
||||
);
|
||||
|
||||
// Medium date formats.
|
||||
$formats[] = array(
|
||||
'type' => 'medium',
|
||||
'format' => 'D, Y-m-d H:i',
|
||||
'locales' => array(),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'medium',
|
||||
'format' => 'D, m/d/Y - H:i',
|
||||
@ -104,6 +99,11 @@ function system_default_date_formats() {
|
||||
'format' => 'D, Y/m/d - H:i',
|
||||
'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'medium',
|
||||
'format' => 'D, Y-m-d H:i',
|
||||
'locales' => array(),
|
||||
);
|
||||
$formats[] = array(
|
||||
'type' => 'medium',
|
||||
'format' => 'F j, Y - H:i',
|
||||
|
@ -1176,7 +1176,7 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
|
||||
// If the session token was set by drupal_prepare_form(), ensure that it
|
||||
// matches the current user's session. This is duplicate to code in
|
||||
// form_builder() but left to protect any custom form handling code.
|
||||
if (isset($form['#token'])) {
|
||||
if (!empty($form['#token'])) {
|
||||
if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) {
|
||||
_drupal_invalid_token_set_form_error();
|
||||
// Stop here and don't run any further validation handlers, because they
|
||||
@ -1837,7 +1837,7 @@ function form_builder($form_id, &$element, &$form_state) {
|
||||
// If the session token was set by drupal_prepare_form(), ensure that it
|
||||
// matches the current user's session.
|
||||
$form_state['invalid_token'] = FALSE;
|
||||
if (isset($element['#token'])) {
|
||||
if (!empty($element['#token'])) {
|
||||
if (empty($form_state['input']['form_token']) || !drupal_valid_token($form_state['input']['form_token'], $element['#token'])) {
|
||||
// Set an early form error to block certain input processing since that
|
||||
// opens the door for CSRF vulnerabilities.
|
||||
|
@ -1606,6 +1606,7 @@ function _menu_tree_data(&$links, $parents, $depth) {
|
||||
* Implements template_preprocess_HOOK() for theme_menu_tree().
|
||||
*/
|
||||
function template_preprocess_menu_tree(&$variables) {
|
||||
$variables['#tree'] = $variables['tree'];
|
||||
$variables['tree'] = $variables['tree']['#children'];
|
||||
}
|
||||
|
||||
@ -2682,7 +2683,7 @@ function menu_link_load($mlid) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the cached cached data for a single named menu.
|
||||
* Clears the cached data for a single named menu.
|
||||
*/
|
||||
function menu_cache_clear($menu_name = 'navigation') {
|
||||
$cache_cleared = &drupal_static(__FUNCTION__, array());
|
||||
|
@ -133,7 +133,7 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface {
|
||||
* @param $uri
|
||||
* A string containing the URI that should be used for this instance.
|
||||
*/
|
||||
function setUri($uri);
|
||||
public function setUri($uri);
|
||||
|
||||
/**
|
||||
* Returns the stream resource URI.
|
||||
@ -219,7 +219,6 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface {
|
||||
public function dirname($uri = NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Drupal stream wrapper base class for local files.
|
||||
*
|
||||
@ -549,6 +548,155 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
|
||||
return fclose($this->handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets metadata on the stream.
|
||||
*
|
||||
* WARNING: Do not call this method directly! It will be called internally by
|
||||
* PHP itself when one of the following functions is called on a stream URL:
|
||||
*
|
||||
* @param string $uri
|
||||
* A string containing the URI to the file to set metadata on.
|
||||
* @param int $option
|
||||
* One of:
|
||||
* - STREAM_META_TOUCH: The method was called in response to touch().
|
||||
* - STREAM_META_OWNER_NAME: The method was called in response to chown()
|
||||
* with string parameter.
|
||||
* - STREAM_META_OWNER: The method was called in response to chown().
|
||||
* - STREAM_META_GROUP_NAME: The method was called in response to chgrp().
|
||||
* - STREAM_META_GROUP: The method was called in response to chgrp().
|
||||
* - STREAM_META_ACCESS: The method was called in response to chmod().
|
||||
* @param mixed $value
|
||||
* If option is:
|
||||
* - STREAM_META_TOUCH: Array consisting of two arguments of the touch()
|
||||
* function.
|
||||
* - STREAM_META_OWNER_NAME or STREAM_META_GROUP_NAME: The name of the owner
|
||||
* user/group as string.
|
||||
* - STREAM_META_OWNER or STREAM_META_GROUP: The value of the owner
|
||||
* user/group as integer.
|
||||
* - STREAM_META_ACCESS: The argument of the chmod() as integer.
|
||||
*
|
||||
* @return bool
|
||||
* Returns TRUE on success or FALSE on failure. If $option is not
|
||||
* implemented, FALSE should be returned.
|
||||
*
|
||||
* @see touch()
|
||||
* @see chmod()
|
||||
* @see chown()
|
||||
* @see chgrp()
|
||||
* @link http://php.net/manual/streamwrapper.stream-metadata.php
|
||||
*/
|
||||
public function stream_metadata($uri, $option, $value) {
|
||||
$target = $this->getLocalPath($uri);
|
||||
$return = FALSE;
|
||||
switch ($option) {
|
||||
case STREAM_META_TOUCH:
|
||||
if (!empty($value)) {
|
||||
$return = touch($target, $value[0], $value[1]);
|
||||
}
|
||||
else {
|
||||
$return = touch($target);
|
||||
}
|
||||
break;
|
||||
|
||||
case STREAM_META_OWNER_NAME:
|
||||
case STREAM_META_OWNER:
|
||||
$return = chown($target, $value);
|
||||
break;
|
||||
|
||||
case STREAM_META_GROUP_NAME:
|
||||
case STREAM_META_GROUP:
|
||||
$return = chgrp($target, $value);
|
||||
break;
|
||||
|
||||
case STREAM_META_ACCESS:
|
||||
$return = chmod($target, $value);
|
||||
break;
|
||||
}
|
||||
if ($return) {
|
||||
// For convenience clear the file status cache of the underlying file,
|
||||
// since metadata operations are often followed by file status checks.
|
||||
clearstatcache(TRUE, $target);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Truncate stream.
|
||||
*
|
||||
* Will respond to truncation; e.g., through ftruncate().
|
||||
*
|
||||
* @param int $new_size
|
||||
* The new size.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE on success, FALSE otherwise.
|
||||
*/
|
||||
public function stream_truncate($new_size) {
|
||||
return ftruncate($this->handle, $new_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the underlying stream resource.
|
||||
*
|
||||
* This method is called in response to stream_select().
|
||||
*
|
||||
* @param int $cast_as
|
||||
* Can be STREAM_CAST_FOR_SELECT when stream_select() is calling
|
||||
* stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for
|
||||
* other uses.
|
||||
*
|
||||
* @return resource|false
|
||||
* The underlying stream resource or FALSE if stream_select() is not
|
||||
* supported.
|
||||
*
|
||||
* @see stream_select()
|
||||
* @link http://php.net/manual/streamwrapper.stream-cast.php
|
||||
*/
|
||||
public function stream_cast($cast_as) {
|
||||
return $this->handle ? $this->handle : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change stream options.
|
||||
*
|
||||
* This method is called to set options on the stream.
|
||||
*
|
||||
* Since Windows systems do not allow it and it is not needed for most use
|
||||
* cases anyway, this method is not supported on local files and will trigger
|
||||
* an error and return false. If needed, custom subclasses can provide
|
||||
* OS-specific implementations for advanced use cases.
|
||||
*
|
||||
* @param int $option
|
||||
* One of:
|
||||
* - STREAM_OPTION_BLOCKING: The method was called in response to
|
||||
* stream_set_blocking().
|
||||
* - STREAM_OPTION_READ_TIMEOUT: The method was called in response to
|
||||
* stream_set_timeout().
|
||||
* - STREAM_OPTION_WRITE_BUFFER: The method was called in response to
|
||||
* stream_set_write_buffer().
|
||||
* @param int $arg1
|
||||
* If option is:
|
||||
* - STREAM_OPTION_BLOCKING: The requested blocking mode:
|
||||
* - 1 means blocking.
|
||||
* - 0 means not blocking.
|
||||
* - STREAM_OPTION_READ_TIMEOUT: The timeout in seconds.
|
||||
* - STREAM_OPTION_WRITE_BUFFER: The buffer mode, STREAM_BUFFER_NONE or
|
||||
* STREAM_BUFFER_FULL.
|
||||
* @param int $arg2
|
||||
* If option is:
|
||||
* - STREAM_OPTION_BLOCKING: This option is not set.
|
||||
* - STREAM_OPTION_READ_TIMEOUT: The timeout in microseconds.
|
||||
* - STREAM_OPTION_WRITE_BUFFER: The requested buffer size.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE on success, FALSE otherwise. If $option is not implemented, FALSE
|
||||
* should be returned.
|
||||
*/
|
||||
public function stream_set_option($option, $arg1, $arg2) {
|
||||
trigger_error('stream_set_option() not supported for local file based stream wrappers', E_USER_WARNING);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support for unlink().
|
||||
*
|
||||
|
@ -580,12 +580,20 @@ Drupal.tableDrag.prototype.dropRow = function (event, self) {
|
||||
* Get the mouse coordinates from the event (allowing for browser differences).
|
||||
*/
|
||||
Drupal.tableDrag.prototype.mouseCoords = function (event) {
|
||||
// Complete support for pointer events was only introduced to jQuery in
|
||||
// version 1.11.1; between versions 1.7 and 1.11.0 pointer events have the
|
||||
// clientX and clientY properties undefined. In those cases, the properties
|
||||
// must be retrieved from the event.originalEvent object instead.
|
||||
var clientX = event.clientX || event.originalEvent.clientX;
|
||||
var clientY = event.clientY || event.originalEvent.clientY;
|
||||
|
||||
if (event.pageX || event.pageY) {
|
||||
return { x: event.pageX, y: event.pageY };
|
||||
}
|
||||
|
||||
return {
|
||||
x: event.clientX + document.body.scrollLeft - document.body.clientLeft,
|
||||
y: event.clientY + document.body.scrollTop - document.body.clientTop
|
||||
x: clientX + document.body.scrollLeft - document.body.clientLeft,
|
||||
y: clientY + document.body.scrollTop - document.body.clientTop
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = block.test
|
||||
configure = admin/structure/block
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -13,8 +13,8 @@ regions[footer] = Footer
|
||||
regions[highlighted] = Highlighted
|
||||
regions[help] = Help
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = blog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ files[] = book.test
|
||||
configure = admin/content/book/settings
|
||||
stylesheets[all][] = book.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = color.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -122,7 +122,7 @@ class ColorTestCase extends DrupalWebTestCase {
|
||||
$edit['palette[bg]'] = $color;
|
||||
$this->drupalPost($settings_path, $edit, t('Save configuration'));
|
||||
|
||||
if($is_valid) {
|
||||
if ($is_valid) {
|
||||
$this->assertText('The configuration options have been saved.');
|
||||
}
|
||||
else {
|
||||
|
@ -9,8 +9,8 @@ files[] = comment.test
|
||||
configure = admin/content/comment
|
||||
stylesheets[all][] = comment.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -11,7 +11,13 @@ class CommentHelperCase extends DrupalWebTestCase {
|
||||
protected $node;
|
||||
|
||||
function setUp() {
|
||||
parent::setUp('comment', 'search');
|
||||
$modules = func_get_args();
|
||||
if (isset($modules[0]) && is_array($modules[0])) {
|
||||
$modules = $modules[0];
|
||||
}
|
||||
$modules[] = 'comment';
|
||||
parent::setUp($modules);
|
||||
|
||||
// Create users and test node.
|
||||
$this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks', 'administer actions', 'administer fields'));
|
||||
$this->web_user = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments'));
|
||||
@ -1490,7 +1496,7 @@ class CommentNodeAccessTest extends CommentHelperCase {
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
DrupalWebTestCase::setUp('comment', 'search', 'node_access_test');
|
||||
parent::setUp('search', 'node_access_test');
|
||||
node_access_rebuild();
|
||||
|
||||
// Create users and test node.
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = contact.test
|
||||
configure = admin/structure/contact
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = contextual.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ files[] = dashboard.test
|
||||
dependencies[] = block
|
||||
configure = admin/dashboard/customize
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -420,6 +420,6 @@ function dblog_clear_log_form($form) {
|
||||
*/
|
||||
function dblog_clear_log_submit() {
|
||||
$_SESSION['dblog_overview_filter'] = array();
|
||||
db_delete('watchdog')->execute();
|
||||
db_truncate('watchdog')->execute();
|
||||
drupal_set_message(t('Database log cleared.'));
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = dblog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -11,8 +11,8 @@ dependencies[] = field_sql_storage
|
||||
required = TRUE
|
||||
stylesheets[all][] = theme/field.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ dependencies[] = field
|
||||
files[] = field_sql_storage.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ dependencies[] = field
|
||||
dependencies[] = options
|
||||
files[] = tests/list.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = number.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -164,6 +164,15 @@ function number_field_presave($entity_type, $entity, $field, $instance, $langcod
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($field['type'] == 'number_float') {
|
||||
// Remove the decimal point from float values with decimal
|
||||
// point but no decimal numbers.
|
||||
foreach ($items as $delta => $item) {
|
||||
if (isset($item['value'])) {
|
||||
$items[$delta]['value'] = floatval($item['value']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -152,4 +152,50 @@ class NumberFieldTestCase extends DrupalWebTestCase {
|
||||
);
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test number_float field.
|
||||
*/
|
||||
function testNumberFloatField() {
|
||||
$this->field = array(
|
||||
'field_name' => drupal_strtolower($this->randomName()),
|
||||
'type' => 'number_float',
|
||||
'settings' => array(
|
||||
'precision' => 8, 'scale' => 4, 'decimal_separator' => '.',
|
||||
)
|
||||
);
|
||||
field_create_field($this->field);
|
||||
$this->instance = array(
|
||||
'field_name' => $this->field['field_name'],
|
||||
'entity_type' => 'test_entity',
|
||||
'bundle' => 'test_bundle',
|
||||
'widget' => array(
|
||||
'type' => 'number',
|
||||
),
|
||||
'display' => array(
|
||||
'default' => array(
|
||||
'type' => 'number_float',
|
||||
),
|
||||
),
|
||||
);
|
||||
field_create_instance($this->instance);
|
||||
|
||||
$langcode = LANGUAGE_NONE;
|
||||
$value = array(
|
||||
'9.' => '9',
|
||||
'.' => '0',
|
||||
'123.55' => '123.55',
|
||||
'.55' => '0.55',
|
||||
'-0.55' => '-0.55',
|
||||
);
|
||||
foreach($value as $key => $value) {
|
||||
$edit = array(
|
||||
"{$this->field['field_name']}[$langcode][0][value]" => $key,
|
||||
);
|
||||
$this->drupalPost('test-entity/add/test-bundle', $edit, t('Save'));
|
||||
$this->assertNoText("PDOException");
|
||||
$this->assertRaw($value, 'Correct value is displayed.');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = options.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -23,8 +23,15 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
'type' => 'list_integer',
|
||||
'cardinality' => 1,
|
||||
'settings' => array(
|
||||
// Make sure that 0 works as an option.
|
||||
'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>', 3 => 'Some HTML encoded markup with < & >'),
|
||||
'allowed_values' => array(
|
||||
// Make sure that 0 works as an option.
|
||||
0 => 'Zero',
|
||||
1 => 'One',
|
||||
// Make sure that option text is properly sanitized.
|
||||
2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
|
||||
// Make sure that HTML entities in option text are not double-encoded.
|
||||
3 => 'Some HTML encoded markup with < & >',
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->card_1 = field_create_field($this->card_1);
|
||||
@ -35,8 +42,13 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
'type' => 'list_integer',
|
||||
'cardinality' => 2,
|
||||
'settings' => array(
|
||||
// Make sure that 0 works as an option.
|
||||
'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
|
||||
'allowed_values' => array(
|
||||
// Make sure that 0 works as an option.
|
||||
0 => 'Zero',
|
||||
1 => 'One',
|
||||
// Make sure that option text is properly sanitized.
|
||||
2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->card_2 = field_create_field($this->card_2);
|
||||
@ -47,8 +59,12 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
'type' => 'list_boolean',
|
||||
'cardinality' => 1,
|
||||
'settings' => array(
|
||||
// Make sure that 0 works as a 'on' value'.
|
||||
'allowed_values' => array(1 => 'Zero', 0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
|
||||
'allowed_values' => array(
|
||||
// Make sure that 1 works as a 'on' value'.
|
||||
1 => 'Zero',
|
||||
// Make sure that option text is properly sanitized.
|
||||
0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
|
||||
),
|
||||
),
|
||||
);
|
||||
$this->bool = field_create_field($this->bool);
|
||||
|
@ -7,8 +7,8 @@ dependencies[] = field
|
||||
files[] = text.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ files[] = field_test.entity.inc
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = field_ui.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = tests/file.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -280,7 +280,8 @@ function file_ajax_upload() {
|
||||
$form['#suffix'] .= '<span class="ajax-new-content"></span>';
|
||||
}
|
||||
|
||||
$output = theme('status_messages') . drupal_render($form);
|
||||
$form['#prefix'] .= theme('status_messages');
|
||||
$output = drupal_render($form);
|
||||
$js = drupal_add_js();
|
||||
$settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
|
||||
|
||||
|
@ -596,6 +596,56 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
|
||||
$this->doTestTemporaryFileRemovalExploit($victim_uid, $attacker_uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests validation with the Upload button.
|
||||
*/
|
||||
function testWidgetValidation() {
|
||||
$type_name = 'article';
|
||||
$field_name = strtolower($this->randomName());
|
||||
$this->createFileField($field_name, $type_name);
|
||||
$this->updateFileField($field_name, $type_name, array('file_extensions' => 'txt'));
|
||||
|
||||
foreach (array('nojs', 'js') as $type) {
|
||||
// Create node and prepare files for upload.
|
||||
$node = $this->drupalCreateNode(array('type' => 'article'));
|
||||
$nid = $node->nid;
|
||||
$this->drupalGet("node/$nid/edit");
|
||||
$test_file_text = $this->getTestFile('text');
|
||||
$test_file_image = $this->getTestFile('image');
|
||||
$field = field_info_field($field_name);
|
||||
$name = 'files[' . $field_name . '_' . LANGUAGE_NONE . '_0]';
|
||||
|
||||
// Upload file with incorrect extension, check for validation error.
|
||||
$edit[$name] = drupal_realpath($test_file_image->uri);
|
||||
switch ($type) {
|
||||
case 'nojs':
|
||||
$this->drupalPost(NULL, $edit, t('Upload'));
|
||||
break;
|
||||
|
||||
case 'js':
|
||||
$button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
|
||||
$this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
|
||||
break;
|
||||
}
|
||||
$error_message = t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => 'txt'));
|
||||
$this->assertRaw($error_message, t('Validation error when file with wrong extension uploaded (JSMode=%type).', array('%type' => $type)));
|
||||
|
||||
// Upload file with correct extension, check that error message is removed.
|
||||
$edit[$name] = drupal_realpath($test_file_text->uri);
|
||||
switch ($type) {
|
||||
case 'nojs':
|
||||
$this->drupalPost(NULL, $edit, t('Upload'));
|
||||
break;
|
||||
|
||||
case 'js':
|
||||
$button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]');
|
||||
$this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value']));
|
||||
break;
|
||||
}
|
||||
$this->assertNoRaw($error_message, t('Validation error removed when file with correct extension uploaded (JSMode=%type).', array('%type' => $type)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for testing exploiting the temporary file removal using fid.
|
||||
*
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ files[] = filter.test
|
||||
required = TRUE
|
||||
configure = admin/config/content/formats
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -1638,7 +1638,7 @@ function _filter_url_escape_comments($match, $escape = NULL) {
|
||||
// Replace all HTML coments with a '<!-- [hash] -->' placeholder.
|
||||
if ($mode) {
|
||||
$content = $match[1];
|
||||
$hash = md5($content);
|
||||
$hash = hash('sha256', $content);
|
||||
$comments[$hash] = $content;
|
||||
return "<!-- $hash -->";
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ files[] = forum.test
|
||||
configure = admin/structure/forum
|
||||
stylesheets[all][] = forum.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = help.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ dependencies[] = file
|
||||
files[] = image.test
|
||||
configure = admin/config/media/image-styles
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = image_module_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = locale.test
|
||||
configure = admin/config/regional/language
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = menu.test
|
||||
configure = admin/structure/menu
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -9,8 +9,8 @@ required = TRUE
|
||||
configure = admin/structure/types
|
||||
stylesheets[all][] = node.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Core
|
||||
core = 7.x
|
||||
files[] = openid.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = openid
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -4,8 +4,8 @@ package = Core
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = path.test
|
||||
configure = admin/config/search/path
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = php.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = poll.test
|
||||
stylesheets[all][] = poll.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -11,8 +11,8 @@ configure = admin/config/people/profile
|
||||
; See user_system_info_alter().
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = rdf.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = blog
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -125,6 +125,16 @@ function search_admin_settings($form) {
|
||||
'#options' => $module_options,
|
||||
'#description' => t('Choose which search module is the default.')
|
||||
);
|
||||
$form['logging'] = array(
|
||||
'#type' => 'fieldset',
|
||||
'#title' => t('Logging')
|
||||
);
|
||||
$form['logging']['search_logging'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Log searches'),
|
||||
'#default_value' => variable_get('search_logging', 1),
|
||||
'#description' => t('If checked, all searches will be logged. Uncheck to skip logging. Logging may affect performance.'),
|
||||
);
|
||||
$form['#validate'][] = 'search_admin_settings_validate';
|
||||
$form['#submit'][] = 'search_admin_settings_submit';
|
||||
|
||||
|
@ -8,8 +8,8 @@ files[] = search.test
|
||||
configure = admin/config/search/settings
|
||||
stylesheets[all][] = search.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -12,6 +12,7 @@ function search_uninstall() {
|
||||
variable_del('minimum_word_size');
|
||||
variable_del('overlap_cjk');
|
||||
variable_del('search_cron_limit');
|
||||
variable_del('search_logging');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,9 +57,10 @@ function search_view($module = NULL, $keys = '') {
|
||||
}
|
||||
// Only search if there are keywords or non-empty conditions.
|
||||
if ($keys || !empty($conditions)) {
|
||||
// Log the search keys.
|
||||
watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys));
|
||||
|
||||
if (variable_get('search_logging', TRUE)) {
|
||||
// Log the search keys.
|
||||
watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys));
|
||||
}
|
||||
// Collect the search results.
|
||||
$results = search_data($keys, $info['module'], $conditions);
|
||||
}
|
||||
|
@ -1453,7 +1453,7 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
|
||||
parent::setUp('search', 'search_extra_type');
|
||||
|
||||
// Login as a user that can create and search content.
|
||||
$this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks'));
|
||||
$this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks', 'access site reports'));
|
||||
$this->drupalLogin($this->search_user);
|
||||
|
||||
// Add a single piece of content and index it.
|
||||
@ -1502,6 +1502,19 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
|
||||
);
|
||||
$this->drupalPost('admin/config/search/settings', $edit, t('Save configuration'));
|
||||
$this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.');
|
||||
|
||||
// Test logging setting. It should be on by default.
|
||||
$text = $this->randomName(5);
|
||||
$this->drupalPost('search/node', array('keys' => $text), t('Search'));
|
||||
$this->drupalGet('admin/reports/dblog');
|
||||
$this->assertLink('Searched Content for ' . $text . '.', 0, 'Search was logged');
|
||||
|
||||
// Turn off logging.
|
||||
variable_set('search_logging', FALSE);
|
||||
$text = $this->randomName(5);
|
||||
$this->drupalPost('search/node', array('keys' => $text), t('Search'));
|
||||
$this->drupalGet('admin/reports/dblog');
|
||||
$this->assertNoLink('Searched Content for ' . $text . '.', 'Search was not logged');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = shortcut.test
|
||||
configure = admin/config/user-interface/shortcut
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -1374,10 +1374,11 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
* @see DrupalWebTestCase::tearDown()
|
||||
*/
|
||||
protected function prepareEnvironment() {
|
||||
global $user, $language, $conf;
|
||||
global $user, $language, $language_url, $conf;
|
||||
|
||||
// Store necessary current values before switching to prefixed database.
|
||||
$this->originalLanguage = $language;
|
||||
$this->originalLanguageUrl = $language_url;
|
||||
$this->originalLanguageDefault = variable_get('language_default');
|
||||
$this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files');
|
||||
$this->originalProfile = drupal_get_profile();
|
||||
@ -1387,7 +1388,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
// 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' => '');
|
||||
$language_url = $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => '');
|
||||
|
||||
// Save and clean the shutdown callbacks array because it is static cached
|
||||
// and will be changed by the test run. Otherwise it will contain callbacks
|
||||
@ -1445,7 +1446,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
* @see DrupalWebTestCase::prepareEnvironment()
|
||||
*/
|
||||
protected function setUp() {
|
||||
global $user, $language, $conf;
|
||||
global $user, $language, $language_url, $conf;
|
||||
|
||||
// Create the database prefix for this test.
|
||||
$this->prepareDatabasePrefix();
|
||||
@ -1542,7 +1543,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
|
||||
// Set up English language.
|
||||
unset($conf['language_default']);
|
||||
$language = language_default();
|
||||
$language_url = $language = language_default();
|
||||
|
||||
// Use the test mail class instead of the default mail handler class.
|
||||
variable_set('mail_system', array('default-system' => 'TestingMailSystem'));
|
||||
@ -1636,7 +1637,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
* and reset the database prefix.
|
||||
*/
|
||||
protected function tearDown() {
|
||||
global $user, $language;
|
||||
global $user, $language, $language_url;
|
||||
|
||||
// In case a fatal error occurred that was not in the test process read the
|
||||
// log to pick up any fatal errors.
|
||||
@ -1701,6 +1702,7 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||
|
||||
// Reset language.
|
||||
$language = $this->originalLanguage;
|
||||
$language_url = $this->originalLanguageUrl;
|
||||
if ($this->originalLanguageDefault) {
|
||||
$GLOBALS['conf']['language_default'] = $this->originalLanguageDefault;
|
||||
}
|
||||
|
@ -57,8 +57,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 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -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 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -7,8 +7,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = entity_cache_test_dependency
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = file_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -690,6 +690,14 @@ class FormValidationTestCase extends DrupalWebTestCase {
|
||||
$this->assertText('The form has become outdated. Copy any unsaved work in the form below');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that a form with a disabled CSRF token can be validated.
|
||||
*/
|
||||
function testDisabledToken() {
|
||||
$this->drupalPost('form-test/validate-no-token', array(), 'Save');
|
||||
$this->assertText('The form_test_validate_no_token form has been submitted successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests partial form validation through #limit_validation_errors.
|
||||
*/
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -37,6 +37,13 @@ function form_test_menu() {
|
||||
'access callback' => TRUE,
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
$items['form-test/validate-no-token'] = array(
|
||||
'title' => 'Form validation without a CSRF token',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('form_test_validate_no_token'),
|
||||
'access callback' => TRUE,
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
$items['form-test/limit-validation-errors'] = array(
|
||||
'title' => 'Form validation with some error suppression',
|
||||
'page callback' => 'drupal_get_form',
|
||||
@ -454,6 +461,27 @@ function form_test_validate_required_form_no_title_submit($form, &$form_state) {
|
||||
drupal_set_message('The form_test_validate_required_form_no_title form was submitted successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Form builder for testing submission of a form without a CSRF token.
|
||||
*/
|
||||
function form_test_validate_no_token($form, &$form_state) {
|
||||
$form['submit'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => 'Save',
|
||||
);
|
||||
|
||||
$form['#token'] = FALSE;
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form submission handler for form_test_validate_no_token().
|
||||
*/
|
||||
function form_test_validate_no_token_submit($form, &$form_state) {
|
||||
drupal_set_message('The form_test_validate_no_token form has been submitted successfully.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a simple form with a button triggering partial validation.
|
||||
*/
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user