Commit edbed841 authored by Tim Plunkett's avatar Tim Plunkett

Issue #1447118 by tim.plunkett: Use properly namespaced template functions.

parent 8f7f6326
......@@ -82,7 +82,7 @@ function date_ical_entity_info_alter(&$entity_info) {
*/
function date_ical_views_plugins() {
$module_path = drupal_get_path('module', 'date_ical');
module_load_include('inc', 'date_ical', 'theme.inc');
$theme_path = $module_path . '/theme';
$data = array(
'module' => 'date_ical', // This just tells our themes are elsewhere.
......@@ -94,7 +94,7 @@ function date_ical_views_plugins() {
'path' => $module_path,
'theme' => 'date_ical_vcalendar',
'theme file' => 'theme.inc',
'theme path' => $module_path,
'theme path' => $theme_path,
'uses fields' => TRUE,
'uses grouping' => FALSE,
'uses row plugin' => TRUE,
......@@ -111,7 +111,7 @@ function date_ical_views_plugins() {
'path' => $module_path,
'theme' => 'date_ical_vevent',
'theme file' => 'theme.inc',
'theme path' => $module_path,
'theme path' => $theme_path,
'uses options' => TRUE,
'uses fields' => FALSE,
'type' => 'feed',
......
......@@ -8,10 +8,8 @@
/**
* Preprocess an iCal feed
*/
function template_preprocess_date_ical_plugin_style_ical_feed(&$vars) {
global $base_url;
global $language;
$view = $vars['view'];
function template_preprocess_date_ical_vcalendar(&$variables) {
$view = $variables['view'];
$view_title = $view->get_title();
$title = variable_get('site_name', 'Drupal');
......@@ -20,11 +18,11 @@ function template_preprocess_date_ical_plugin_style_ical_feed(&$vars) {
}
$title .= !empty($view_title) ? ': ' . $view_title : '';
$vars['title'] = check_plain($title);
$variables['title'] = check_plain($title);
// During live preview we don't want to output the header since the contents
// of the feed are being displayed inside a normal HTML page.
if (empty($vars['view']->live_preview)) {
if (empty($variables['view']->live_preview)) {
// Keep devel module from appending queries to ical export.
$GLOBALS['devel_shutdown'] = FALSE;
......@@ -35,9 +33,8 @@ function template_preprocess_date_ical_plugin_style_ical_feed(&$vars) {
/**
* Default theme function for all iCal rows.
*/
function template_preprocess_date_ical_plugin_row_ical_feed(&$vars) {
$view = &$vars['view'];
$options = &$vars['options'];
$item = &$vars['row'];
function template_preprocess_date_ical_vevent(&$variables) {
$view = &$variables['view'];
$options = &$variables['options'];
$item = &$variables['row'];
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment