Removed obsolete $ in source files
This commit is contained in:
parent
a39c010e06
commit
e5f2b64d98
146 changed files with 836 additions and 1081 deletions
|
@ -1,14 +1,13 @@
|
|||
<?php
|
||||
// $Id: calendar_plugin_style.inc,v 1.1.2.18 2011/01/03 02:39:05 karens Exp $
|
||||
/**
|
||||
* Style plugin to create the calendar navigation and links.
|
||||
*
|
||||
*
|
||||
* Used by the main calendar page and calendar block displays.
|
||||
*/
|
||||
class calendar_plugin_style extends views_plugin_style {
|
||||
/**
|
||||
* Init will be called after construct, when the plugin is attached to a
|
||||
* view and a display.
|
||||
* view and a display.
|
||||
*/
|
||||
function init(&$view, &$display, $options = NULL) {
|
||||
parent::init($view, $display, $options);
|
||||
|
@ -17,7 +16,7 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
}
|
||||
$view->date_info->display_types = $this->display_types();
|
||||
}
|
||||
|
||||
|
||||
function display_types($granularity = NULL, $option_type = 'names') {
|
||||
$ids = array();
|
||||
$names = array();
|
||||
|
@ -39,7 +38,7 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
}
|
||||
return $$option_type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calendar argument date fields used in this view.
|
||||
*/
|
||||
|
@ -61,7 +60,7 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
}
|
||||
return ($date_fields);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Style validation.
|
||||
*/
|
||||
|
@ -71,11 +70,11 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
return $errors;
|
||||
}
|
||||
$style = $this->display->display_options['style_plugin'];
|
||||
|
||||
|
||||
$arguments = $this->display->handler->get_option('arguments');
|
||||
if (!in_array('date_argument', array_keys($arguments))) {
|
||||
if (empty($this->view->date_info->arg_missing)) {
|
||||
$errors[$style] = t("The @style style requires a Date argument.", array('@style' => $style));
|
||||
$errors[$style] = t("The @style style requires a Date argument.", array('@style' => $style));
|
||||
}
|
||||
$this->view->date_info->arg_missing = TRUE;
|
||||
$this->date_info->arg_fields = array();
|
||||
|
@ -86,13 +85,13 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
$this->date_info->arg_fields = $arguments['date_argument']['date_fields'];
|
||||
if ($arguments['date_argument']['default_action'] != 'default' || $arguments['date_argument']['default_argument_type'] != 'date') {
|
||||
if (empty($this->view->date_info->arg_missing_default)) {
|
||||
$errors[] = calendar_errors('missing_argument_default');
|
||||
$errors[] = calendar_errors('missing_argument_default');
|
||||
}
|
||||
$this->view->date_info->arg_missing_default = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure date fields are not set up to 'Group multiple values'
|
||||
|
||||
// Make sure date fields are not set up to 'Group multiple values'
|
||||
// in the calendar style.
|
||||
if ($style == 'calendar_style') {
|
||||
$view_fields = date_api_fields($this->view->base_table);
|
||||
|
@ -123,14 +122,14 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
}
|
||||
|
||||
function query() {
|
||||
|
||||
|
||||
require_once('./'. drupal_get_path('module', 'date_api') .'/date_api_sql.inc');
|
||||
|
||||
|
||||
$style_options = $this->view->style_plugin->options;
|
||||
|
||||
// Evaluate our argument values and figure out which
|
||||
|
||||
// Evaluate our argument values and figure out which
|
||||
// calendar display we need to create.
|
||||
$i = 0;
|
||||
$i = 0;
|
||||
foreach ($this->view->argument as $id => $argument) {
|
||||
if ($argument->field == 'date_argument') {
|
||||
// TODO Decide if we want to provide a date here or not.
|
||||
|
@ -154,7 +153,7 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
$this->view->date_info->min_date_date = date_format($this->view->date_info->min_date, DATE_FORMAT_DATE);
|
||||
$this->view->date_info->max_date_date = date_format($this->view->date_info->max_date, DATE_FORMAT_DATE);
|
||||
$this->view->date_info->forbid = isset($argument->forbid) ? $argument->forbid : FALSE;
|
||||
|
||||
|
||||
// Stop after the first date argument, if there is more than one.
|
||||
break;
|
||||
}
|
||||
|
@ -163,15 +162,15 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
$this->view->date_info->display_types = $this->display_types();
|
||||
$keys = drupal_map_assoc(array_keys(calendar_display_types()));
|
||||
$this->view->date_info->calendar_type = $keys[$this->view->date_info->granularity];
|
||||
|
||||
|
||||
// bring the node type into the query so we can use it in the theme
|
||||
if ($this->view->base_table == 'node') {
|
||||
$this->view->query->add_field('node', 'type');
|
||||
}
|
||||
|
||||
|
||||
parent::query();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render the calendar navigation style.
|
||||
*/
|
||||
|
@ -179,4 +178,3 @@ class calendar_plugin_style extends views_plugin_style {
|
|||
return theme($this->theme_functions(), $this->view, $this->options, array());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue