diff --git a/handlers/views_handler_area.inc b/handlers/views_handler_area.inc index b3a7457..860b8ae 100644 --- a/handlers/views_handler_area.inc +++ b/handlers/views_handler_area.inc @@ -63,7 +63,7 @@ class views_handler_area extends views_handler { /** * Don't run a query */ - function query() { } + function query($group_by = FALSE) { } /** * Render the area @@ -91,7 +91,7 @@ class views_handler_area_broken extends views_handler_area { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function render($empty = FALSE) { return ''; } function options_form(&$form, &$form_state) { $form['markup'] = array( diff --git a/handlers/views_handler_area_text.inc b/handlers/views_handler_area_text.inc index 93c5834..56ddbc2 100644 --- a/handlers/views_handler_area_text.inc +++ b/handlers/views_handler_area_text.inc @@ -80,7 +80,7 @@ class views_handler_area_text extends views_handler_area { } } - function options_submit(&$form, &$form_state) { + function options_submit($form, &$form_state) { $form_state['values']['options']['format'] = $form_state['values']['format']; parent::options_submit($form, $form_state); } diff --git a/handlers/views_handler_argument.inc b/handlers/views_handler_argument.inc index 3da811e..a148593 100644 --- a/handlers/views_handler_argument.inc +++ b/handlers/views_handler_argument.inc @@ -255,7 +255,7 @@ class views_handler_argument extends views_handler { ); } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { if (empty($form_state['values']['options'])) { return; } @@ -680,7 +680,7 @@ class views_handler_argument extends views_handler { * * The argument sent may be found at $this->argument. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $placeholder = empty($this->definition['numeric']) ? "'%s'" : '%d'; $this->query->add_where(0, "$this->table_alias.$this->real_field = $placeholder", $this->argument); @@ -927,7 +927,7 @@ class views_handler_argument_broken extends views_handler_argument { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( '#prefix' => '
', diff --git a/handlers/views_handler_argument_formula.inc b/handlers/views_handler_argument_formula.inc index 67e0b39..d0d57af 100644 --- a/handlers/views_handler_argument_formula.inc +++ b/handlers/views_handler_argument_formula.inc @@ -44,7 +44,7 @@ class views_handler_argument_formula extends views_handler_argument { /** * Build the query based upon the formula */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); // Now that our table is secure, get our formula. $formula = $this->get_formula(); diff --git a/handlers/views_handler_argument_many_to_one.inc b/handlers/views_handler_argument_many_to_one.inc index 5d7c354..b2d7822 100644 --- a/handlers/views_handler_argument_many_to_one.inc +++ b/handlers/views_handler_argument_many_to_one.inc @@ -73,7 +73,7 @@ class views_handler_argument_many_to_one extends views_handler_argument { $this->helper->ensure_my_table(); } - function query() { + function query($group_by = FALSE) { $empty = FALSE; if (isset($this->definition['zero is null']) && $this->definition['zero is null']) { if (empty($this->argument)) { diff --git a/handlers/views_handler_argument_null.inc b/handlers/views_handler_argument_null.inc index 49b7502..fd874fe 100644 --- a/handlers/views_handler_argument_null.inc +++ b/handlers/views_handler_argument_null.inc @@ -57,5 +57,5 @@ class views_handler_argument_null extends views_handler_argument { * Override the behavior of query() to prevent the query * from being changed in any way. */ - function query() {} + function query($group_by = FALSE) {} } diff --git a/handlers/views_handler_argument_numeric.inc b/handlers/views_handler_argument_numeric.inc index 6753805..ba06fe1 100644 --- a/handlers/views_handler_argument_numeric.inc +++ b/handlers/views_handler_argument_numeric.inc @@ -70,7 +70,7 @@ class views_handler_argument_numeric extends views_handler_argument { return $this->value; } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); if (!empty($this->options['break_phrase'])) { diff --git a/handlers/views_handler_argument_string.inc b/handlers/views_handler_argument_string.inc index 89b4cd3..ec8d6fb 100644 --- a/handlers/views_handler_argument_string.inc +++ b/handlers/views_handler_argument_string.inc @@ -172,7 +172,7 @@ class views_handler_argument_string extends views_handler_argument { /** * Build the query based upon the formula */ - function query() { + function query($group_by = FALSE) { $argument = $this->argument; if (!empty($this->options['transform_dash'])) { $argument = strtr($argument, '-', ' '); diff --git a/handlers/views_handler_field.inc b/handlers/views_handler_field.inc index bafc77f..3456623 100644 --- a/handlers/views_handler_field.inc +++ b/handlers/views_handler_field.inc @@ -61,7 +61,7 @@ class views_handler_field extends views_handler { /** * Called to add the field to a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); // Add the field. $this->field_alias = $this->query->add_field($this->table_alias, $this->real_field); @@ -781,7 +781,7 @@ If you would like to have the characters %5B and %5D please use the html entity * @param $values * An array of all objects returned from the query. */ - function pre_render($values) { } + function pre_render(&$values) { } /** * Render the field. @@ -1158,7 +1158,7 @@ class views_handler_field_broken extends views_handler_field { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( '#prefix' => '
', diff --git a/handlers/views_handler_field_counter.inc b/handlers/views_handler_field_counter.inc index 5866c41..71bf959 100644 --- a/handlers/views_handler_field_counter.inc +++ b/handlers/views_handler_field_counter.inc @@ -25,7 +25,7 @@ class views_handler_field_counter extends views_handler_field { ); } - function query() { + function query($group_by = FALSE) { // do nothing -- to override the parent query. } diff --git a/handlers/views_handler_field_custom.inc b/handlers/views_handler_field_custom.inc index c6e687b..75f3195 100644 --- a/handlers/views_handler_field_custom.inc +++ b/handlers/views_handler_field_custom.inc @@ -6,7 +6,7 @@ * @ingroup views_field_handlers */ class views_handler_field_custom extends views_handler_field { - function query() { + function query($group_by = FALSE) { // do nothing -- to override the parent query. } diff --git a/handlers/views_handler_field_group_by_numeric.inc b/handlers/views_handler_field_group_by_numeric.inc index b04b698..77f0379 100644 --- a/handlers/views_handler_field_group_by_numeric.inc +++ b/handlers/views_handler_field_group_by_numeric.inc @@ -15,7 +15,7 @@ class views_handler_field_group_by_numeric extends views_handler_field_numeric { /** * Called to add the field to a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); // Add the field, taking care of any aggregation that may affect it. $params = array( diff --git a/handlers/views_handler_field_math.inc b/handlers/views_handler_field_math.inc index 5cb5fce..8022b1b 100644 --- a/handlers/views_handler_field_math.inc +++ b/handlers/views_handler_field_math.inc @@ -74,5 +74,5 @@ class views_handler_field_math extends views_handler_field_numeric { return $this->sanitize_value($this->options['prefix'] . $value . $this->options['suffix']); } - function query() { } + function query($group_by = FALSE) { } } diff --git a/handlers/views_handler_field_serialized.inc b/handlers/views_handler_field_serialized.inc index 75ca19a..5cef94c 100644 --- a/handlers/views_handler_field_serialized.inc +++ b/handlers/views_handler_field_serialized.inc @@ -38,7 +38,7 @@ class views_handler_field_serialized extends views_handler_field { ); } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { // Require a key if the format is key. if ($form_state['values']['options']['format'] == 'key' && $form_state['values']['options']['key'] == '') { form_error($form['key'], t('You have to enter a key if you want to display a key of the data.')); diff --git a/handlers/views_handler_filter.inc b/handlers/views_handler_filter.inc index 48dfe30..77a6246 100644 --- a/handlers/views_handler_filter.inc +++ b/handlers/views_handler_filter.inc @@ -115,7 +115,7 @@ class views_handler_filter extends views_handler { /** * Simple validate handler */ - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { $this->operator_validate($form, $form_state); $this->value_validate($form, $form_state); if (!empty($this->options['exposed'])) { @@ -578,7 +578,7 @@ class views_handler_filter extends views_handler { * level of indirection. You will find them in $this->operator * and $this->value respectively. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field " . $this->operator . " '%s'", $this->value); } @@ -610,7 +610,7 @@ class views_handler_filter_broken extends views_handler_filter { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( '#prefix' => '
', diff --git a/handlers/views_handler_filter_boolean_operator.inc b/handlers/views_handler_filter_boolean_operator.inc index 48a7ab2..78c2f53 100644 --- a/handlers/views_handler_filter_boolean_operator.inc +++ b/handlers/views_handler_filter_boolean_operator.inc @@ -143,7 +143,7 @@ class views_handler_filter_boolean_operator extends views_handler_filter { $this->options['expose']['optional'] = FALSE; } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $where = "$this->table_alias.$this->real_field "; diff --git a/handlers/views_handler_filter_boolean_operator_string.inc b/handlers/views_handler_filter_boolean_operator_string.inc index b27cae4..58c0cc9 100644 --- a/handlers/views_handler_filter_boolean_operator_string.inc +++ b/handlers/views_handler_filter_boolean_operator_string.inc @@ -11,7 +11,7 @@ * @ingroup views_filter_handlers */ class views_handler_filter_boolean_operator_string extends views_handler_filter_boolean_operator { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $where = "$this->table_alias.$this->real_field "; diff --git a/handlers/views_handler_filter_date.inc b/handlers/views_handler_filter_date.inc index bb23935..e5c6acc 100644 --- a/handlers/views_handler_filter_date.inc +++ b/handlers/views_handler_filter_date.inc @@ -33,7 +33,7 @@ class views_handler_filter_date extends views_handler_filter_numeric { parent::value_form($form, $form_state); } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { parent::options_validate($form, $form_state); if (!empty($form_state['values']['options']['expose']['optional'])) { diff --git a/handlers/views_handler_filter_group_by_numeric.inc b/handlers/views_handler_filter_group_by_numeric.inc index 709dacd..57e88f9 100644 --- a/handlers/views_handler_filter_group_by_numeric.inc +++ b/handlers/views_handler_filter_group_by_numeric.inc @@ -6,7 +6,7 @@ * @ingroup views_filter_handlers */ class views_handler_filter_group_by_numeric extends views_handler_filter_numeric { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $field = $this->get_field(); diff --git a/handlers/views_handler_filter_in_operator.inc b/handlers/views_handler_filter_in_operator.inc index 5d177ed..4ae5490 100644 --- a/handlers/views_handler_filter_in_operator.inc +++ b/handlers/views_handler_filter_in_operator.inc @@ -352,7 +352,7 @@ class views_handler_filter_in_operator extends views_handler_filter { return $operator . (($values !== '') ? ' ' . $values : ''); } - function query() { + function query($group_by = FALSE) { $info = $this->operators(); if (!empty($info[$this->operator]['method'])) { $this->{$info[$this->operator]['method']}(); diff --git a/handlers/views_handler_filter_numeric.inc b/handlers/views_handler_filter_numeric.inc index 44e6ece..801aa08 100644 --- a/handlers/views_handler_filter_numeric.inc +++ b/handlers/views_handler_filter_numeric.inc @@ -255,7 +255,7 @@ class views_handler_filter_numeric extends views_handler_filter { } } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $field = "$this->table_alias.$this->real_field"; diff --git a/handlers/views_handler_filter_string.inc b/handlers/views_handler_filter_string.inc index 9d1526c..3841254 100644 --- a/handlers/views_handler_filter_string.inc +++ b/handlers/views_handler_filter_string.inc @@ -229,7 +229,7 @@ class views_handler_filter_string extends views_handler_filter { * level of indirection. You will find them in $this->operator * and $this->value respectively. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $field = "$this->table_alias.$this->real_field"; $upper = $this->case_transform(); diff --git a/handlers/views_handler_relationship.inc b/handlers/views_handler_relationship.inc index 009b472..337741f 100644 --- a/handlers/views_handler_relationship.inc +++ b/handlers/views_handler_relationship.inc @@ -102,7 +102,7 @@ class views_handler_relationship extends views_handler { /** * Called to implement a relationship in a query. */ - function query() { + function query($group_by = FALSE) { // Figure out what base table this relationship brings to the party. $table_data = views_fetch_data($this->definition['base']); $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field']; @@ -159,7 +159,7 @@ class views_handler_relationship_broken extends views_handler_relationship { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( '#prefix' => '
', diff --git a/handlers/views_handler_sort.inc b/handlers/views_handler_sort.inc index d703b5e..cf73779 100644 --- a/handlers/views_handler_sort.inc +++ b/handlers/views_handler_sort.inc @@ -18,7 +18,7 @@ class views_handler_sort extends views_handler { /** * Called to add the sort to a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); // Add the field. $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']); @@ -76,7 +76,7 @@ class views_handler_sort extends views_handler { /** * Simple validate handler */ - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { $this->sort_validate($form, $form_state); if (!empty($this->options['exposed'])) { $this->expose_validate($form, $form_state); @@ -87,7 +87,7 @@ class views_handler_sort extends views_handler { /** * Simple submit handler */ - function options_submit(&$form, &$form_state) { + function options_submit($form, &$form_state) { unset($form_state['values']['expose_button']); // don't store this. $this->sort_submit($form, $form_state); if (!empty($this->options['exposed'])) { @@ -175,7 +175,7 @@ class views_handler_sort_broken extends views_handler_sort { } function ensure_my_table() { /* No table to ensure! */ } - function query() { /* No query to run */ } + function query($group_by = FALSE) { /* No query to run */ } function options_form(&$form, &$form_state) { $form['markup'] = array( '#prefix' => '
', diff --git a/handlers/views_handler_sort_date.inc b/handlers/views_handler_sort_date.inc index 8101482..e1c4bb0 100644 --- a/handlers/views_handler_sort_date.inc +++ b/handlers/views_handler_sort_date.inc @@ -39,7 +39,7 @@ class views_handler_sort_date extends views_handler_sort { /** * Called to add the sort to a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); switch ($this->options['granularity']) { case 'second': diff --git a/handlers/views_handler_sort_formula.inc b/handlers/views_handler_sort_formula.inc index 30a6451..714798a 100644 --- a/handlers/views_handler_sort_formula.inc +++ b/handlers/views_handler_sort_formula.inc @@ -27,7 +27,7 @@ class views_handler_sort_formula extends views_handler_sort { /** * Called to add the sort to a query. */ - function query() { + function query($group_by = FALSE) { if (is_array($this->formula)) { global $db_type; if (isset($this->formula[$db_type])) { diff --git a/handlers/views_handler_sort_group_by_numeric.inc b/handlers/views_handler_sort_group_by_numeric.inc index 8081fc6..076b3af 100644 --- a/handlers/views_handler_sort_group_by_numeric.inc +++ b/handlers/views_handler_sort_group_by_numeric.inc @@ -16,7 +16,7 @@ class views_handler_sort_group_by_numeric extends views_handler_sort { /** * Called to add the field to a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $params = array( diff --git a/handlers/views_handler_sort_menu_hierarchy.inc b/handlers/views_handler_sort_menu_hierarchy.inc index 39c6d3e..8f9978c 100644 --- a/handlers/views_handler_sort_menu_hierarchy.inc +++ b/handlers/views_handler_sort_menu_hierarchy.inc @@ -28,7 +28,7 @@ class views_handler_sort_menu_hierarchy extends views_handler_sort { ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $max_depth = isset($this->definition['max depth']) ? $this->definition['max depth'] : MENU_MAX_DEPTH; for ($i = 1; $i <= $max_depth; ++$i) { diff --git a/handlers/views_handler_sort_random.inc b/handlers/views_handler_sort_random.inc index 2a497d7..f8ba39b 100644 --- a/handlers/views_handler_sort_random.inc +++ b/handlers/views_handler_sort_random.inc @@ -6,7 +6,7 @@ * @ingroup views_sort_handlers */ class views_handler_sort_random extends views_handler_sort { - function query() { + function query($group_by = FALSE) { global $db_type; switch ($db_type) { case 'mysql': diff --git a/includes/base.inc b/includes/base.inc index a7fc9bf..8f10ad1 100644 --- a/includes/base.inc +++ b/includes/base.inc @@ -57,7 +57,7 @@ class views_object { * Set default options on this object. Called by the constructor in a * complex chain to deal with backward compatibility. */ - function options() { } + function options(&$options) { } /** * Set default options. @@ -326,8 +326,8 @@ class views_object { $value = $options; // Build source data and add to the array $format = NULL; - if (isset($definition['format_key']) && isset($options[$definition['format_key']])) { - $format = $options[$definition['format_key']]; + if (isset($definition['format_key']) && isset($storage[$definition['format_key']])) { + $format = $storage[$definition['format_key']]; } $translatable[] = array( 'value' => $value, diff --git a/includes/cache.inc b/includes/cache.inc index 590592d..4a9509a 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -25,38 +25,71 @@ function _views_include_default_views() { */ function _views_fetch_data($table = NULL, $reset = FALSE) { static $cache = NULL; - if (!isset($cache) || $reset) { - $start = views_microtime(); - // NOTE: This happens whether we retrieve them from cache or otherwise. + static $fully_loaded = FALSE; + + if ($reset) { + $cache = NULL; + $fully_loaded = FALSE; + } + + // Include handlers the first time the function is called. + if (!isset($cache)) { views_include_handlers(); + } - $data = views_cache_get('views_data', TRUE); - if (!empty($data->data)) { - $cache = $data->data; + if (isset($table)) { + if (!isset($cache[$table])) { + $cid = 'views_data:' . $table; + $data = views_cache_get($cid, TRUE); + if (!empty($data->data)) { + $cache[$table] = $data->data; + } + else { + $cache = _views_fetch_data_build(); + $fully_loaded = TRUE; + } } - - if (empty($cache)) { - $cache = module_invoke_all('views_data'); - foreach (module_implements('views_data_alter') as $module) { - $function = $module . '_views_data_alter'; - $function($cache); + if (isset($cache[$table])) { + return $cache[$table]; + } + } + else { + if (!$fully_loaded) { + $data = views_cache_get('views_data', TRUE); + if (!empty($data->data)) { + $cache = $data->data; + } + else { + $cache = _views_fetch_data_build(); } - - views_cache_set('views_data', $cache, TRUE); } - - vpr('Views data build time: ' . (views_microtime() - $start) * 1000 . ' ms'); + return $cache; } + // Return an empty array if there is no match. + return array(); +} - if (!$table) { - return $cache; +/** + * Helper for _views_fetch_data(), builds and sets the views data cache. + */ +function _views_fetch_data_build() { + $start = views_microtime(); + + $cache = module_invoke_all('views_data'); + foreach (module_implements('views_data_alter') as $module) { + $function = $module . '_views_data_alter'; + $function($cache); } - if (isset($cache[$table])) { - return $cache[$table]; + + views_cache_set('views_data', $cache, TRUE); + // Also store a separate cache entry for each item. + foreach ($cache as $key => $data) { + $cid = 'views_data:' . $key; + views_cache_set($cid, $data, TRUE); } + vpr('Views data build time: ' . (views_microtime() - $start) * 1000 . ' ms'); - // Return an empty array if there is no match. - return array(); + return $cache; } /** diff --git a/includes/handlers.inc b/includes/handlers.inc index 48eb66c..35fac39 100644 --- a/includes/handlers.inc +++ b/includes/handlers.inc @@ -760,7 +760,7 @@ class views_many_to_one_helper { $this->handler = &$handler; } - function option_definition(&$options) { + public static function option_definition(&$options) { $options['reduce_duplicates'] = array('default' => FALSE); } diff --git a/includes/plugins.inc b/includes/plugins.inc index c636e27..4e7ad75 100644 --- a/includes/plugins.inc +++ b/includes/plugins.inc @@ -488,7 +488,7 @@ class views_plugin extends views_object { /** * Validate the options form. */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Handle any special handling on the validate form. @@ -498,7 +498,7 @@ class views_plugin extends views_object { /** * Add anything to the query that we might need to. */ - function query() { } + function query($group_by = FALSE) { } /** * Provide a full list of possible theme templates used by this style. diff --git a/includes/view.inc b/includes/view.inc index 770b3e6..415b991 100644 --- a/includes/view.inc +++ b/includes/view.inc @@ -238,11 +238,8 @@ class view extends views_db_object { /** * Returns the complete list of dependent objects in a view, for the purpose * of initialization and loading/saving to/from the database. - * - * Note: In PHP5 this should be static, but PHP4 doesn't support static - * methods. */ - function db_objects() { + public static function db_objects() { return array('display'); } @@ -1206,7 +1203,7 @@ class view extends views_db_object { /** * Unset the current view, mostly. */ - function post_execute() { + function post_execute(&$result = array()) { // unset current view so we can be properly destructed later on. // Return the previous value in case we're an attachment. @@ -1563,7 +1560,7 @@ class view extends views_db_object { * @return view * A view object or NULL if it was not available. */ - function &load($arg, $reset = FALSE) { + public static function &load($arg, $reset = FALSE) { static $cache = array(); // We want a NULL value to return TRUE here, so we can't use isset() or empty(). @@ -1616,7 +1613,7 @@ class view extends views_db_object { * that would be very slow. Buiding the views externally from unified queries is * much faster. */ - function load_views() { + public static function load_views() { $result = db_query("SELECT DISTINCT v.* FROM {views_view} v"); $views = array(); $vids = array(); @@ -1913,6 +1910,7 @@ class view extends views_db_object { $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; } diff --git a/modules/comment/views_handler_argument_comment_user_uid.inc b/modules/comment/views_handler_argument_comment_user_uid.inc index e953b2e..04b1dec 100644 --- a/modules/comment/views_handler_argument_comment_user_uid.inc +++ b/modules/comment/views_handler_argument_comment_user_uid.inc @@ -35,7 +35,7 @@ class views_handler_argument_comment_user_uid extends views_handler_argument { } } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->query->add_where(0, "$this->table_alias.uid = %d OR ((SELECT COUNT(*) FROM {comments} c WHERE c.uid = %d AND c.nid = $this->table_alias.nid) > 0)", $this->argument, $this->argument); } diff --git a/modules/comment/views_handler_field_comment_link.inc b/modules/comment/views_handler_field_comment_link.inc index 34075c7..b8231cc 100644 --- a/modules/comment/views_handler_field_comment_link.inc +++ b/modules/comment/views_handler_field_comment_link.inc @@ -26,7 +26,7 @@ class views_handler_field_comment_link extends views_handler_field { ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/comment/views_handler_field_comment_node_link.inc b/modules/comment/views_handler_field_comment_node_link.inc index f64b020..e3e51e0 100644 --- a/modules/comment/views_handler_field_comment_node_link.inc +++ b/modules/comment/views_handler_field_comment_node_link.inc @@ -38,7 +38,7 @@ class views_handler_field_comment_node_link extends views_handler_field { } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/comment/views_handler_field_comment_username.inc b/modules/comment/views_handler_field_comment_username.inc index a903952..e472718 100644 --- a/modules/comment/views_handler_field_comment_username.inc +++ b/modules/comment/views_handler_field_comment_username.inc @@ -8,7 +8,7 @@ class views_handler_field_comment_username extends views_handler_field { /** * Override init function to add uid and homepage fields. */ - function init(&$view, &$data) { + function init(&$view, $data) { parent::init($view, $data); $this->additional_fields['uid'] = 'uid'; $this->additional_fields['homepage'] = 'homepage'; diff --git a/modules/comment/views_handler_field_ncs_last_comment_name.inc b/modules/comment/views_handler_field_ncs_last_comment_name.inc index 84a72c8..7af74d2 100644 --- a/modules/comment/views_handler_field_ncs_last_comment_name.inc +++ b/modules/comment/views_handler_field_ncs_last_comment_name.inc @@ -6,7 +6,7 @@ * @ingroup views_field_handlers */ class views_handler_field_ncs_last_comment_name extends views_handler_field { - function query() { + function query($group_by = FALSE) { // last_comment_name only contains data if the user is anonymous. So we // have to join in a specially related user table. $this->ensure_my_table(); diff --git a/modules/comment/views_handler_field_ncs_last_updated.inc b/modules/comment/views_handler_field_ncs_last_updated.inc index 3950ffb..05e66ab 100644 --- a/modules/comment/views_handler_field_ncs_last_updated.inc +++ b/modules/comment/views_handler_field_ncs_last_updated.inc @@ -5,7 +5,7 @@ * @ingroup views_field_handlers */ class views_handler_field_ncs_last_updated extends views_handler_field_date { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_field(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->table_alias . '_' . $this->field); diff --git a/modules/comment/views_handler_field_node_new_comments.inc b/modules/comment/views_handler_field_node_new_comments.inc index 9917698..a00013a 100644 --- a/modules/comment/views_handler_field_node_new_comments.inc +++ b/modules/comment/views_handler_field_node_new_comments.inc @@ -41,7 +41,7 @@ class views_handler_field_node_new_comments extends views_handler_field_numeric ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); $this->field_alias = $this->table . '_' . $this->field; diff --git a/modules/comment/views_handler_filter_comment_user_uid.inc b/modules/comment/views_handler_filter_comment_user_uid.inc index 8959e13..fc6133b 100644 --- a/modules/comment/views_handler_filter_comment_user_uid.inc +++ b/modules/comment/views_handler_filter_comment_user_uid.inc @@ -7,7 +7,7 @@ * @ingroup views_filter_handlers */ class views_handler_filter_comment_user_uid extends views_handler_filter_user_name { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $replace = array_fill(0, sizeof($this->value), '%d'); $condition = $this->operator . ' (' . implode(", ", $replace) . ')'; diff --git a/modules/comment/views_handler_filter_ncs_last_updated.inc b/modules/comment/views_handler_filter_ncs_last_updated.inc index 3818db9..34cf1f9 100644 --- a/modules/comment/views_handler_filter_ncs_last_updated.inc +++ b/modules/comment/views_handler_filter_ncs_last_updated.inc @@ -5,7 +5,7 @@ * @ingroup views_filter_handlers */ class views_handler_filter_ncs_last_updated extends views_handler_filter_date { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); diff --git a/modules/comment/views_handler_sort_comment_thread.inc b/modules/comment/views_handler_sort_comment_thread.inc index e529b2a..9a7438e 100644 --- a/modules/comment/views_handler_sort_comment_thread.inc +++ b/modules/comment/views_handler_sort_comment_thread.inc @@ -3,7 +3,7 @@ * Sort handler for ordering by thread */ class views_handler_sort_comment_thread extends views_handler_sort { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); //Read comment_render() in comment.module for an explanation of the diff --git a/modules/comment/views_handler_sort_ncs_last_comment_name.inc b/modules/comment/views_handler_sort_ncs_last_comment_name.inc index 8eca177..d97b23f 100644 --- a/modules/comment/views_handler_sort_ncs_last_comment_name.inc +++ b/modules/comment/views_handler_sort_ncs_last_comment_name.inc @@ -6,7 +6,7 @@ * @ingroup views_sort_handlers */ class views_handler_sort_ncs_last_comment_name extends views_handler_sort { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $join = new views_join(); $join->construct('users', $this->table_alias, 'last_comment_uid', 'uid'); diff --git a/modules/comment/views_handler_sort_ncs_last_updated.inc b/modules/comment/views_handler_sort_ncs_last_updated.inc index 04b01a1..e402b62 100644 --- a/modules/comment/views_handler_sort_ncs_last_updated.inc +++ b/modules/comment/views_handler_sort_ncs_last_updated.inc @@ -5,7 +5,7 @@ * @ingroup views_sort_handlers */ class views_handler_sort_ncs_last_updated extends views_handler_sort_date { - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_orderby(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->options['order'], $this->table_alias . '_' . $this->field); diff --git a/modules/comment/views_plugin_row_comment_view.inc b/modules/comment/views_plugin_row_comment_view.inc index 5541e4c..84b618f 100644 --- a/modules/comment/views_plugin_row_comment_view.inc +++ b/modules/comment/views_plugin_row_comment_view.inc @@ -25,7 +25,7 @@ class views_plugin_row_comment_view extends views_plugin_row { ); } - function pre_render($result) { + function pre_render(&$values) { $cids = array(); $this->comments = array(); diff --git a/modules/filter/views_handler_field_filter_format_name.inc b/modules/filter/views_handler_field_filter_format_name.inc index 48070de..fd0268c 100644 --- a/modules/filter/views_handler_field_filter_format_name.inc +++ b/modules/filter/views_handler_field_filter_format_name.inc @@ -11,7 +11,7 @@ class views_handler_field_filter_format_name extends views_handler_field { $this->additional_fields['name'] = array('table' => 'filter_formats', 'field' => 'name'); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/locale/views_handler_field_locale_link_edit.inc b/modules/locale/views_handler_field_locale_link_edit.inc index 5466446..23ce216 100644 --- a/modules/locale/views_handler_field_locale_link_edit.inc +++ b/modules/locale/views_handler_field_locale_link_edit.inc @@ -28,7 +28,7 @@ class views_handler_field_locale_link_edit extends views_handler_field { ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/node/views_handler_field_history_user_timestamp.inc b/modules/node/views_handler_field_history_user_timestamp.inc index 8286c4f..bf6b741 100644 --- a/modules/node/views_handler_field_history_user_timestamp.inc +++ b/modules/node/views_handler_field_history_user_timestamp.inc @@ -36,7 +36,7 @@ class views_handler_field_history_user_timestamp extends views_handler_field_nod } } - function query() { + function query($group_by = FALSE) { // Only add ourselves to the query if logged in. global $user; if (!$user->uid) { diff --git a/modules/node/views_handler_field_node_link.inc b/modules/node/views_handler_field_node_link.inc index 4f28ef3..f8a9a60 100644 --- a/modules/node/views_handler_field_node_link.inc +++ b/modules/node/views_handler_field_node_link.inc @@ -31,7 +31,7 @@ class views_handler_field_node_link extends views_handler_field { $form['alter']['external'] = array('#access' => FALSE); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/node/views_handler_field_node_path.inc b/modules/node/views_handler_field_node_path.inc index de7dc9b..8dfc8a3 100644 --- a/modules/node/views_handler_field_node_path.inc +++ b/modules/node/views_handler_field_node_path.inc @@ -29,7 +29,7 @@ class views_handler_field_node_path extends views_handler_field { ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/node/views_handler_filter_history_user_timestamp.inc b/modules/node/views_handler_filter_history_user_timestamp.inc index d8b1b53..f69e1a7 100644 --- a/modules/node/views_handler_filter_history_user_timestamp.inc +++ b/modules/node/views_handler_filter_history_user_timestamp.inc @@ -31,7 +31,7 @@ class views_handler_filter_history_user_timestamp extends views_handler_filter { } } - function query() { + function query($group_by = FALSE) { global $user; // This can only work if we're logged in. if (!$user || !$user->uid) { diff --git a/modules/node/views_handler_filter_node_access.inc b/modules/node/views_handler_filter_node_access.inc index 308da4d..6d45a38 100644 --- a/modules/node/views_handler_filter_node_access.inc +++ b/modules/node/views_handler_filter_node_access.inc @@ -6,7 +6,7 @@ */ class views_handler_filter_node_access extends views_handler_filter { function admin_summary() { } - function operator_form() { } + function operator_form(&$form, &$form_state) { } function can_expose() { return FALSE; } @@ -14,7 +14,7 @@ class views_handler_filter_node_access extends views_handler_filter { /** * See _node_access_where_sql() for a non-views query based implementation. */ - function query() { + function query($group_by = FALSE) { if (!user_access('administer nodes')) { $table = $this->ensure_my_table(); $grants = array(); diff --git a/modules/node/views_handler_filter_node_status.inc b/modules/node/views_handler_filter_node_status.inc index 87390eb..8f536b2 100644 --- a/modules/node/views_handler_filter_node_status.inc +++ b/modules/node/views_handler_filter_node_status.inc @@ -6,9 +6,9 @@ */ class views_handler_filter_node_status extends views_handler_filter { function admin_summary() { } - function operator_form() { } + function operator_form(&$form, &$form_state) { } - function query() { + function query($group_by = FALSE) { $table = $this->ensure_my_table(); $this->query->add_where($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1"); } diff --git a/modules/node/views_plugin_argument_validate_node.inc b/modules/node/views_plugin_argument_validate_node.inc index 723c5ef..09e029e 100644 --- a/modules/node/views_plugin_argument_validate_node.inc +++ b/modules/node/views_plugin_argument_validate_node.inc @@ -55,7 +55,7 @@ class views_plugin_argument_validate_node extends views_plugin_argument_validate ); } - function options_submit(&$form, &$form_state, &$options = array()) { + function options_submit($form, &$form_state, &$options = array()) { // filter trash out of the options so we don't store giant unnecessary arrays $options['types'] = array_filter($options['types']); } diff --git a/modules/profile/views_handler_field_profile_list.inc b/modules/profile/views_handler_field_profile_list.inc index a5c20a6..29c465e 100644 --- a/modules/profile/views_handler_field_profile_list.inc +++ b/modules/profile/views_handler_field_profile_list.inc @@ -8,7 +8,7 @@ class views_handler_field_profile_list extends views_handler_field_prerender_lis /** * Break up our field into a proper list. */ - function pre_render($values) { + function pre_render(&$values) { $this->items = array(); foreach ($values as $value) { $field = $this->get_value($value); diff --git a/modules/search/views_handler_argument_search.inc b/modules/search/views_handler_argument_search.inc index 2be8e4d..5072b2a 100644 --- a/modules/search/views_handler_argument_search.inc +++ b/modules/search/views_handler_argument_search.inc @@ -10,7 +10,7 @@ class views_handler_argument_search extends views_handler_argument { /** * Add this argument to the query. */ - function query() { + function query($group_by = FALSE) { $this->search_query = search_parse_query($this->argument); if (!isset($this->search_query) || empty($this->search_query[3])) { diff --git a/modules/search/views_handler_field_search_score.inc b/modules/search/views_handler_field_search_score.inc index 8203ece..1dbeceb 100644 --- a/modules/search/views_handler_field_search_score.inc +++ b/modules/search/views_handler_field_search_score.inc @@ -43,7 +43,7 @@ class views_handler_field_search_score extends views_handler_field_numeric { parent::options_form($form, $form_state); } - function query() { + function query($group_by = FALSE) { // Check to see if the search filter added 'score' to the table. // Our filter stores it as $handler->search_score -- and we also // need to check its relationship to make sure that we're using the same diff --git a/modules/search/views_handler_filter_search.inc b/modules/search/views_handler_filter_search.inc index 95d14e8..59edf6c 100644 --- a/modules/search/views_handler_filter_search.inc +++ b/modules/search/views_handler_filter_search.inc @@ -48,7 +48,7 @@ class views_handler_filter_search extends views_handler_filter { /** * Validate the options form. */ - function exposed_validate($form, &$form_state) { + function exposed_validate(&$form, &$form_state) { if (!isset($this->options['expose']['identifier'])) { return; } @@ -75,7 +75,7 @@ class views_handler_filter_search extends views_handler_filter { * level of indirection. You will find them in $this->operator * and $this->value respectively. */ - function query() { + function query($group_by = FALSE) { if (!isset($this->search_query) || empty($this->search_query[3])) { if ($this->operator == 'required') { $this->query->add_where($this->options['group'], 'FALSE'); diff --git a/modules/search/views_handler_sort_search_score.inc b/modules/search/views_handler_sort_search_score.inc index 614d83a..addbff8 100644 --- a/modules/search/views_handler_sort_search_score.inc +++ b/modules/search/views_handler_sort_search_score.inc @@ -6,7 +6,7 @@ * @ingroup views_sort_handlers */ class views_handler_sort_search_score extends views_handler_sort { - function query() { + function query($group_by = FALSE) { // Check to see if the search filter/argument added 'score' to the table. // Our filter stores it as $handler->search_score -- and we also // need to check its relationship to make sure that we're using the same diff --git a/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc b/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc index 1eafe71..6b69099 100644 --- a/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc +++ b/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc @@ -78,7 +78,7 @@ class views_handler_argument_term_node_tid_depth extends views_handler_argument return $actions; } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); if (!empty($this->options['break_phrase'])) { diff --git a/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc b/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc index 5743dd5..da71796 100644 --- a/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc +++ b/modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc @@ -10,7 +10,7 @@ */ class views_handler_argument_term_node_tid_depth_modifier extends views_handler_argument { function options_form(&$form, &$form_state) { } - function query() { } + function query($group_by = FALSE) { } function pre_query() { // We don't know our argument yet, but it's based upon our position: $argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL; diff --git a/modules/taxonomy/views_handler_field_term_link_edit.inc b/modules/taxonomy/views_handler_field_term_link_edit.inc index a727356..218932e 100644 --- a/modules/taxonomy/views_handler_field_term_link_edit.inc +++ b/modules/taxonomy/views_handler_field_term_link_edit.inc @@ -28,7 +28,7 @@ class views_handler_field_term_link_edit extends views_handler_field { ); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/taxonomy/views_handler_field_term_node_tid.inc b/modules/taxonomy/views_handler_field_term_node_tid.inc index a6e625b..c5b8923 100644 --- a/modules/taxonomy/views_handler_field_term_node_tid.inc +++ b/modules/taxonomy/views_handler_field_term_node_tid.inc @@ -64,11 +64,11 @@ class views_handler_field_term_node_tid extends views_handler_field_prerender_li /** * Add this term to the query */ - function query() { + function query($group_by = FALSE) { $this->add_additional_fields(); } - function pre_render($values) { + function pre_render(&$values) { $this->field_alias = $this->aliases['vid']; $vids = array(); foreach ($values as $result) { diff --git a/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc b/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc index 368bb99..80c2d52 100644 --- a/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc +++ b/modules/taxonomy/views_handler_filter_term_node_tid_depth.inc @@ -8,7 +8,7 @@ * @ingroup views_filter_handlers */ class views_handler_filter_term_node_tid_depth extends views_handler_filter_term_node_tid { - function operator_options() { + function operator_options($which = 'title') { return array( 'or' => t('Is one of'), ); @@ -33,7 +33,7 @@ class views_handler_filter_term_node_tid_depth extends views_handler_filter_term ); } - function query() { + function query($group_by = FALSE) { // If no filter values are present, then do nothing. if (count($this->value) == 0) { return; diff --git a/modules/taxonomy/views_handler_relationship_node_term_data.inc b/modules/taxonomy/views_handler_relationship_node_term_data.inc index 30998c6..daf4877 100644 --- a/modules/taxonomy/views_handler_relationship_node_term_data.inc +++ b/modules/taxonomy/views_handler_relationship_node_term_data.inc @@ -41,7 +41,7 @@ class views_handler_relationship_node_term_data extends views_handler_relationsh /** * Called to implement a relationship in a query. */ - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $def = $this->definition; diff --git a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc index 6356398..af31330 100644 --- a/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc +++ b/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc @@ -70,7 +70,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d ); } - function options_submit(&$form, &$form_state, &$options) { + function options_submit($form, &$form_state, &$options) { // Clear checkbox values. $options['vids'] = array_filter($options['vids']); } diff --git a/modules/translation/views_handler_field_node_translation_link.inc b/modules/translation/views_handler_field_node_translation_link.inc index 537ba60..cefc355 100644 --- a/modules/translation/views_handler_field_node_translation_link.inc +++ b/modules/translation/views_handler_field_node_translation_link.inc @@ -13,7 +13,7 @@ class views_handler_field_node_translation_link extends views_handler_field { $this->additional_fields['language'] = 'language'; } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/translation/views_handler_filter_node_tnid.inc b/modules/translation/views_handler_filter_node_tnid.inc index e96fe26..b6b9a01 100644 --- a/modules/translation/views_handler_filter_node_tnid.inc +++ b/modules/translation/views_handler_filter_node_tnid.inc @@ -31,7 +31,7 @@ class views_handler_filter_node_tnid extends views_handler_filter { function can_expose() { return FALSE; } - function query() { + function query($group_by = FALSE) { $table = $this->ensure_my_table(); // Select for source translations (tnid = nid). Conditionally, also accept either untranslated nodes (tnid = 0). $this->query->add_where($this->options['group'], "$table.tnid = $table.nid" . ($this->operator ? " OR $table.tnid = 0" : '')); diff --git a/modules/translation/views_handler_filter_node_tnid_child.inc b/modules/translation/views_handler_filter_node_tnid_child.inc index 593913e..781c168 100644 --- a/modules/translation/views_handler_filter_node_tnid_child.inc +++ b/modules/translation/views_handler_filter_node_tnid_child.inc @@ -9,7 +9,7 @@ class views_handler_filter_node_tnid_child extends views_handler_filter { function operator_form(&$form, &$form_state) { } function can_expose() { return FALSE; } - function query() { + function query($group_by = FALSE) { $table = $this->ensure_my_table(); $this->query->add_where($this->options['group'], "$table.tnid <> $table.nid AND $table.tnid > 0"); } diff --git a/modules/translation/views_handler_relationship_translation.inc b/modules/translation/views_handler_relationship_translation.inc index 785b0d9..0d76404 100644 --- a/modules/translation/views_handler_relationship_translation.inc +++ b/modules/translation/views_handler_relationship_translation.inc @@ -38,7 +38,7 @@ class views_handler_relationship_translation extends views_handler_relationship /** * Called to implement a relationship in a query. */ - function query() { + function query($group_by = FALSE) { // Figure out what base table this relationship brings to the party. $table_data = views_fetch_data($this->definition['base']); $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field']; diff --git a/modules/upload/views_handler_field_upload_description.inc b/modules/upload/views_handler_field_upload_description.inc index 102cfce..ce2ae6c 100644 --- a/modules/upload/views_handler_field_upload_description.inc +++ b/modules/upload/views_handler_field_upload_description.inc @@ -26,7 +26,7 @@ class views_handler_field_upload_description extends views_handler_field { ); } - function pre_render($values) { + function pre_render(&$values) { if (empty($this->options['link_to_file'])) { return; } diff --git a/modules/upload/views_handler_field_upload_fid.inc b/modules/upload/views_handler_field_upload_fid.inc index 32356c7..d7ae1d8 100644 --- a/modules/upload/views_handler_field_upload_fid.inc +++ b/modules/upload/views_handler_field_upload_fid.inc @@ -29,7 +29,7 @@ class views_handler_field_upload_fid extends views_handler_field_prerender_list ); } - function pre_render($values) { + function pre_render(&$values) { $vids = array(); $this->items = array(); diff --git a/modules/upload/views_handler_filter_upload_fid.inc b/modules/upload/views_handler_filter_upload_fid.inc index 4743b5c..808fc62 100644 --- a/modules/upload/views_handler_filter_upload_fid.inc +++ b/modules/upload/views_handler_filter_upload_fid.inc @@ -9,7 +9,7 @@ class views_handler_filter_upload_fid extends views_handler_filter_boolean_opera $this->value_value = t('Has attached files'); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->query->add_where($this->options['group'], "(SELECT COUNT(*) FROM {upload} u WHERE u.vid = $this->table_alias.$this->real_field) " . (empty($this->value) ? '=' : '<>') . " 0"); } diff --git a/modules/user/views_handler_field_user.inc b/modules/user/views_handler_field_user.inc index 9371d54..e76d4ea 100644 --- a/modules/user/views_handler_field_user.inc +++ b/modules/user/views_handler_field_user.inc @@ -9,7 +9,7 @@ class views_handler_field_user extends views_handler_field { /** * Override init function to provide generic option to link to user. */ - function init(&$view, &$data) { + function init(&$view, $data) { parent::init($view, $data); if (!empty($this->options['link_to_user'])) { $this->additional_fields['uid'] = 'uid'; diff --git a/modules/user/views_handler_field_user_link.inc b/modules/user/views_handler_field_user_link.inc index 7ed8bc1..dec157d 100644 --- a/modules/user/views_handler_field_user_link.inc +++ b/modules/user/views_handler_field_user_link.inc @@ -30,7 +30,7 @@ class views_handler_field_user_link extends views_handler_field { return user_access('access user profiles'); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $this->add_additional_fields(); } diff --git a/modules/user/views_handler_field_user_name.inc b/modules/user/views_handler_field_user_name.inc index 6875d82..eacf126 100644 --- a/modules/user/views_handler_field_user_name.inc +++ b/modules/user/views_handler_field_user_name.inc @@ -8,7 +8,7 @@ class views_handler_field_user_name extends views_handler_field_user { /** * Add uid in the query so we can test for anonymous if needed. */ - function init(&$view, &$data) { + function init(&$view, $data) { parent::init($view, $data); if (!empty($this->options['overwrite_anonymous'])) { $this->additional_fields['uid'] = 'uid'; diff --git a/modules/user/views_handler_field_user_roles.inc b/modules/user/views_handler_field_user_roles.inc index 732f01b..5634a76 100644 --- a/modules/user/views_handler_field_user_roles.inc +++ b/modules/user/views_handler_field_user_roles.inc @@ -10,12 +10,12 @@ class views_handler_field_user_roles extends views_handler_field_prerender_list $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); } - function query() { + function query($group_by = FALSE) { $this->add_additional_fields(); $this->field_alias = $this->aliases['uid']; } - function pre_render($values) { + function pre_render(&$values) { $uids = array(); $this->items = array(); diff --git a/modules/user/views_handler_filter_user_current.inc b/modules/user/views_handler_filter_user_current.inc index c5d0c56..7a9e93f 100644 --- a/modules/user/views_handler_filter_user_current.inc +++ b/modules/user/views_handler_filter_user_current.inc @@ -11,7 +11,7 @@ class views_handler_filter_user_current extends views_handler_filter_boolean_ope $this->value_value = t('Is the logged in user'); } - function query() { + function query($group_by = FALSE) { $this->ensure_my_table(); $where = "$this->table_alias.$this->real_field "; diff --git a/modules/user/views_handler_filter_user_name.inc b/modules/user/views_handler_filter_user_name.inc index 350e06b..faa6a19 100644 --- a/modules/user/views_handler_filter_user_name.inc +++ b/modules/user/views_handler_filter_user_name.inc @@ -116,7 +116,7 @@ class views_handler_filter_user_name extends views_handler_filter_in_operator { return $uids; } - function value_submit() { + function value_submit($form, &$form_state) { // prevent array filter from removing our anonymous user. } diff --git a/plugins/views_plugin_access.inc b/plugins/views_plugin_access.inc index e2518db..cc8e80d 100644 --- a/plugins/views_plugin_access.inc +++ b/plugins/views_plugin_access.inc @@ -39,7 +39,7 @@ class views_plugin_access extends views_plugin { /** * Provide the default form form for validating options */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Provide the default form form for submitting options diff --git a/plugins/views_plugin_access_role.inc b/plugins/views_plugin_access_role.inc index ed42cba..6a54f36 100644 --- a/plugins/views_plugin_access_role.inc +++ b/plugins/views_plugin_access_role.inc @@ -45,13 +45,13 @@ class views_plugin_access_role extends views_plugin_access { ); } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { if (!array_filter($form_state['values']['access_options']['role'])) { form_error($form['role'], t('You must select at least one role if type is "by role"')); } } - function options_submit(&$form, &$form_state) { + function options_submit($form, &$form_state) { // I hate checkboxes. $form_state['values']['access_options']['role'] = array_filter($form_state['values']['access_options']['role']); } diff --git a/plugins/views_plugin_argument_default.inc b/plugins/views_plugin_argument_default.inc index 6c5e65f..ed2b2b1 100644 --- a/plugins/views_plugin_argument_default.inc +++ b/plugins/views_plugin_argument_default.inc @@ -51,7 +51,7 @@ class views_plugin_argument_default extends views_plugin { /** * Provide the default form form for validating options */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Provide the default form form for submitting options diff --git a/plugins/views_plugin_argument_validate.inc b/plugins/views_plugin_argument_validate.inc index 5e019a3..4730e43 100644 --- a/plugins/views_plugin_argument_validate.inc +++ b/plugins/views_plugin_argument_validate.inc @@ -46,12 +46,12 @@ class views_plugin_argument_validate extends views_plugin { /** * Provide the default form form for validating options */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Provide the default form form for submitting options */ - function options_submit(&$form, &$form_state) { } + function options_submit($form, &$form_state) { } /** * Convert options from the older style. diff --git a/plugins/views_plugin_display.inc b/plugins/views_plugin_display.inc index 9ad2c99..1510336 100644 --- a/plugins/views_plugin_display.inc +++ b/plugins/views_plugin_display.inc @@ -1975,7 +1975,7 @@ class views_plugin_display extends views_plugin { /** * Validate the options form. */ - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { switch ($form_state['section']) { case 'display_title': if (empty($form_state['values']['display_title'])) { @@ -2323,7 +2323,7 @@ class views_plugin_display extends views_plugin { /** * Inject anything into the query that the display handler needs. */ - function query() { + function query($group_by = FALSE) { foreach ($this->extender as $extender) { $extender->query(); } diff --git a/plugins/views_plugin_display_attachment.inc b/plugins/views_plugin_display_attachment.inc index b251ab8..4801597 100644 --- a/plugins/views_plugin_display_attachment.inc +++ b/plugins/views_plugin_display_attachment.inc @@ -14,7 +14,7 @@ * @ingroup views_display_plugins */ class views_plugin_display_attachment extends views_plugin_display { - function option_definition () { + function option_definition() { $options = parent::option_definition(); $options['attachment_position'] = array('default' => 'before'); diff --git a/plugins/views_plugin_display_extender.inc b/plugins/views_plugin_display_extender.inc index c2cc488..9718940 100644 --- a/plugins/views_plugin_display_extender.inc +++ b/plugins/views_plugin_display_extender.inc @@ -22,12 +22,12 @@ class views_plugin_display_extender extends views_plugin { /** * Validate the options form. */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Handle any special handling on the validate form. */ - function options_submit(&$form, &$form_state) { } + function options_submit($form, &$form_state) { } /** * Set up any variables on the view prior to execution. @@ -37,7 +37,7 @@ class views_plugin_display_extender extends views_plugin { /** * Inject anything into the query that the display_extender handler needs. */ - function query() { } + function query($group_by = FALSE) { } /** * Provide the default summary for options in the views UI. diff --git a/plugins/views_plugin_display_page.inc b/plugins/views_plugin_display_page.inc index 1eecacb..f740274 100644 --- a/plugins/views_plugin_display_page.inc +++ b/plugins/views_plugin_display_page.inc @@ -463,7 +463,7 @@ class views_plugin_display_page extends views_plugin_display { } } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { // It is very important to call the parent function here: parent::options_validate($form, $form_state); switch ($form_state['section']) { diff --git a/plugins/views_plugin_exposed_form.inc b/plugins/views_plugin_exposed_form.inc index ce9a8ef..88eecb4 100644 --- a/plugins/views_plugin_exposed_form.inc +++ b/plugins/views_plugin_exposed_form.inc @@ -158,7 +158,7 @@ class views_plugin_exposed_form extends views_plugin { } } - function query() { + function query($group_by = FALSE) { $view = $this->view; $exposed_data = $view->exposed_data; if (!empty($exposed_data['sort_by'])) { diff --git a/plugins/views_plugin_exposed_form_input_required.inc b/plugins/views_plugin_exposed_form_input_required.inc index 974b288..2110a25 100644 --- a/plugins/views_plugin_exposed_form_input_required.inc +++ b/plugins/views_plugin_exposed_form_input_required.inc @@ -78,7 +78,7 @@ class views_plugin_exposed_form_input_required extends views_plugin_exposed_form } } - function query() { + function query($group_by = FALSE) { if (!$this->exposed_filter_applied()) { // We return with no query; this will force the empty text. $this->view->built = TRUE; diff --git a/plugins/views_plugin_pager.inc b/plugins/views_plugin_pager.inc index 1131bb4..2aeb3a3 100644 --- a/plugins/views_plugin_pager.inc +++ b/plugins/views_plugin_pager.inc @@ -99,7 +99,7 @@ class views_plugin_pager extends views_plugin { /** * Provide the default form form for validating options */ - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } /** * Provide the default form form for submitting options @@ -160,7 +160,7 @@ class views_plugin_pager extends views_plugin { * * This is called during the build phase and can directly modify the query. */ - function query() { } + function query($group_by = FALSE) { } /** * Perform any needed actions just prior to the query executing. @@ -170,12 +170,12 @@ class views_plugin_pager extends views_plugin { /** * Perform any needed actions just after the query executing. */ - function post_execute(&$result) { } + function post_execute(&$result = array()) { } /** * Perform any needed actions just before rendering. */ - function pre_render(&$result) { } + function pre_render(&$values) { } /** * Render the pager. diff --git a/plugins/views_plugin_pager_full.inc b/plugins/views_plugin_pager_full.inc index f97c6a4..5cbfdaa 100644 --- a/plugins/views_plugin_pager_full.inc +++ b/plugins/views_plugin_pager_full.inc @@ -146,7 +146,7 @@ class views_plugin_pager_full extends views_plugin_pager { ); } - function options_validate(&$form, &$form_state) { + function options_validate($form, &$form_state) { // Only accept integer values. $error = FALSE; $exposed_options = $form_state['values']['pager_options']['expose']['items_per_page_options']; @@ -179,7 +179,7 @@ class views_plugin_pager_full extends views_plugin_pager { } } - function query() { + function query($group_by = FALSE) { if ($this->items_per_page_exposed()) { if (!empty($_GET['items_per_page']) && $_GET['items_per_page'] > 0) { $this->options['items_per_page'] = $_GET['items_per_page']; diff --git a/plugins/views_plugin_pager_none.inc b/plugins/views_plugin_pager_none.inc index 49e3022..5fdee41 100644 --- a/plugins/views_plugin_pager_none.inc +++ b/plugins/views_plugin_pager_none.inc @@ -56,11 +56,11 @@ class views_plugin_pager_none extends views_plugin_pager { // If we are displaying all items, never count. But we can update the count in post_execute. } - function post_execute($result) { + function post_execute(&$result = array()) { $this->total_items = count($result); } - function query() { + function query($group_by = FALSE) { // The only query modifications we might do are offsets. if (!empty($this->options['offset'])) { $this->view->query->set_offset($this->options['offset']); diff --git a/plugins/views_plugin_pager_some.inc b/plugins/views_plugin_pager_some.inc index 28ed1a3..a3546f4 100644 --- a/plugins/views_plugin_pager_some.inc +++ b/plugins/views_plugin_pager_some.inc @@ -48,7 +48,7 @@ class views_plugin_pager_some extends views_plugin_pager { return FALSE; } - function query() { + function query($group_by = FALSE) { $this->view->query->set_limit($this->options['items_per_page']); $this->view->query->set_offset($this->options['offset']); } diff --git a/plugins/views_plugin_query.inc b/plugins/views_plugin_query.inc index a82749e..e87bc05 100644 --- a/plugins/views_plugin_query.inc +++ b/plugins/views_plugin_query.inc @@ -84,9 +84,9 @@ class views_plugin_query extends views_plugin { */ function options_form(&$form, &$form_state) { } - function options_validate(&$form, &$form_state) { } + function options_validate($form, &$form_state) { } - function options_submit(&$form, &$form_state) { } + function options_submit($form, &$form_state) { } function summary_title() { return t('Settings'); diff --git a/plugins/views_plugin_query_default.inc b/plugins/views_plugin_query_default.inc index 63ba6b7..25daa68 100644 --- a/plugins/views_plugin_query_default.inc +++ b/plugins/views_plugin_query_default.inc @@ -1201,7 +1201,7 @@ class views_plugin_query_default extends views_plugin_query{ $this->pager->post_execute($view->result); - if ($this->pager->use_pager()) { + if ($this->pager->use_count_query() || !empty($view->get_total_rows)) { $view->total_rows = $this->pager->get_total_items(); } diff --git a/plugins/views_plugin_row.inc b/plugins/views_plugin_row.inc index 12fee52..af5d8aa 100644 --- a/plugins/views_plugin_row.inc +++ b/plugins/views_plugin_row.inc @@ -106,7 +106,7 @@ class views_plugin_row extends views_plugin { */ function options_submit($form, &$form_state) { } - function query() { + function query($group_by = FALSE) { if (isset($this->base_table)) { if (isset($this->options['relationship']) && isset($this->view->relationship[$this->options['relationship']])) { $relationship = $this->view->relationship[$this->options['relationship']]; @@ -124,7 +124,7 @@ class views_plugin_row extends views_plugin { * @param $result * The full array of results from the query. */ - function pre_render($result) { } + function pre_render(&$values) { } /** * Render a row object. This usually passes through to a theme template diff --git a/plugins/views_plugin_style.inc b/plugins/views_plugin_style.inc index 385f3a5..66d6fca 100644 --- a/plugins/views_plugin_style.inc +++ b/plugins/views_plugin_style.inc @@ -218,7 +218,7 @@ class views_plugin_style extends views_plugin { * @param $result * The full array of results from the query. */ - function pre_render($result) { + function pre_render(&$values) { if (!empty($this->row_plugin)) { $this->row_plugin->pre_render($result); } @@ -364,7 +364,7 @@ class views_plugin_style extends views_plugin { return $errors; } - function query() { + function query($group_by = FALSE) { parent::query(); if (isset($this->row_plugin)) { $this->row_plugin->query(); diff --git a/plugins/views_plugin_style_summary.inc b/plugins/views_plugin_style_summary.inc index 2508b39..9948fdb 100644 --- a/plugins/views_plugin_style_summary.inc +++ b/plugins/views_plugin_style_summary.inc @@ -21,7 +21,7 @@ class views_plugin_style_summary extends views_plugin_style { return $options; } - function query() { + function query($group_by = FALSE) { if (!empty($this->options['override'])) { $this->view->set_items_per_page(intval($this->options['items_per_page'])); } diff --git a/plugins/views_plugin_style_summary_jump_menu.inc b/plugins/views_plugin_style_summary_jump_menu.inc index 097cc19..549e61f 100644 --- a/plugins/views_plugin_style_summary_jump_menu.inc +++ b/plugins/views_plugin_style_summary_jump_menu.inc @@ -23,7 +23,7 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style { return $options; } - function query() { + function query($group_by = FALSE) { // Copy the offset option. $pager = array( 'type' => 'none',