Removed obsolete $ in source files

This commit is contained in:
Manuel Cillero 2017-08-29 14:13:02 +02:00
parent a39c010e06
commit e5f2b64d98
146 changed files with 836 additions and 1081 deletions

View file

@ -1,18 +1,17 @@
<?php
// $Id: calendar_plugin_display_attachment.inc,v 1.1.2.22 2011/01/03 02:39:05 karens Exp $
/**
* The plugin that handles calendar attachment displays.
*
*
* Adding year/month/day/week pages as attachments makes it
* possible to use any style type, so they could be tables,
* lists, teasers, or nodes as well as traditional calendar
* pages.
*
* Force 'inherit_arguments' and 'inherit_filters' to TRUE,
* and 'attachment_position' to 'after', and don't display
*
* Force 'inherit_arguments' and 'inherit_filters' to TRUE,
* and 'attachment_position' to 'after', and don't display
* those options in the UI.
*
* Allows paging (regular attachments do not), and adds an option
*
* Allows paging (regular attachments do not), and adds an option
* to choose what calendar period this display represents.
*/
class calendar_plugin_display_attachment extends views_plugin_display_attachment {
@ -27,7 +26,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
}
return $this->view->style_plugin->render($this->view->result);
}
/**
* Create an array of possible display periods.
*/
@ -43,9 +42,9 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$types = calendar_display_types();
$default = $this->get_option('calendar_type');
if (!array_key_exists($default, $types)) $default = 'month';
return $default;
return $default;
}
/**
* Inspect argument and view information to see which calendar
@ -54,7 +53,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
* if there are values.
*/
function display_granularity($display_id) {
$arguments = $this->view->get_items('argument', $display_id);
$wildcard = '';
$argument = '';
@ -84,19 +83,19 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
}
return $view_granularity;
}
/**
* Display validation.
*/
function validate() {
$errors = parent::validate();
$arguments = $this->display->handler->get_option('arguments');
if (!in_array('date_argument', array_keys($arguments))) {
if (empty($this->view->date_info->arg_missing)) {
$errors[] = t("A Calendar period display will not work without a Date argument.");
$errors[] = t("A Calendar period display will not work without a Date argument.");
}
$this->view->date_info->arg_missing = TRUE;
$this->view->date_info->arg_missing = TRUE;
}
elseif ($arguments['date_argument']['default_action'] != 'default' || $arguments['date_argument']['default_argument_type'] != 'date') {
if (empty($this->view->date_info->arg_missing_default)) {
@ -107,21 +106,21 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
return $errors;
}
/**
* Attach only the appropriate displays for the current argument.
*/
function attach_to($display_id) {
$display_granularity = $this->calendar_type();
$view_granularity = $this->display_granularity($display_id);
// If this is not the right display to show,
// If this is not the right display to show,
// don't attach it, just exit.
if ($view_granularity != $display_granularity) {
unset($this->display);
return;
}
$this->view->date_info->parent_id = $display_id;
// See if we're attaching to a block rather than a page.
@ -139,7 +138,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$this->view->date_info->calendar_colors_group = $this->view->display[$display_id]->handler->options['calendar_colors_group'];
$this->view->date_info->calendar_popup = $this->view->display[$display_id]->handler->options['calendar_popup'];
$this->view->date_info->calendar_date_link = $this->view->display[$display_id]->handler->options['calendar_date_link'];
}
}
parent::attach_to($display_id);
}
@ -149,17 +148,17 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$this->view->date_info->display_granularity = $this->calendar_type();
$this->view->date_info->calendar_type = $this->calendar_type();
}
function query() {
// If we are using legend colors based on taxonomy, make sure the
// If we are using legend colors based on taxonomy, make sure the
// node vid field is added to the query so the theme can use it.
if (!empty($this->view->date_info->calendar_colors_taxonomy)) {
if (empty($this->additional_fields)) $this->additional_fields = array();
if (empty($this->additional_fields)) $this->additional_fields = array();
$this->view->query->add_field('node', 'vid');
}
parent::query();
parent::query();
}
/**
* Override some of the parent options.
*/
@ -168,7 +167,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$display['inherit_argments'] = TRUE;
$display['inherit_filters'] = TRUE;
$display['attachment_position'] = 'after';
}
}
/**
* Add custom option definitions.
@ -178,11 +177,11 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$options['calendar_type'] = array('default' => $this->calendar_type());
return $options;
}
function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
switch ($form_state['section']) {
case 'calendar_type':
$form['#title'] .= t('Calendar period');
@ -210,7 +209,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
break;
}
}
/**
* Provide the summary for attachment options in the views UI.
*
@ -222,7 +221,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$categories['calendar_settings'] = array(
'title' => t('Calendar settings'),
);
$options['calendar_type'] = array(
'category' => 'calendar_settings',
'title' => t('Calendar period'),