more module updates

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-20 18:19:49 +02:00
parent 2121a356b3
commit cde7b73a73
39 changed files with 660 additions and 258 deletions

View File

@@ -53,7 +53,7 @@ class views_php_plugin_access extends views_plugin_access {
*/
function access($account) {
if (!empty($this->options['php_access'])) {
return views_php_check_access($this->options['php_access'], $this->view->name, $this->view->current_display, $account);
return views_php_check_access($this->options['php_access'], $this->view->name, $this->display->id, $account);
}
return TRUE;
}
@@ -63,7 +63,7 @@ class views_php_plugin_access extends views_plugin_access {
*/
function get_access_callback() {
if (!empty($this->options['php_access'])) {
return array('views_php_check_access', array($this->options['php_access'], $this->view->name, $this->view->current_display));
return array('views_php_check_access', array($this->options['php_access'], $this->view->name, $this->display->id));
}
return TRUE;
}

View File

@@ -43,6 +43,13 @@ class views_php_plugin_cache extends views_plugin_cache {
);
}
/**
* Implements views_plugin#options_submit()
*/
function options_submit(&$form, &$form_state) {
$form_state['values']['cache_options'] += $form_state['values']['options'];
}
/**
* Implements views_plugin_cache#cache_get()
*/

View File

@@ -15,9 +15,9 @@ files[] = plugins/views/views_php_plugin_pager.inc
files[] = plugins/views/views_php_plugin_query.inc
files[] = plugins/views/views_php_plugin_wrapper.inc
; Information added by drupal.org packaging script on 2013-09-11
version = "7.x-1.x-dev"
; Information added by Drupal.org packaging script on 2014-05-08
version = "7.x-1.0-alpha1+2-dev"
core = "7.x"
project = "views_php"
datestamp = "1378900545"
datestamp = "1399543127"

View File

@@ -41,6 +41,7 @@ function views_php_views_plugins() {
'php' => array(
'title' => t('PHP'),
'help' => t('Use PHP code to grant access.'),
'help topic' => '',
'handler' => 'views_php_plugin_access',
'uses options' => TRUE,
),
@@ -49,6 +50,7 @@ function views_php_views_plugins() {
'php' => array(
'title' => t('PHP'),
'help' => t('Use PHP code to determine whether a should be cached.'),
'help topic' => '',
'handler' => 'views_php_plugin_cache',
'uses options' => TRUE,
),