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,15 +1,14 @@
<?php
// $Id: calendar_plugin_display_page.inc,v 1.1.2.25 2011/01/03 02:39:05 karens Exp $
/**
* The plugin that handles a full calendar page.
*
*
* The only style option that will be available is the calendar
* style, which creates the navigation and links to other calendar
* displays. All options for paging, row plugins, etc. are
* deferred to the attachments.
*/
class calendar_plugin_display_page extends views_plugin_display_page {
function render() {
if (!empty($this->view->date_info->forbid)) {
drupal_not_found();
@ -23,11 +22,11 @@ class calendar_plugin_display_page extends views_plugin_display_page {
*/
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("The Calendar display '@display_title' will not work without a Date argument.", array('@display_title' => $this->definition['title']));
$errors[] = t("The Calendar display '@display_title' will not work without a Date argument.", array('@display_title' => $this->definition['title']));
}
$this->view->date_info->arg_missing = TRUE;
}
@ -37,12 +36,12 @@ class calendar_plugin_display_page extends views_plugin_display_page {
}
$this->view->date_info->arg_missing_default = TRUE;
}
return $errors;
}
function get_style_type() { return 'calendar'; }
function defaultable_sections($section = NULL) {
if (in_array($section, array('style_plugin', 'row_options', 'row_plugin', 'items_per_page'))) {
return FALSE;
@ -63,11 +62,11 @@ class calendar_plugin_display_page extends views_plugin_display_page {
$display['defaults']['row_plugin'] = FALSE;
$display['defaults']['row_options'] = FALSE;
$display['defaults']['items_per_page'] = FALSE;
}
}
/**
* Add custom option definitions.
*/
*/
function option_definition () {
$options = parent::option_definition();
$options['calendar_colors'] = array('default' => array());
@ -91,7 +90,7 @@ class calendar_plugin_display_page extends views_plugin_display_page {
$categories['calendar_settings'] = array(
'title' => theme('advanced_help_topic', 'calendar', 'settings') . t('Calendar settings'),
);
$colors = $this->get_option('calendar_colors');
$colors_taxonomy = $this->get_option('calendar_colors_taxonomy');
$options['calendar_colors'] = array(
@ -132,15 +131,15 @@ class calendar_plugin_display_page extends views_plugin_display_page {
);
}
function popup_options() {
return array(0 => t('No'), 1 => t('Yes'));
}
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_popup':
$form['#title'] .= t('Date changer');
@ -149,9 +148,9 @@ class calendar_plugin_display_page extends views_plugin_display_page {
'#default_value' => $this->get_option('calendar_popup'),
'#options' => $this->popup_options(),
'#description' => t('Display a popup calendar date selector?'),
);
);
break;
case 'calendar_date_link':
$form['#title'] .= t('Add new date link');
$form['calendar_date_link'] = array(
@ -159,7 +158,7 @@ class calendar_plugin_display_page extends views_plugin_display_page {
'#default_value' => $this->get_option('calendar_date_link'),
'#options' => array('' => t('No link')) + node_get_types('names'),
'#description' => t('Display a link to add a new date of the specified content type. Displayed only to users with appropriate permissions.'),
);
);
break;
case 'calendar_colors':
@ -173,7 +172,7 @@ class calendar_plugin_display_page extends views_plugin_display_page {
'#prefix' => '<div class="clear-block"><div style="float:left">',
'#suffix' => '</div>',
);
$colors = $this->get_option('calendar_colors');
$colors = $this->get_option('calendar_colors');
switch ($method) {
case 'types':
@ -293,6 +292,6 @@ class calendar_plugin_display_page extends views_plugin_display_page {
variable_set('calendar_date_link_'. $form_state['values']['calendar_date_link'], $this->display->handler->get_option('path'));
break;
}
}
}
}