Removed obsolete $ in source files
This commit is contained in:
parent
a39c010e06
commit
e5f2b64d98
146 changed files with 836 additions and 1081 deletions
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
//$Id: calendar.views.inc,v 1.1.2.11 2010/11/29 11:41:58 karens Exp $
|
||||
/**
|
||||
* Implementation of hook_views_query()
|
||||
*
|
||||
*
|
||||
* Handle the date_popup calendar goto date.
|
||||
*/
|
||||
function calendar_views_query_alter(&$view, &$query) {
|
||||
|
@ -10,24 +9,24 @@ function calendar_views_query_alter(&$view, &$query) {
|
|||
if (isset($_POST['calendar_goto']) && $_POST['view_name'] == $view->name) {
|
||||
require_once('./'. drupal_get_path('module', 'date_api') .'/date_api_elements.inc');
|
||||
$format = date_limit_format(variable_get('date_format_short', 'm/d/Y - H:i'), array('year', 'month', 'day'));
|
||||
$date = date_convert_from_custom($_POST['calendar_goto']['date'], $format);
|
||||
$date = date_convert_from_custom($_POST['calendar_goto']['date'], $format);
|
||||
switch ($_POST['calendar_type']) {
|
||||
case 'year':
|
||||
$arg = date_pad(date_part_extract($date, 'year'), 4);
|
||||
break;
|
||||
break;
|
||||
case 'month':
|
||||
$arg = date_pad(date_part_extract($date, 'year'), 4) .'-'. date_pad(date_part_extract($date, 'month'));
|
||||
break;
|
||||
break;
|
||||
case 'week':
|
||||
$ww = date_day_of_week($date, DATE_ISO);
|
||||
$ww = variable_get('date_first_day', 1) ? ($ww == 0 ? 6 : $ww - 1) : $ww;
|
||||
$date = date('Y-m-d', strtotime("-$ww days", strtotime($date)));
|
||||
$arg = date_pad(date_part_extract($date, 'year'), 4) .'-W'. date_pad(date_week($date));
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
$arg = date_pad(date_part_extract($date, 'year'), 4) .'-'. date_pad(date_part_extract($date, 'month')) .'-'. date_pad(date_part_extract($date, 'day'));
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
drupal_goto(str_replace($_POST['calendar_previous_arg'], $arg, $_POST['view_url']));
|
||||
exit();
|
||||
|
@ -40,34 +39,34 @@ function calendar_views_pre_view(&$view, &$display_id, &$args) {
|
|||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
*
|
||||
* Creates calendar displays of Views results.
|
||||
*
|
||||
*
|
||||
* Create a new calendar by enabling or cloning the default calendar,
|
||||
* changing the date argument to use the correct date field(s), and setting
|
||||
* up the year, month, day, week, and block views with the desired styles
|
||||
* up the year, month, day, week, and block views with the desired styles
|
||||
* and fields.
|
||||
*
|
||||
*
|
||||
* Unlike previous versions of the Calendar module, there is just a single
|
||||
* Date argument instead of year, month, and day arguments. The argument
|
||||
* value will be YYYY-MM-DD for a day, YYYY-MM for a month, YYYY for a
|
||||
* year, and YYYY-W99 for a week. There is a default option to set the
|
||||
* year, and YYYY-W99 for a week. There is a default option to set the
|
||||
* argument to the current date when the argument is empty.
|
||||
*
|
||||
* A calendar display creates calendar navigation and links to
|
||||
*
|
||||
* A calendar display creates calendar navigation and links to
|
||||
* multiple displays for the year, month, day, or week views. The actual
|
||||
* displays are created by attaching calendar views that use whatever
|
||||
* styles are desired for those pages.
|
||||
*
|
||||
* styles are desired for those pages.
|
||||
*
|
||||
* Calendar views are attachments to create the year, month, day,
|
||||
* and week displays. They can be set to use any style, either a
|
||||
* calendar style or any other Views style, like teasers or lists.
|
||||
* If you don't want to use one of them, don't attach it to
|
||||
* anything. Only the attached views will show up in the calendar.
|
||||
*
|
||||
*
|
||||
* A calendar block will create a calendar block for the
|
||||
* view results. Attach a block view to the block and set up the
|
||||
* desired style in the block view.
|
||||
* desired style in the block view.
|
||||
*/
|
||||
/**
|
||||
* Implementation of hook_views_plugins
|
||||
|
@ -78,7 +77,7 @@ function calendar_views_plugins() {
|
|||
if (module_exists('calendar_multiday')) {
|
||||
$theme_path = drupal_get_path('module', 'calendar_multiday');
|
||||
}
|
||||
|
||||
|
||||
$views_path = drupal_get_path('module', 'views');
|
||||
require_once "./$theme_path/theme/theme.inc";
|
||||
|
||||
|
@ -135,7 +134,7 @@ function calendar_views_plugins() {
|
|||
'admin' => t('Calendar page'),
|
||||
'help topic' => 'getting-started',
|
||||
'js' => array(
|
||||
'misc/farbtastic/farbtastic.js',
|
||||
'misc/farbtastic/farbtastic.js',
|
||||
drupal_get_path('module', 'calendar') .'/js/calendar_colorpicker.js',
|
||||
),
|
||||
),
|
||||
|
@ -222,13 +221,13 @@ function calendar_views_plugins() {
|
|||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
if (module_exists('calendar_multiday')) {
|
||||
$data['style']['calendar_style']['additional themes'] += array(
|
||||
'calendar_day_overlap' => 'style',
|
||||
'calendar_week_overlap' => 'style',
|
||||
'calendar_week_overlap' => 'style',
|
||||
);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue