contrib modules security updates
This commit is contained in:
@@ -812,8 +812,6 @@ class view extends views_db_object {
|
||||
if (isset($arg)) {
|
||||
$this->args[$position] = $arg;
|
||||
}
|
||||
// remember that this argument was computed, not passed on the URL.
|
||||
$argument->is_default = TRUE;
|
||||
}
|
||||
|
||||
// Set the argument, which will also validate that the argument can be set.
|
||||
@@ -1150,7 +1148,7 @@ class view extends views_db_object {
|
||||
$cache = $this->display_handler->get_plugin('cache');
|
||||
}
|
||||
if ($cache && $cache->cache_get('results')) {
|
||||
if($this->query->pager->use_pager()) {
|
||||
if($this->query->pager->use_pager() || !empty($this->get_total_rows)) {
|
||||
$this->query->pager->total_items = $this->total_rows;
|
||||
$this->query->pager->update_page_info();
|
||||
}
|
||||
@@ -1593,7 +1591,7 @@ class view extends views_db_object {
|
||||
$position = 0;
|
||||
if (!empty($this->argument)) {
|
||||
foreach ($this->argument as $argument_id => $argument) {
|
||||
if (!empty($argument->is_default) && !empty($argument->options['default_argument_skip_url'])) {
|
||||
if (!empty($argument->options['default_argument_skip_url'])) {
|
||||
unset($args[$position]);
|
||||
}
|
||||
$position++;
|
||||
@@ -1818,6 +1816,9 @@ class view extends views_db_object {
|
||||
$this->vid = $vid ? $vid : NULL;
|
||||
}
|
||||
|
||||
// Let modules modify the view just prior to saving it.
|
||||
module_invoke_all('views_view_presave', $this);
|
||||
|
||||
$transaction = db_transaction();
|
||||
|
||||
try {
|
||||
@@ -1848,6 +1849,9 @@ class view extends views_db_object {
|
||||
|
||||
// Clear caches.
|
||||
views_invalidate_cache();
|
||||
|
||||
// Notify modules that this view has been saved.
|
||||
module_invoke_all('views_view_save', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1887,6 +1891,9 @@ class view extends views_db_object {
|
||||
// Clear caches.
|
||||
views_invalidate_cache();
|
||||
}
|
||||
|
||||
// Notify modules that this view has been deleted.
|
||||
module_invoke_all('views_view_delete', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2076,25 +2083,26 @@ class view extends views_db_object {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find and initialize the localizer plugin.
|
||||
* Find and initialize the localization plugin.
|
||||
*/
|
||||
function init_localization() {
|
||||
if (isset($this->localization_plugin) && is_object($this->localization_plugin)) {
|
||||
return TRUE;
|
||||
// If the translate attribute isn't set, init the localization plugin.
|
||||
if (!isset($this->localization_plugin->translate)) {
|
||||
$this->localization_plugin = views_get_plugin('localization', views_get_localization_plugin());
|
||||
|
||||
// If the plugin is still not set, turn off all localization by using the
|
||||
// views_plugin_localization_none plugin. This plugin has the translate
|
||||
// property set to FALSE, signifying localization should not occur.
|
||||
if (empty($this->localization_plugin)) {
|
||||
$this->localization_plugin = views_get_plugin('localization', 'none');
|
||||
}
|
||||
|
||||
// Init the plugin.
|
||||
$this->localization_plugin->init($this);
|
||||
}
|
||||
|
||||
$this->localization_plugin = views_get_plugin('localization', views_get_localization_plugin());
|
||||
|
||||
if (empty($this->localization_plugin)) {
|
||||
$this->localization_plugin = views_get_plugin('localization', 'none');
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Figure out whether there should be options.
|
||||
*/
|
||||
$this->localization_plugin->init($this);
|
||||
|
||||
// Return the value of the translate property. This is set to FALSE if
|
||||
// localization is off.
|
||||
return $this->localization_plugin->translate;
|
||||
}
|
||||
|
||||
@@ -2102,6 +2110,10 @@ class view extends views_db_object {
|
||||
* Determine whether a view supports admin string translation.
|
||||
*/
|
||||
function is_translatable() {
|
||||
// Use translation no matter what type of view.
|
||||
if (variable_get('views_localize_all', FALSE)) {
|
||||
return TRUE;
|
||||
}
|
||||
// If the view is normal or overridden, use admin string translation.
|
||||
// A newly created view won't have a type. Accept this.
|
||||
return (!isset($this->type) || in_array($this->type, array(t('Normal'), t('Overridden')))) ? TRUE : FALSE;
|
||||
@@ -2566,7 +2578,7 @@ class views_display extends views_db_object {
|
||||
var $display_options;
|
||||
|
||||
var $db_table = 'views_display';
|
||||
function views_display($init = TRUE) {
|
||||
function __construct($init = TRUE) {
|
||||
parent::init($init);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user