Removed obsolete $ in source files
This commit is contained in:
parent
a39c010e06
commit
e5f2b64d98
146 changed files with 836 additions and 1081 deletions
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
// $Id: theme.inc,v 1.1.2.15 2010/11/21 11:00:56 karens Exp $
|
||||
/**
|
||||
* Preprocess an ical feed
|
||||
*/
|
||||
function template_preprocess_calendar_view_ical(&$vars) {
|
||||
global $base_url;
|
||||
global $language;
|
||||
|
||||
|
||||
$view = &$vars['view'];
|
||||
$options = &$vars['options'];
|
||||
$items = &$vars['rows'];
|
||||
|
||||
|
||||
$style = &$view->style_plugin;
|
||||
|
||||
// Figure out which display which has a path we're using for this feed. If there isn't
|
||||
|
@ -24,18 +23,18 @@ function template_preprocess_calendar_view_ical(&$vars) {
|
|||
|
||||
// Keep devel module from appending queries to ical export.
|
||||
$GLOBALS['devel_shutdown'] = FALSE;
|
||||
|
||||
|
||||
drupal_set_header('Content-Type: text/calendar; charset=utf-8');
|
||||
drupal_set_header('Content-Disposition: attachment; filename="calendar.ics"; ');
|
||||
require_once('./'. drupal_get_path('module', 'date_api') .'/date_api_ical.inc');
|
||||
require_once('./'. drupal_get_path('module', 'date_api') .'/theme/theme.inc');
|
||||
require_once('./'. drupal_get_path('module', 'calendar') .'/includes/calendar.inc');
|
||||
|
||||
|
||||
$events = array();
|
||||
// Get the alias name for each of our data fields.
|
||||
foreach ($view->field as $name => $field) {
|
||||
// Some fields, like the node edit and delete links, have no alias.
|
||||
$field_alias = $field->field_alias != 'unknown' ? $field->field_alias : $name;
|
||||
$field_alias = $field->field_alias != 'unknown' ? $field->field_alias : $name;
|
||||
foreach (array('summary_field', 'description_field', 'location_field') as $data) {
|
||||
if ($field->field == $view->date_info->$data) {
|
||||
$$data = $field_alias;
|
||||
|
@ -70,11 +69,11 @@ function template_preprocess_calendar_view_ical(&$vars) {
|
|||
date_timezone_set($event['start'], timezone_open('UTC'));
|
||||
date_timezone_set($event['end'], timezone_open('UTC'));
|
||||
}
|
||||
|
||||
|
||||
$headertitle = filter_xss_admin($view->get_title());
|
||||
$title = variable_get('site_name', 'Drupal');
|
||||
$description = $headertitle . ($title ? ' | '. $title : '');
|
||||
|
||||
|
||||
$vars['calname'] = $description;
|
||||
$vars['events'] = $events;
|
||||
template_preprocess_date_vcalendar($vars);
|
||||
|
|
Reference in a new issue