security upadtes
This commit is contained in:
@@ -44,13 +44,12 @@ function views_schema($caller_function = FALSE) {
|
||||
// Generate a sorted list of available schema update functions.
|
||||
if ($get_current || empty($schemas)) {
|
||||
$get_current = FALSE;
|
||||
$functions = get_defined_functions();
|
||||
foreach ($functions['user'] as $function) {
|
||||
if (strpos($function, 'views_schema_') === 0) {
|
||||
$version = substr($function, strlen('views_schema_'));
|
||||
if (is_numeric($version)) {
|
||||
$schemas[] = $version;
|
||||
}
|
||||
// Provide a worst-case scenario range.
|
||||
$start_schema = 6000;
|
||||
$end_schema = 7999;
|
||||
for ($i = $start_schema; $i <= $end_schema; $i++) {
|
||||
if (function_exists('views_schema_' . $i)) {
|
||||
$schemas[] = $i;
|
||||
}
|
||||
}
|
||||
if ($schemas) {
|
||||
@@ -253,8 +252,7 @@ function views_schema_6000() {
|
||||
),
|
||||
);
|
||||
|
||||
// $schema['cache_views_data'] added in views_schema_6006()
|
||||
|
||||
// $schema['cache_views_data'] added in views_schema_6006().
|
||||
return $schema;
|
||||
}
|
||||
|
||||
@@ -296,8 +294,10 @@ function views_update_6001() {
|
||||
update_sql("UPDATE {blocks} SET delta = CONCAT(delta, '-block_1') WHERE module = 'views'");
|
||||
}
|
||||
|
||||
// NOTE: Update 6002 removed because it did not always work.
|
||||
// Update 6004 implements the change correctly.
|
||||
/*
|
||||
* NOTE: Update 6002 removed because it did not always work.
|
||||
* Update 6004 implements the change correctly.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add missing unique key.
|
||||
@@ -488,7 +488,7 @@ function views_update_6011() {
|
||||
*/
|
||||
function views_update_6012() {
|
||||
// There is only one simple query to run.
|
||||
$update = db_update('blocks')
|
||||
db_update('blocks')
|
||||
->condition('module', 'views')
|
||||
->condition('delta', db_like('-exp-') . '%', 'LIKE')
|
||||
->fields(array('cache' => DRUPAL_NO_CACHE));
|
||||
|
Reference in New Issue
Block a user