diff --git a/handlers/views_handler_argument.inc b/handlers/views_handler_argument.inc index 05644cf..27cfdf7 100644 --- a/handlers/views_handler_argument.inc +++ b/handlers/views_handler_argument.inc @@ -45,7 +45,7 @@ class views_handler_argument extends views_handler { } } - function init(&$view, &$options) { + function init(&$view, $options) { parent::init($view, $options); } diff --git a/handlers/views_handler_argument_string.inc b/handlers/views_handler_argument_string.inc index ae7dd1e..8dee6b9 100644 --- a/handlers/views_handler_argument_string.inc +++ b/handlers/views_handler_argument_string.inc @@ -7,7 +7,7 @@ * @ingroup views_argument_handlers */ class views_handler_argument_string extends views_handler_argument { - function init(&$view, &$options) { + function init(&$view, $options) { parent::init($view, $options); if (!empty($this->definition['many to one'])) { $this->helper = new views_many_to_one_helper($this); diff --git a/handlers/views_handler_filter.inc b/handlers/views_handler_filter.inc index 49b93e5..2718042 100644 --- a/handlers/views_handler_filter.inc +++ b/handlers/views_handler_filter.inc @@ -101,7 +101,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'])) { @@ -113,7 +113,7 @@ class views_handler_filter 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->operator_submit($form, $form_state); $this->value_submit($form, $form_state); diff --git a/handlers/views_handler_filter_boolean_operator.inc b/handlers/views_handler_filter_boolean_operator.inc index c2ec624..ec9e415 100644 --- a/handlers/views_handler_filter_boolean_operator.inc +++ b/handlers/views_handler_filter_boolean_operator.inc @@ -108,7 +108,7 @@ class views_handler_filter_boolean_operator extends views_handler_filter { } } - function value_validate(&$form, &$form_state) { + function value_validate($form, &$form_state) { if ($form_state['values']['options']['value'] == 'All' && empty($form_state['values']['options']['expose']['optional'])) { form_set_error('value', t('You must select a value unless this is an optional exposed filter.')); } diff --git a/handlers/views_handler_filter_date.inc b/handlers/views_handler_filter_date.inc index 356ec78..ab25862 100644 --- a/handlers/views_handler_filter_date.inc +++ b/handlers/views_handler_filter_date.inc @@ -31,7 +31,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'])) { @@ -42,7 +42,7 @@ class views_handler_filter_date extends views_handler_filter_numeric { $this->validate_valid_time($form['value'], $form_state['values']['options']['operator'], $form_state['values']['options']['value']); } - function exposed_validate(&$form, &$form_state) { + function exposed_validate($form, &$form_state) { if (empty($this->options['exposed'])) { return; } diff --git a/includes/handlers.inc b/includes/handlers.inc index 2ca1c2d..091e625 100644 --- a/includes/handlers.inc +++ b/includes/handlers.inc @@ -514,7 +514,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/view.inc b/includes/view.inc index c58b43f..57a4fde 100644 --- a/includes/view.inc +++ b/includes/view.inc @@ -87,11 +87,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'); } @@ -1339,7 +1336,7 @@ class view extends views_db_object { * If TRUE, reset this entry in the load cache. * @return 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(). @@ -1392,7 +1389,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(); diff --git a/modules/comment/views_handler_field_comment.inc b/modules/comment/views_handler_field_comment.inc index 6755b14..95edf0e 100644 --- a/modules/comment/views_handler_field_comment.inc +++ b/modules/comment/views_handler_field_comment.inc @@ -6,7 +6,7 @@ class views_handler_field_comment extends views_handler_field { /** * Override init function to provide generic option to link to comment. */ - function init(&$view, &$options) { + function init(&$view, $options) { parent::init($view, $options); if (!empty($this->options['link_to_comment'])) { $this->additional_fields['cid'] = 'cid'; diff --git a/modules/comment/views_handler_field_comment_username.inc b/modules/comment/views_handler_field_comment_username.inc index a67612a..7b0a92f 100644 --- a/modules/comment/views_handler_field_comment_username.inc +++ b/modules/comment/views_handler_field_comment_username.inc @@ -6,7 +6,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_node_new_comments.inc b/modules/comment/views_handler_field_node_new_comments.inc index f724c12..11daebe 100644 --- a/modules/comment/views_handler_field_node_new_comments.inc +++ b/modules/comment/views_handler_field_node_new_comments.inc @@ -45,7 +45,7 @@ class views_handler_field_node_new_comments extends views_handler_field_numeric $this->field_alias = $this->table . '_' . $this->field; } - function pre_render(&$values) { + function pre_render($values) { global $user; if (!$user->uid || empty($values)) { return; diff --git a/modules/search/views_handler_filter_search.inc b/modules/search/views_handler_filter_search.inc index a6e5595..630c259 100644 --- a/modules/search/views_handler_filter_search.inc +++ b/modules/search/views_handler_filter_search.inc @@ -46,7 +46,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; } diff --git a/modules/taxonomy/views_handler_filter_term_node_tid.inc b/modules/taxonomy/views_handler_filter_term_node_tid.inc index ebcf10c..ceb8ea5 100644 --- a/modules/taxonomy/views_handler_filter_term_node_tid.inc +++ b/modules/taxonomy/views_handler_filter_term_node_tid.inc @@ -173,7 +173,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on } } - function value_validate(&$form, &$form_state) { + function value_validate($form, &$form_state) { // We only validate if they've chosen the text field style. if ($this->options['type'] != 'textfield') { return; diff --git a/modules/upload/views_handler_field_upload_description.inc b/modules/upload/views_handler_field_upload_description.inc index 964925c..2b0ac18 100644 --- a/modules/upload/views_handler_field_upload_description.inc +++ b/modules/upload/views_handler_field_upload_description.inc @@ -4,7 +4,7 @@ * Field handler to provide a list of roles. */ class views_handler_field_upload_description extends views_handler_field { - function init(&$view, &$options) { + function init(&$view, $options) { parent::init($view, $options); if (!empty($options['link_to_file'])) { $this->additional_fields['fid'] = 'fid'; diff --git a/modules/user/views_handler_field_user.inc b/modules/user/views_handler_field_user.inc index de8c6e6..0c62556 100644 --- a/modules/user/views_handler_field_user.inc +++ b/modules/user/views_handler_field_user.inc @@ -7,7 +7,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/plugins/views_plugin_row.inc b/plugins/views_plugin_row.inc index 06d0930..2fe3ae4 100644 --- a/plugins/views_plugin_row.inc +++ b/plugins/views_plugin_row.inc @@ -98,13 +98,13 @@ class views_plugin_row extends views_plugin { /** * Validate the options form. */ - function options_validate($form, &$form_state) { } + function options_validate(&$form, &$form_state) { } /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - function options_submit($form, &$form_state) { } + function options_submit(&$form, &$form_state) { } function query() { if (isset($this->base_table) && isset($this->options['relationship']) && isset($this->view->relationship[$this->options['relationship']])) { diff --git a/plugins/views_plugin_row_fields.inc b/plugins/views_plugin_row_fields.inc index 491f5d2..bd66b42 100644 --- a/plugins/views_plugin_row_fields.inc +++ b/plugins/views_plugin_row_fields.inc @@ -60,7 +60,7 @@ class views_plugin_row_fields extends views_plugin_row { * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - function options_submit($form, &$form_state) { + function options_submit(&$form, &$form_state) { $form_state['values']['row_options']['inline'] = array_filter($form_state['values']['row_options']['inline']); } }