diff --git a/.htaccess b/.htaccess
index 502c666..8ba4c67 100644
--- a/.htaccess
+++ b/.htaccess
@@ -112,5 +112,3 @@ DirectoryIndex index.php
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
-
-# $Id$
diff --git a/modules/administerusersbyrole/administerusersbyrole.info b/modules/administerusersbyrole/administerusersbyrole.info
index f9c8400..1366c1e 100644
--- a/modules/administerusersbyrole/administerusersbyrole.info
+++ b/modules/administerusersbyrole/administerusersbyrole.info
@@ -1,4 +1,3 @@
-; $Id: administerusersbyrole.info,v 1.1.2.2 2009/06/29 16:06:09 smokris Exp $
name = Administer Users by Role
description = "Allows users with 'administer users' permission and a role (specified in 'Permissions') to edit/delete other users with a specified role. Also provides control over user creation."
package = Core - extended
diff --git a/modules/administerusersbyrole/administerusersbyrole.module b/modules/administerusersbyrole/administerusersbyrole.module
index a2a8c76..884ac5e 100644
--- a/modules/administerusersbyrole/administerusersbyrole.module
+++ b/modules/administerusersbyrole/administerusersbyrole.module
@@ -1,6 +1,4 @@
role_delegation.
diff --git a/modules/autosave/autosave.module b/modules/autosave/autosave.module
index b99d855..6131833 100644
--- a/modules/autosave/autosave.module
+++ b/modules/autosave/autosave.module
@@ -1,6 +1,4 @@
uid)) {
//$autosaved_form_id = $form['type']['#value'] ? $form['type']['#value'] .'_node_form' : 'node_form';
diff --git a/modules/better_formats/better-formats-defaults-admin-form.tpl.php b/modules/better_formats/better-formats-defaults-admin-form.tpl.php
index bf8fef9..81fedbf 100644
--- a/modules/better_formats/better-formats-defaults-admin-form.tpl.php
+++ b/modules/better_formats/better-formats-defaults-admin-form.tpl.php
@@ -1,6 +1,4 @@
update.php and run the remaining updates.', array('@update-php' => base_path() .'update.php?op=selection')), 'warning', FALSE);
$ret['#abort'] = array('success' => FALSE, 'query' => t('calendar.module has updates, but cannot be updated until views.module is updated first.'));
-
+
return $ret;
}
-
+
variable_del('calendar_empty_arg');
-
+
// Can't use variable_del because we don't have a reliable
// way to find the old view names.
db_query("DELETE FROM {variable} WHERE name LIKE 'calendar_%'");
@@ -101,7 +99,7 @@ function calendar_update_6001() {
$ret = array();
drupal_set_message(t('Calendar module cannot be updated until after Views has been updated. Please return to update.php and run the remaining updates.', array('@update-php' => base_path() .'update.php?op=selection')), 'warning', FALSE);
$ret['#abort'] = array('success' => FALSE, 'query' => t('calendar.module has updates, but cannot be updated until views.module is updated first.'));
-
+
return $ret;
}
if (!module_exists('calendar_ical')) {
@@ -117,7 +115,7 @@ function calendar_update_6002() {
$ret = array();
drupal_set_message(t('Calendar module cannot be updated until after Views has been updated. Please return to update.php and run the remaining updates.', array('@update-php' => base_path() .'update.php?op=selection')), 'warning', FALSE);
$ret['#abort'] = array('success' => FALSE, 'query' => t('calendar.module has updates, but cannot be updated until views.module is updated first.'));
-
+
return $ret;
}
$periods = array(
@@ -147,11 +145,11 @@ function calendar_update_6002() {
db_query("UPDATE {views_display} SET id='%s', display_plugin='%s', display_options='%s' WHERE id='%s'", $row['id'], $row['display_plugin'], $row['display_options'], $id);
}
elseif ($row['display_plugin'] == 'calendar' || $row['display_plugin'] == 'calendar_block') {
- db_query("UPDATE {views_display} SET id='%s' WHERE id='%s'", $row['id'] .'_1', $row['id']);
+ db_query("UPDATE {views_display} SET id='%s' WHERE id='%s'", $row['id'] .'_1', $row['id']);
}
db_query("DELETE FROM {views_object_cache} WHERE name = '%s'", $row['name']);
}
views_invalidate_cache();
$ret[] = array('success' => TRUE, 'query' => 'Updated calendar displays to use new handlers.');
return $ret;
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/calendar.module b/modules/calendar/calendar.module
index a152511..50670b0 100644
--- a/modules/calendar/calendar.module
+++ b/modules/calendar/calendar.module
@@ -1,5 +1,4 @@
t('Year'), 'month' => t('Month'), 'day' => t('Day'), 'week' => t('Week'));
+ return array('year' => t('Year'), 'month' => t('Month'), 'day' => t('Day'), 'week' => t('Week'));
}
/**
- * Figure out which type of display to use,
+ * Figure out which type of display to use,
* based on the current argument.
*
* @return year, month, day, or week.
@@ -193,7 +192,7 @@ function calendar_current_type($view) {
* @param $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
* @param $stripe - the hex code for this stripe.
* @param $label - the label to give this stripe.
- *
+ *
* TODO Reconsider use of $GLOBALS as a method of triggering the legend, there
* may be a better way.
*/
@@ -208,7 +207,7 @@ function calendar_node_stripe($view, &$node, $query_name, $delta, $stripe = NULL
if(!(isset($node->stripe))){
$node->stripe = array();
$node->stripe_label = array();
- }
+ }
if (!$label && array_key_exists($type, $type_names)) {
$label = $type_names[$type];
}
@@ -235,7 +234,7 @@ function calendar_node_stripe($view, &$node, $query_name, $delta, $stripe = NULL
* @param $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
* @param $stripe - the hex code for this stripe.
* @param $label - the label to give this stripe.
- *
+ *
* TODO Reconsider use of $GLOBALS as a method of triggering the legend, there
* may be a better way.
*/
@@ -245,8 +244,8 @@ function calendar_node_taxonomy_stripe($view, &$node, $query_name, $delta, $stri
if (empty($colors_taxonomy)) {
return;
}
-
- // Rename the vid added by Views to the normal name that
+
+ // Rename the vid added by Views to the normal name that
// taxonomy will expect, it's in the raw results.
$node->vid = $node->raw->node_vid;
$terms_for_node = taxonomy_node_get_terms($node);
@@ -269,7 +268,7 @@ function calendar_node_taxonomy_stripe($view, &$node, $query_name, $delta, $stri
else {
$node->stripe[] = '';
$node->stripe_label[] = '';
- }
+ }
return;
}
@@ -282,7 +281,7 @@ function calendar_node_taxonomy_stripe($view, &$node, $query_name, $delta, $stri
* @param $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
* @param $stripe - the hex code for this stripe.
* @param $label - the label to give this stripe.
- *
+ *
* TODO Reconsider use of $GLOBALS as a method of triggering the legend, there
* may be a better way.
*/
@@ -315,7 +314,7 @@ function calendar_node_group_stripe($view, &$node, $query_name, $delta, $stripe
else {
$node->stripe[] = '';
$node->stripe_label[] = '';
- }
+ }
return $stripe;
}
@@ -376,7 +375,7 @@ function calendar_date_select_form(&$form_state, $view) {
'#type' => 'hidden',
'#value' => $view->get_url(),
);
- $pos = calendar_arg_position($view);
+ $pos = calendar_arg_position($view);
$form['calendar_previous_arg'] = array(
'#type' => 'hidden',
'#value' => $view->args[$pos],
@@ -399,7 +398,7 @@ function calendar_arg_position($view) {
}
/**
* Get the url for a calendar node.
- *
+ *
* @param $node - a calendar node object
* @param $default - a default url to use when nothing specific is provided.
*/
@@ -446,24 +445,24 @@ function calendar_errors($error) {
}
/**
* Implementation of hook_elements.
- *
+ *
* Much of the colorpicker code was adapted from the Colorpicker module.
* That module has no stable release yet nor any D6 branch.
- *
+ *
* TODO Consider dropping the duplicate code and adding a dependency
- * when that module is more stable, if calendar module customizations will
+ * when that module is more stable, if calendar module customizations will
* work in it.
*/
function calendar_elements() {
// the Farbtastic colorpicker
$type['calendar_colorpicker'] = array(
- '#attributes' => array('class' => 'calendar_colorpicker'),
+ '#attributes' => array('class' => 'calendar_colorpicker'),
'#input' => TRUE,
);
-
+
// a textfield to associate with the Farbtastic colorpicker
$type['calendar_colorfield'] = array(
- '#attributes' => array('class' => 'calendar_colorfield'),
+ '#attributes' => array('class' => 'calendar_colorfield'),
'#input' => TRUE,
'#validate' => array('calendar_validate_hex_color' => array())
);
@@ -511,7 +510,7 @@ function theme_calendar_colorfield($element) {
/**
* Add link to calendar to nodes.
- *
+ *
* Controlled by value of 'calendar_date_link' in the view.
*/
function calendar_link($type, $object, $teaser = FALSE) {
@@ -553,7 +552,7 @@ function calendar_remove($view_name) {
function calendar_week_header($view) {
$len = isset($view->date_info->style_name_size) ? $view->date_info->style_name_size : (!empty($view->date_info->mini) ? 1 : 3);
$with_week = !empty($view->date_info->style_with_weekno);
-
+
// create week header
$untranslated_days = calendar_untranslated_days();
if ($len == 99) {
@@ -608,7 +607,7 @@ function calendar_build_nodes(&$view, &$items) {
// Midnights are determined based on the same timezone as the View uses
$display_timezone = date_timezone_get($view->date_info->min_date);
$display_timezone_name = timezone_name_get($display_timezone);
-
+
// Translate the view min and max dates to UTC values
// so we can compare UTC dates to the view range.
$min_utc = drupal_clone($view->date_info->min_date);
@@ -650,14 +649,14 @@ function calendar_build_nodes(&$view, &$items) {
$local_tz = date_get_timezone($field['tz_handling'], 'date');
$field_name = $field['field_name'];
$rrule_field = str_replace(array('_value2', '_value'), '_rrule', $alias);
-
+
// Set a flag to tell us if individual multi-day dates need to be
// split into separate nodes.
$split_dates = TRUE;
if (strstr($view->current_display, '_ical')) {
$split_dates = FALSE;
}
-
+
// If there is no field for this item, just default to the site format.
if (!isset($view->field[$field_name])) {
$format = variable_get('date_format_short', 'm/d/Y - H:i');
@@ -692,7 +691,7 @@ function calendar_build_nodes(&$view, &$items) {
// set the domain part of the id
$domain = check_plain($_SERVER['SERVER_NAME']);
-
+
// If there are multiple date fields in this calendar we may get
// duplicate items from the other date fields, so add a way to
// make sure each individual date field only gets added to the
@@ -705,9 +704,9 @@ function calendar_build_nodes(&$view, &$items) {
if (substr($field['type'], 0, 3) == 'cck') {
$real_field = str_replace(array('_value2', '_value'), '', $field_name);
}
-
+
$id = 'calendar.'. $item->{$view->base_field} .'.'. $real_field .'.'. $delta;
-
+
// When creating iCal feeds for repeating dates we don't want all
// the multiple values, send only the first value.
if (strstr($view->current_display, '_ical')) {
@@ -718,30 +717,30 @@ function calendar_build_nodes(&$view, &$items) {
continue;
}
}
-
+
if (!in_array($id, $processed) && !empty($item->calendar_fields->$alias)) {
-
+
// Create from and to date values for each item, adjusted to
// the correct timezone.
$values[0] = !empty($item->calendar_fields->$fromto[0]) ? $item->calendar_fields->$fromto[0] : $item->calendar_fields->$alias;
$values[1] = !empty($item->calendar_fields->$fromto[1]) ? $item->calendar_fields->$fromto[1] : $item->calendar_fields->$alias;
-
+
$db_tz = date_get_timezone_db($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
$to_zone = date_get_timezone($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
-
+
// Now $display_timezone determines how $item is split into
// one entry per day, while $to_zone determines how date is displayed.
// For now, use the date fields's timezone for the day splitting.
$display_timezone_name = $to_zone;
$values_display = array();
-
+
// Start date
$date = date_make_date($values[0], $db_tz, $field['sql_type']);
if ($db_tz != $to_zone) {
date_timezone_set($date, timezone_open($to_zone));
}
$values[0] = date_format($date, DATE_FORMAT_DATETIME);
-
+
if ($display_timezone_name != $to_zone) {
date_timezone_set($date, $display_timezone);
$values_display[0] = date_format($date, DATE_FORMAT_DATETIME);
@@ -749,7 +748,7 @@ function calendar_build_nodes(&$view, &$items) {
else {
$values_display[0] = $values[0];
}
-
+
// End date
$date = date_make_date($values[1], $db_tz, $field['sql_type']);
if ($db_tz != $to_zone) {
@@ -763,7 +762,7 @@ function calendar_build_nodes(&$view, &$items) {
else {
$values_display[1] = $values[1];
}
-
+
// Now $values contain start and end date of a node,
// expressed as strings in the display (local) timezone.
// $values_utc does the same in UTC timezone.
@@ -778,13 +777,13 @@ function calendar_build_nodes(&$view, &$items) {
date_timezone_set($date, $display_timezone);
$max_zone_string[$display_timezone_name] = date_format($date, DATE_FORMAT_DATE);
}
-
+
// Create a node for each date within the field's date range,
// limited to the view's date range (regarding only day, not time).
$now = max($min_zone_string[$display_timezone_name], substr($values_display[0], 0, 10));
$to = min($max_zone_string[$display_timezone_name], substr($values_display[1], 0, 10));
$next = date_make_date($now, $display_timezone);
-
+
if ($display_timezone_name != $to_zone) {
// Make $start and $end (derived from $node) use the timezone $to_zone, just as $values[..] do
date_timezone_set($next, timezone_open($to_zone));
@@ -792,13 +791,13 @@ function calendar_build_nodes(&$view, &$items) {
if (empty($to)) {
$to = $now;
}
-
+
// $now and $next are midnight (in display timezone) on the first day where node will occur.
// $to is midnight on the last day where node will occur.
// All three were limited by the min-max date range of the view.
while ($now <= $to) {
$node = drupal_clone($item);
-
+
// Make sure the pseudo node has the same properties a
// regular node would have.
if (isset($node->node_title) && !isset($node->title)) {
@@ -820,10 +819,10 @@ function calendar_build_nodes(&$view, &$items) {
$node->format_time = '';
}
$node->url = calendar_get_node_link($node);
-
+
//$node->$fromto[0] = $values[0];
//$node->$fromto[1] = $values[1];
-
+
// Flag which datefield this node is using, in case
// there are multiple date fields in the view.
$node->datefield = $alias;
@@ -863,16 +862,16 @@ function calendar_build_nodes(&$view, &$items) {
}
$node->date_start = date_create($values[0], timezone_open($to_zone));
$node->date_end = date_create(!empty($values[1]) ? $values[1] : $values[0], timezone_open($to_zone));;
-
+
// Make date objects
$node->calendar_start_date = date_create($node->calendar_start, timezone_open($to_zone));
$node->calendar_end_date = date_create($node->calendar_end, timezone_open($to_zone));
-
+
// Change string timezones into
// calendar_start and calendar_end are UTC dates as formatted strings
$node->calendar_start = date_format($node->calendar_start_date, DATE_FORMAT_DATETIME);
$node->calendar_end = date_format($node->calendar_end_date, DATE_FORMAT_DATETIME);
-
+
if (substr($real_field, 0, 6) == 'field_') {
$cck_field = content_fields($cck_field_name);
$granularity = is_array($cck_field['granularity']) ? end($cck_field['granularity']) : $cck_field['granularity'];
@@ -883,13 +882,13 @@ function calendar_build_nodes(&$view, &$items) {
$increment = 1;
}
$node->calendar_all_day = $granularity == 'day' ? TRUE : date_is_all_day($node->calendar_start, $node->calendar_end, $granularity, $increment);
-
+
// Flag all day values specifically set in date.
$all_day_field = str_replace(array('_value2', '_value'), '_all_day', $node->datefield);
if (!empty($all_day_field) && !empty($item->$all_day_field)) {
$node->calendar_all_day = TRUE;
}
-
+
unset($node->calendar_fields);
if (isset($node) && (empty($node->calendar_start))) {
// if no date for the node and no date in the item
diff --git a/modules/calendar/calendar_ical/calendar-view-ical.tpl.php b/modules/calendar/calendar_ical/calendar-view-ical.tpl.php
index 55b51d3..0eb083f 100644
--- a/modules/calendar/calendar_ical/calendar-view-ical.tpl.php
+++ b/modules/calendar/calendar_ical/calendar-view-ical.tpl.php
@@ -1,5 +1,4 @@
diff --git a/modules/calendar/calendar_ical/calendar_ical.info b/modules/calendar/calendar_ical/calendar_ical.info
index 145be45..60a9a61 100644
--- a/modules/calendar/calendar_ical/calendar_ical.info
+++ b/modules/calendar/calendar_ical/calendar_ical.info
@@ -1,4 +1,3 @@
-; $Id: calendar_ical.info,v 1.1.2.1 2008/09/05 11:03:42 karens Exp $
name = Calendar iCal
description = Adds ical functionality to Calendar views.
dependencies[] = views
@@ -14,4 +13,3 @@ version = "6.x-2.4"
core = "6.x"
project = "calendar"
datestamp = "1294072550"
-
diff --git a/modules/calendar/calendar_ical/calendar_ical.install b/modules/calendar/calendar_ical/calendar_ical.install
index b354036..8881ad1 100644
--- a/modules/calendar/calendar_ical/calendar_ical.install
+++ b/modules/calendar/calendar_ical/calendar_ical.install
@@ -1,6 +1,4 @@
TRUE, 'query' => 'Updated calendar ical displays to use new handlers and ids.');
views_invalidate_cache();
return $ret;
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/calendar_ical/calendar_ical.module b/modules/calendar/calendar_ical/calendar_ical.module
index 2ae790a..a09b236 100644
--- a/modules/calendar/calendar_ical/calendar_ical.module
+++ b/modules/calendar/calendar_ical/calendar_ical.module
@@ -1,6 +1,4 @@
'. $image .'';
}
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/calendar_ical/calendar_ical.views.inc b/modules/calendar/calendar_ical/calendar_ical.views.inc
index 63a7b33..18d4faf 100644
--- a/modules/calendar/calendar_ical/calendar_ical.views.inc
+++ b/modules/calendar/calendar_ical/calendar_ical.views.inc
@@ -1,6 +1,4 @@
attach_to($display_id, $this->get_path(), $clone->get_title());
}
}
-
+
/**
* Display validation.
*/
function validate() {
$errors = parent::validate();
-
+
$arguments = $this->display->handler->get_option('arguments');
$filters = $this->display->handler->get_option('filters');
-
+
if (!array_key_exists('date_argument', $arguments) && !array_key_exists('date_filter', $filters)) {
if (empty($this->view->date_info->arg_missing)) {
- $errors[] = t("A Calendar period display will not work without a Date argument or a Date filter.");
+ $errors[] = t("A Calendar period display will not work without a Date argument or a Date filter.");
}
- $this->view->date_info->arg_missing = TRUE;
+ $this->view->date_info->arg_missing = TRUE;
}
- if (array_key_exists('date_argument', $arguments) &&
+ if (array_key_exists('date_argument', $arguments) &&
($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');
@@ -213,6 +212,5 @@ class calendar_plugin_display_ical extends views_plugin_display_page {
}
return $errors;
- }
+ }
}
-
diff --git a/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc b/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc
index f8ddd32..b48f558 100644
--- a/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc
+++ b/modules/calendar/calendar_ical/calendar_plugin_style_ical.inc
@@ -1,5 +1,4 @@
handler->default_display->options['fields'];
$this->options['fields'] = $fields;
}
-
+
function query() {
// We need these values for the iCal feed.
$this->view->query->add_field('node', 'title');
$this->view->query->add_field('node', 'type');
parent::query();
}
-
+
function attach_to($display_id, $path, $title) {
$display = $this->view->display[$display_id]->handler;
$url_options = array();
@@ -24,7 +23,7 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
if ($input) {
$url_options['query'] = $input;
}
-
+
// TODO adjust this to pick up default values when no arg is set?
$url = url($this->view->get_url(NULL, $path), $url_options);
if (empty($this->view->feed_icon)) {
@@ -50,14 +49,14 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
$options['location_field'] = '';
$options['fields'] = array();
}
-
+
function option_definition() {
$options = parent::option_definition();
$options['summary_field'] = array('default' => '', 'translatable' => TRUE);
$options['description_field'] = array('default' => '', 'translatable' => TRUE);
$options['location_field'] = array('default' => '', 'translatable' => TRUE);
-
+
return $options;
}
@@ -68,7 +67,7 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
$options[$field['field']] = $handler->ui_name();
}
$form['#prefix'] = '
'. t("Map the View fields to the values they should represent in the iCal feed. Only fields that have been added to the view are available to use in this way. You can add additional fields to the view and mark them 'Exclude from display' if you only want them in the iCal feed.") .'
';
-
+
$form['summary_field'] = array(
'#type' => 'select',
'#title' => t('Title'),
@@ -88,7 +87,7 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
'#default_value' => $this->options['location_field'],
'#options' => $options,
);
-
+
}
/**
@@ -96,30 +95,30 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
*/
function validate() {
$errors = parent::validate();
-
+
$style = $this->display->display_options['style_plugin'];
-
+
$arguments = $this->display->handler->get_option('arguments');
$filters = $this->display->handler->get_option('filters');
-
+
if (!array_key_exists('date_argument', $arguments) && !array_key_exists('date_filter', $filters)) {
if (empty($this->view->date_info->arg_missing)) {
- $errors[$style] = t("The @style style requires a Date argument or a Date filter.", array('@style' => $style));
+ $errors[$style] = t("The @style style requires a Date argument or a Date filter.", array('@style' => $style));
}
$this->view->date_info->arg_missing = TRUE;
}
- if (array_key_exists('date_argument', $arguments) &&
+ if (array_key_exists('date_argument', $arguments) &&
($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;
}
-
+
if (empty($this->options['summary_field'])) {
$errors[] = $errors[$style] = t("The @style style requires a Title field for the iCal export.", array('@style' => $style));
}
- // 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);
@@ -138,20 +137,20 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
}
return $errors;
}
-
+
function render() {
require_once('./'. drupal_get_path('module', 'calendar') .'/includes/calendar.inc');
-
+
// Transfer the style options to the view object so they
// can be easily accessed in the theme.
$style_options = $this->options;
$this->view->date_info->summary_field = $style_options['summary_field'];
$this->view->date_info->description_field = $style_options['description_field'];
$this->view->date_info->location_field = $style_options['location_field'];
-
- // 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.
@@ -172,13 +171,13 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
$this->view->date_info->week = isset($argument->week) ? $argument->week : NULL;
$this->view->date_info->min_date = $argument->min_date;
$this->view->date_info->max_date = $argument->max_date;
-
+
// Stop after the first date argument, if there is more than one.
break;
}
$i++;
}
-
+
// The ical display might have date filters instead of arguments.
// If we missed getting a min date from date arguments, try date filters.
if (empty($this->view->date_info->min_date)) {
@@ -204,19 +203,19 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
$this->view->date_info->date_fields = array();
}
$this->view->date_info->date_fields = array_merge($this->view->date_info->date_fields, array_keys($filter->options['date_fields']));
-
+
// Stop after the first date filter, if there is more than one.
break;
}
}
$i++;
}
-
+
// Render each field into an output array.
$items = array();
$calendar_fields = date_api_fields($this->view->base_table);
$calendar_fields = array_keys($calendar_fields['alias']);
-
+
foreach ($this->view->result as $num => $row) {
$items[$num] = $row;
// Store the raw date values before formatting the results.
@@ -227,17 +226,17 @@ class calendar_plugin_style_ical extends views_plugin_style_rss {
}
foreach ($this->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;
if (!empty($field) && is_object($field)) {
$field_output = $field->theme($row);
$items[$num]->{$field_alias} = $field_output;
}
}
}
-
+
// Massage the resulting items into formatted calendar items.
$items = calendar_build_nodes($this->view, $items);
-
+
// Merge in items from other sources.
foreach (module_implements('calendar_add_items') as $module) {
$function = $module .'_calendar_add_items';
diff --git a/modules/calendar/calendar_ical/theme.inc b/modules/calendar/calendar_ical/theme.inc
index a867437..64b4952 100644
--- a/modules/calendar/calendar_ical/theme.inc
+++ b/modules/calendar/calendar_ical/theme.inc
@@ -1,16 +1,15 @@
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);
diff --git a/modules/calendar/calendar_multiday/calendar_multiday.info b/modules/calendar/calendar_multiday/calendar_multiday.info
index 5c313f5..41d1008 100644
--- a/modules/calendar/calendar_multiday/calendar_multiday.info
+++ b/modules/calendar/calendar_multiday/calendar_multiday.info
@@ -1,4 +1,3 @@
-; $Id: calendar_multiday.info,v 1.1.2.2 2011/01/03 12:28:47 karens Exp $
name = Calendar Multiday
description = "Use the calendar multiday display as an alternative to the standard display. (BETA version)"
dependencies[] = calendar
@@ -12,4 +11,3 @@ version = "6.x-2.4"
core = "6.x"
project = "calendar"
datestamp = "1294072550"
-
diff --git a/modules/calendar/calendar_multiday/calendar_multiday.module b/modules/calendar/calendar_multiday/calendar_multiday.module
index 70f0ec5..d62fb85 100644
--- a/modules/calendar/calendar_multiday/calendar_multiday.module
+++ b/modules/calendar/calendar_multiday/calendar_multiday.module
@@ -1,6 +1,4 @@
$base + array(
'template' => 'calendar-month-col',
'arguments' => array('item' => NULL),
- ),
+ ),
'calendar_month_row' => $base + array(
'template' => 'calendar-month-row',
'arguments' => array('inner' => NULL, 'class' => NULL, 'iehint' => NULL),
- ),
+ ),
);
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/calendar_multiday/calendar_overlap.js b/modules/calendar/calendar_multiday/calendar_overlap.js
index befe2c4..b61eccb 100644
--- a/modules/calendar/calendar_multiday/calendar_overlap.js
+++ b/modules/calendar/calendar_multiday/calendar_overlap.js
@@ -1,4 +1,3 @@
-// $Id: calendar_overlap.js,v 1.1.2.1 2010/11/28 23:31:28 karens Exp $
/*
* Create the splitter, set the viewport size, and set the position of the scrollbar to the first item.
*/
@@ -8,16 +7,16 @@ Drupal.behaviors.calendarSetScroll = function (context) {
$('.header-body-divider:not(.header-body-divider-processed)').each(function() {
var divider = $(this).addClass('header-body-divider-processed');
var start_y = divider.offset().top;
-
- // Add the grippie icon
+
+ // Add the grippie icon
$(this).prepend('').mousedown(startDrag);
-
+
function startDrag(e) {
start_y = divider.offset().top;
$(document).mousemove(performDrag).mouseup(endDrag);
return false;
}
-
+
function performDrag(e) {
var offset = e.pageY - start_y;
var mwc = $('#multi-day-container');
@@ -25,25 +24,25 @@ Drupal.behaviors.calendarSetScroll = function (context) {
start_y = divider.offset().top;
return false;
}
-
+
function endDrag(e) {
$(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
}
});
-
+
$('.single-day-footer:not(.single-day-footer-processed)').each(function() {
var divider = $(this).addClass('single-day-footer-processed');
var start_y = divider.offset().top;
-
- // Add the grippie icon
+
+ // Add the grippie icon
$(this).prepend('').mousedown(startDrag);
-
+
function startDrag(e) {
start_y = divider.offset().top;
$(document).mousemove(performDrag).mouseup(endDrag);
return false;
}
-
+
function performDrag(e) {
var offset = e.pageY - start_y;
var sdc = $('#single-day-container');
@@ -51,12 +50,12 @@ Drupal.behaviors.calendarSetScroll = function (context) {
start_y = divider.offset().top;
return false;
}
-
+
function endDrag(e) {
$(document).unbind("mousemove", performDrag).unbind("mouseup", endDrag);
}
});
-
+
// Size the window
calendar_resizeViewport();
}
@@ -69,14 +68,13 @@ function calendar_scrollToFirst() {
}
}
-// Size the single day view
+// Size the single day view
function calendar_resizeViewport() {
// Size of the browser window
var viewportHeight = window.innerHeight ? window.innerHeight : $(window).height();
var top = $('#single-day-container').offset().top;
-
+
$('#multi-day-container').height(75);
// Give it a 20 pixel margin at the bottom
$('#single-day-container').height(Math.max(400,viewportHeight - top - 20));
}
-
\ No newline at end of file
diff --git a/modules/calendar/calendar_multiday/includes/calendar.inc b/modules/calendar/calendar_multiday/includes/calendar.inc
index 85c5eb7..1b0806c 100644
--- a/modules/calendar/calendar_multiday/includes/calendar.inc
+++ b/modules/calendar/calendar_multiday/includes/calendar.inc
@@ -1,5 +1,4 @@
date_info->min_date);
-
+
switch ($view->date_info->granularity) {
case 'year':
$rows = array();
@@ -49,7 +48,7 @@ function calendar_build_calendar($view, $items) {
break;
}
return $rows;
-
+
}
/**
* Build one month.
@@ -85,20 +84,20 @@ function calendar_build_month(&$curday, $view, $items) {
$week_rows = calendar_build_week($curday, $view, $items, TRUE);
$multiday_buckets = $week_rows['multiday_buckets'];
$singleday_buckets = $week_rows['singleday_buckets'];
-
+
$total_rows = $week_rows['total_rows'];
-
+
// Theme each row
$output = "";
$final_day = clone($curday);
-
+
$iehint = 0;
$max_multirow_cnt = 0;
$max_singlerow_cnt = 0;
-
+
for ($i = 0; $i < $total_rows + 1; $i++) {
$inner = "";
-
+
// If we're displaying the week number, add it as the
// first cell in the week.
if ($i == 0 && !empty($view->date_info->style_with_weekno) && !in_array($view->date_info->granularity, array('day', 'week'))) {
@@ -114,25 +113,25 @@ function calendar_build_month(&$curday, $view, $items) {
'entry' => $weekno,
'colspan' => 1,
'rowspan' => $total_rows + 1,
- 'id' => $view->name . '-weekno-' . $curday_date,
+ 'id' => $view->name . '-weekno-' . $curday_date,
'class' => 'week'
);
$inner .= theme('calendar_month_col', $item);
}
-
+
$curday = clone($init_day);
-
+
// move backwards to the first day of the week
$day_wday = date_format($curday, 'w');
date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
-
+
for ( $wday = 0; $wday < 7; $wday++) {
-
+
$curday_date = date_format($curday, DATE_FORMAT_DATE);
$class = strtolower($weekdays[$wday]);
$item = NULL;
$in_month = !($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month);
-
+
// Add the datebox
if ($i == 0) {
$count = $in_month ? intval(count($multiday_buckets[$wday]) + count($singleday_buckets[$wday])) : FALSE;
@@ -151,40 +150,40 @@ function calendar_build_month(&$curday, $view, $items) {
else {
$index = $i - 1;
$multi_count = count($multiday_buckets[$wday]);
-
+
// Process multiday buckets first. If there is a multiday-bucket item in this row...
if ($index < $multi_count) {
-
+
// If this item is filled with either a blank or an entry...
if ($multiday_buckets[$wday][$index]['filled']) {
-
+
// Add item and add class
$item = $multiday_buckets[$wday][$index];
$item['class'] = 'multi-day';
$item['date'] = $curday_date;
-
+
// Is this an entry?
if (!$multiday_buckets[$wday][$index]['avail']) {
-
+
// If the item either starts or ends on today,
// then add tags so we can style the borders
if ($curday_date == $today && $in_month) {
$item['class'] .= ' starts-today';
}
-
+
// Calculate on which day of this week this item ends on..
$end_day = clone($curday);
$span = $item['colspan'] - 1;
date_modify($end_day, '+' . $span .' day');
$endday_date = date_format($end_day, DATE_FORMAT_DATE);
-
+
// If it ends today, add class
if ($endday_date == $today && $in_month) {
$item['class'] .= ' ends-today';
}
}
}
-
+
// If this is an acutal entry, add classes regarding the state of the
// item
if ($multiday_buckets[$wday][$index]['avail']) {
@@ -192,11 +191,11 @@ function calendar_build_month(&$curday, $view, $items) {
($curday_date < $today ? ' past' : '') .
($curday_date > $today ? ' future' : '');
}
-
+
// Else, process the single day bucket - we only do this once per day
}
elseif ($index == $multi_count) {
-
+
$single_day_cnt = 0;
// If it's empty, add class
if (count($singleday_buckets[$wday]) == 0) {
@@ -218,9 +217,9 @@ function calendar_build_month(&$curday, $view, $items) {
}
$class = 'single-day';
}
-
+
$rowspan = $total_rows - $index;
-
+
// Add item...
$item = array(
'entry' => $single_days,
@@ -230,7 +229,7 @@ function calendar_build_month(&$curday, $view, $items) {
'date' => $curday_date,
'id' => $view->name . '-' . $curday_date . '-' . $index
);
-
+
// Hack for ie to help it properly space single day rows
if ($rowspan > 1 && $in_month && $single_day_cnt > 0) {
$max_multirow_cnt = max($max_multirow_cnt, $single_day_cnt);
@@ -238,7 +237,7 @@ function calendar_build_month(&$curday, $view, $items) {
else {
$max_singlerow_cnt = max($max_singlerow_cnt, $single_day_cnt);
}
-
+
// If the singlerow is bigger than the multi-row, then null out
// ieheight - I'm estimating that a single row is twice the size of
// multi-row. This is really the best that can be done with ie
@@ -248,14 +247,14 @@ function calendar_build_month(&$curday, $view, $items) {
elseif ($rowspan > 1 && $in_month && $single_day_cnt > 0) {
$iehint = max($iehint, $rowspan - 1); // How many rows to adjust for?
}
-
+
// Set the class
$item['class'] .= ($curday_date == $today && $in_month ? ' today' : '') .
($curday_date < $today ? ' past' : '') .
($curday_date > $today ? ' future' : '');
}
}
-
+
// If there isn't an item, then add empty class
if ($item != NULL) {
if (!$in_month) {
@@ -264,10 +263,10 @@ function calendar_build_month(&$curday, $view, $items) {
// Style this entry - it will be a .
$inner .= theme('calendar_month_col', $item);
}
-
+
date_modify($curday, '+1 day');
}
-
+
if ($i == 0) {
$output .= theme('calendar_month_row', $inner, 'date-box', $iehint);
}
@@ -283,14 +282,14 @@ function calendar_build_month(&$curday, $view, $items) {
}
}
$curday = $final_day;
-
+
// Add the row into the row array....
$rows[] = array('data' => $output);
-
+
$curday_date = date_format($curday, DATE_FORMAT_DATE);
$curday_month = date_format($curday, 'n');
} while ($curday_month == $month && $curday_date <= $view->date_info->max_date_date);
-
+
// Merge the day names in as the first row.
$rows = array_merge(array(calendar_week_header($view)), $rows);
return $rows;
@@ -309,7 +308,7 @@ function calendar_build_mini_week(&$curday, $view, $items, $check_month = FALSE)
$day_wday = date_format($curday, 'w');
date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
$curday_date = date_format($curday, DATE_FORMAT_DATE);
-
+
// If we're displaying the week number, add it as the
// first cell in the week.
if (!empty($view->date_info->style_with_weekno) && !in_array($view->date_info->granularity, array('day', 'week'))) {
@@ -323,7 +322,7 @@ function calendar_build_mini_week(&$curday, $view, $items, $check_month = FALSE)
}
$rows[$week][] = array(
'data' => $weekno,
- 'id' => $view->name . '-weekno-' . $curday_date,
+ 'id' => $view->name . '-weekno-' . $curday_date,
'class' => 'week');
}
for ($i = 0; $i < 7; $i++) {
@@ -347,7 +346,7 @@ function calendar_build_mini_week(&$curday, $view, $items, $check_month = FALSE)
($curday_date > $today ? ' future' : '') .
(empty($items[$curday_date]) ? ' has-no-events' : ' has-events');
}
-
+
$rows[$week][] = array(
'data' => $content,
'class' => $class, 'id' => $view->name . '-' . $curday_date);
@@ -363,17 +362,17 @@ function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
$weekdays = calendar_untranslated_days($items, $view);
$month = date_format($curday, 'n');
$first_day = variable_get('date_first_day', 0);
-
+
// Set up buckets
$total_rows = 0;
$multiday_buckets = array( array(), array(), array(), array(), array(), array(), array());
$singleday_buckets = array( array(), array(), array(), array(), array(), array(), array());
-
+
// move backwards to the first day of the week
$day_wday = date_format($curday, 'w');
date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
$curday_date = date_format($curday, DATE_FORMAT_DATE);
-
+
for ($i = 0; $i < 7; $i++) {
if ($check_month && ($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month)) {
$class = strtolower($weekdays[$i]) .' empty';
@@ -389,7 +388,7 @@ function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
date_modify($curday, '+1 day');
$curday_date = date_format($curday, DATE_FORMAT_DATE);
}
-
+
$rows = array(
'multiday_buckets' => $multiday_buckets,
'singleday_buckets' => $singleday_buckets,
@@ -407,7 +406,7 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
$cur_cnt = 0;
$total_cnt = 0;
$types = array();
-
+
// If we are hiding, count before processing further
if ($max_events != CALENDAR_SHOW_ALL) {
foreach ($items as $date => $day) {
@@ -421,7 +420,7 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
}
}
}
-
+
// If we haven't already exceeded the max or we'll showing all, then process the items
if ($max_events == CALENDAR_SHOW_ALL || !$hide || $total_cnt <= $max_events) {
// Count currently filled items
@@ -430,7 +429,7 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
$cur_cnt++;
}
}
-
+
foreach ($items as $date => $day) {
if ($date == $curday_date) {
$count = 0;
@@ -438,38 +437,38 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
foreach ($day as $time => $hour) {
foreach ($hour as $key => $item) {
$count++;
-
+
// Can we add an item?
if ($max_events == CALENDAR_SHOW_ALL || $cur_cnt <= $max_events) {
$all_day = $item->calendar_start_date == $item->calendar_end_date;
$theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
-
+
// Parse out date part
$start_ydate = date_format($item->date_start, DATE_FORMAT_DATE);
$end_ydate = date_format($item->date_end, DATE_FORMAT_DATE);
$cur_ydate = date_format($curday, DATE_FORMAT_DATE);
-
+
$is_multi_day = ($start_ydate < $cur_ydate || $end_ydate > $cur_ydate);
-
+
// Does this event span multi-days?
if ($multiday_theme && ($is_multi_day || $all_day)) {
-
+
// If this the first day of the week, or is the start date of the multi-day event,
// then record this item, otherwise skip over
$day_no = date_format($curday, 'd');
if ($wday == 0 || $start_ydate == $cur_ydate || ($view->date_info->granularity == 'month' && $day_no == 1) || ($all_day && !$is_multi_day)) {
$cur_cnt++;
-
+
// Calculate the colspan for this event
-
+
// If the last day of this event exceeds the end of the current month or week,
// truncate the remaining days
$diff = date_difference($view->date_info->max_date, $curday, 'days');
- $remaining_days = ($view->date_info->granularity == 'month') ? min(6 - $wday, $diff) : $diff - 1;
+ $remaining_days = ($view->date_info->granularity == 'month') ? min(6 - $wday, $diff) : $diff - 1;
// The bucket_cnt defines the colspan. colspan = bucket_cnt + 1
$days = date_difference($curday, $item->date_end, 'days');
$bucket_cnt = max(0, min($days, $remaining_days));
-
+
// See if there is an avaiable slot to add an event. This will allow
// an event to precede a row filled up by a previous day event
$avail = FALSE;
@@ -480,11 +479,11 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
break;
}
}
-
+
// Add continuation attributes
$item->continuation = ($item->date_start < $curday);
$item->continues = ( $days > $bucket_cnt );
-
+
// Assign the item to the available bucket
$multiday_buckets[$wday][$bucket_index] = array(
'colspan' => $bucket_cnt + 1,
@@ -496,13 +495,13 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
'wday' => $wday,
'entry' => theme($theme, $item, $view)
);
-
+
// Block out empty buckets for the next days in this event for this week
for ($i = 0; $i < $bucket_cnt; $i++) {
$bucket = &$multiday_buckets[$i + $wday + 1];
$bucket_row_count = count($bucket);
$row_diff = $bucket_index - $bucket_row_count;
-
+
// Fill up the preceding buckets - these are available for future
// events
for ( $j = 0; $j < $row_diff; $j++) {
@@ -545,7 +544,7 @@ function calendar_build_week_day($curday, $view, $items, $wday, &$multiday_bucke
}
}
}
-
+
// Add a more link if necessary
if ($max_events != CALENDAR_SHOW_ALL && $total_cnt > 0 && $cur_cnt < $total_cnt) {
$singleday_buckets[$wday][][] = array(
@@ -606,7 +605,7 @@ function calendar_build_day($curday, $view, $items) {
}
$link = theme('calendar_'. $view->date_info->calendar_type .'_multiple_node', $curday_date, $count, $view, $types);
}
-
+
$content = array(
'date' => $curday_date,
'datebox' => theme('calendar_datebox', $curday_date, $view, $items, $selected),
diff --git a/modules/calendar/calendar_multiday/theme/calendar-datebox.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-datebox.tpl.php
index cad4840..6a4347d 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-datebox.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-datebox.tpl.php
@@ -1,7 +1,6 @@
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-day-node.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-day-node.tpl.php
index 9fba39c..a010c17 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-day-node.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-day-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,20 +20,20 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_day_node.
*/
$node_class = (isset($node->class)) ? ' ' . $node->class : '';
@@ -48,11 +47,11 @@ $node_class = (isset($node->class)) ? ' ' . $node->class : '';
+
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-day-overlap.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-day-overlap.tpl.php
index 62965c9..dbc7d0c 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-day-overlap.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-day-overlap.tpl.php
@@ -1,9 +1,8 @@
+ *
+ * The width of the columns is dynamically set using
* based on the number of columns presented. The values passed in will
- * work to set the 'hour' column to 10% and split the remaining columns
+ * work to set the 'hour' column to 10% and split the remaining columns
* evenly over the remaining 90% of the table.
*/
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
@@ -48,7 +47,7 @@
-
+
|
@@ -60,8 +59,8 @@
try {
// Hide container while it renders... Degrade w/o javascript support
$('#single-day-container').css('visibility','hidden');
- }catch(e){
- // swallow
+ }catch(e){
+ // swallow
}
@@ -74,7 +73,7 @@
$hour): ?>
-
-
+
|
$hour): ?>
-
-
+
|
@@ -129,7 +128,7 @@ try {
calendar_resizeViewport();
calendar_scrollToFirst();
$('#single-day-container').css('visibility','visible');
-}catch(e){
- // swallow
+}catch(e){
+ // swallow
}
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-day.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-day.tpl.php
index 25d0df9..f180436 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-day.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-day.tpl.php
@@ -1,10 +1,9 @@
+ *
+ * The width of the columns is dynamically set using
* based on the number of columns presented. The values passed in will
- * work to set the 'hour' column to 10% and split the remaining columns
+ * work to set the 'hour' column to 10% and split the remaining columns
* evenly over the remaining 90% of the table.
*/
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
@@ -57,7 +56,7 @@
-
+
@@ -73,9 +72,9 @@
-
+
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-main.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-main.tpl.php
index 1382da4..b2d2a35 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-main.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-main.tpl.php
@@ -1,9 +1,8 @@
@@ -23,4 +22,4 @@
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-mini.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-mini.tpl.php
index 3a4ab5f..6ca6f53 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-mini.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-mini.tpl.php
@@ -1,9 +1,8 @@
date_info->show_title): ?>
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-month-col.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-month-col.tpl.php
index 5124e09..22b4470 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-month-col.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-month-col.tpl.php
@@ -1,9 +1,8 @@
@@ -17,12 +16,12 @@
date_info->style_max_items_behavior != 'more'): ?>
-
+
$count)), $link) ?>
-
+
»
-
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-month-node.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-month-node.tpl.php
index 18a381f..10c8b7b 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-month-node.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-month-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,20 +20,20 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_month_node.
*/
$index = 0;
@@ -50,15 +49,15 @@ $index = 0;
+
-
+
continues) && $node->continues) : ?>
»
-
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-month-row.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-month-row.tpl.php
index e52e1b2..165c6f5 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-month-row.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-month-row.tpl.php
@@ -1,9 +1,8 @@
@@ -32,7 +31,7 @@
-
@@ -47,11 +46,11 @@ try {
$('tr[iehint]').each(function(index) {
var iehint = this.getAttribute('iehint');
// Add height of the multi day rows to the single day row - seems that 80% height works best
- var height = this.clientHeight + (multiday_height * .8 * iehint);
+ var height = this.clientHeight + (multiday_height * .8 * iehint);
this.style.height = height + 'px';
});
}
}catch(e){
- // swallow
+ // swallow
}
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-week-multiple-node.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-week-multiple-node.tpl.php
index e1f78bf..71e28cd 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-week-multiple-node.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-week-multiple-node.tpl.php
@@ -1,11 +1,10 @@
@@ -16,12 +15,12 @@
date_info->style_max_items_behavior != 'more'): ?>
-
+
$count)), $link) ?>
-
+
»
-
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-week-node.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-week-node.tpl.php
index b8923bb..3ab3a60 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-week-node.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-week-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,22 +20,22 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_week_node.
- */
+ */
$index = 0;
?>
@@ -50,9 +49,9 @@ $index = 0;
+
continues) && $node->continues) : ?>
@@ -60,5 +59,5 @@ $index = 0;
-
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-week-overlap.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-week-overlap.tpl.php
index 153cea2..d9711e5 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-week-overlap.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-week-overlap.tpl.php
@@ -1,14 +1,13 @@
| | | | | | | |
-
-
+
|
@@ -103,7 +102,7 @@
|
-
+
@@ -112,8 +111,8 @@
try {
// Hide container while it renders... Degrade w/o javascript support
$('#single-day-container').css('visibility','hidden');
- }catch(e){
- // swallow
+ }catch(e){
+ // swallow
}
@@ -129,7 +128,7 @@
$start_time): ?>
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-week.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-week.tpl.php
index f5289c5..3486298 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-week.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-week.tpl.php
@@ -1,14 +1,13 @@
|
-
-
+
|
-
+
@@ -96,7 +95,7 @@ $index = 0;
|
-
+
@@ -109,16 +108,16 @@ $index = 0;
|
-
+
|
-
+
-
+
diff --git a/modules/calendar/calendar_multiday/theme/calendar-year.tpl.php b/modules/calendar/calendar_multiday/theme/calendar-year.tpl.php
index 2e62bea..8373c6e 100644
--- a/modules/calendar/calendar_multiday/theme/calendar-year.tpl.php
+++ b/modules/calendar/calendar_multiday/theme/calendar-year.tpl.php
@@ -1,16 +1,15 @@
@@ -18,10 +17,10 @@
class="mini">
- | | |
- | | |
- | | |
- | | |
+ | | |
+ | | |
+ | | |
+ | | |
-
\ No newline at end of file
+
diff --git a/modules/calendar/calendar_multiday/theme/theme.inc b/modules/calendar/calendar_multiday/theme/theme.inc
index 16db441..a5df23d 100644
--- a/modules/calendar/calendar_multiday/theme/theme.inc
+++ b/modules/calendar/calendar_multiday/theme/theme.inc
@@ -1,12 +1,11 @@
result;
$options = $view->style_plugin->options;
$handler = $view->style_plugin;
@@ -15,12 +14,12 @@ function template_preprocess_calendar_main(&$vars) {
$vars['min_date_formatted'] = date_format($view->date_info->min_date, DATE_FORMAT_DATETIME);
$vars['max_date_formatted'] = date_format($view->date_info->max_date, DATE_FORMAT_DATETIME);
$view->date_info->mini = isset($view->date_info->mini) ? $view->date_info->mini : $view->date_info->granularity == 'year';
-
+
$url = $view->get_url();
$view->date_info->url = $url;
$arg = $view->date_info->date_arg;
$displays = $view->date_info->display_types;
-
+
// Set up the links to other calendar views.
$current_date = $view->date_info->min_date;
if (!empty($date->info->day)) {
@@ -28,7 +27,7 @@ function template_preprocess_calendar_main(&$vars) {
}
elseif (!empty($view->date_info->week)) {
$week = date_week_range($view->date_info->week, $view->date_info->year);
- $current_date = $week[0];
+ $current_date = $week[0];
}
elseif (!empty($view->date_info->month)) {
$current_date = date_make_date($view->date_info->year .'-'. date_pad($view->date_info->month) .'-01 00:00:00');
@@ -68,60 +67,60 @@ function template_preprocess_calendar_main(&$vars) {
$calendar_links[] = $base + array('title' => date_t('Day', 'datetime'), 'href' => date_real_url($view, 'day'));
}
$vars['calendar_links'] = $calendar_links;
-
+
// If the Date Popup module is enabled, add a popup date selector.
if (!empty($view->date_info->calendar_popup)) {
$vars['calendar_popup'] = ''. calendar_date_select($view) .'
';
}
-
+
// If an 'Add new ... link is provided, add it here.
// the query will bring the user back here after adding the node.
if (!empty($view->date_info->calendar_date_link) && user_access('create '. $view->date_info->calendar_date_link .' content')) {
$name = node_get_types('name', $view->date_info->calendar_date_link);
$href = 'node/add/'. str_replace('_', '-', $view->date_info->calendar_date_link);
- $query = 'destination='. $view->date_info->url;
+ $query = 'destination='. $view->date_info->url;
$vars['calendar_links'][] = $base + array(
- 'title' => t('Add+'),
- 'href' => $href,
+ 'title' => t('Add+'),
+ 'href' => $href,
'query' => $query,
);
}
-
- $vars['view'] = $view;
+
+ $vars['view'] = $view;
$vars['mini'] = !empty($view->date_info->mini);
$vars['block'] = !empty($view->date_info->block);
$vars['block_identifier'] = date_block_identifier($view);
-
+
}
/**
* Display a view as a calendar.
- *
+ *
* This preprocessor does all the work needed for all types of calendar
* views and the template takes care of displaying links to related views.
*/
function template_preprocess_calendar(&$vars) {
require_once('./'. drupal_get_path('module', 'calendar_multiday') .'/includes/calendar.inc');
$view = $vars['view'];
-
+
// Make sure we only run through this function one time.
if (!empty($view->date_info->calendar_processed)) {
return;
}
-
+
$result = (array) $view->result;
$options = $view->style_plugin->options;
$handler = $view->style_plugin;
$fields = $view->field;
-
+
// Render each field into an output array. We have to do the rendering
- // here because we don't apppear to have full access to the view
+ // here because we don't apppear to have full access to the view
// handlers in the theme functions.
$items = array();
$calendar_fields = date_api_fields($view->base_table);
$calendar_fields = array_keys($calendar_fields['alias']);
-
+
foreach ($result as $num => $row) {
$copy = drupal_clone($row);
$items[$num] = $row;
@@ -135,7 +134,7 @@ function template_preprocess_calendar(&$vars) {
}
foreach ($fields 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;
if (!empty($field) && is_object($field)) {
// Theme the copy instead of the original row so duplicate date
// fields each get a fresh copy of the original data to theme.
@@ -144,20 +143,20 @@ function template_preprocess_calendar(&$vars) {
}
foreach ($fields 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;
if (!empty($field->options['exclude'])) {
if (isset($items[$num]->{$field_alias})) unset($items[$num]->{$field_alias});
}
}
}
-
+
$vars['display_type'] = $view->date_info->granularity;
$vars['min_date_formatted'] = date_format($view->date_info->min_date, DATE_FORMAT_DATETIME);
$vars['max_date_formatted'] = date_format($view->date_info->max_date, DATE_FORMAT_DATETIME);
-
+
// Massage the resulting items into formatted calendar items.
$items = calendar_build_nodes($view, $items);
-
+
// Merge in items from other sources.
foreach (module_implements('calendar_add_items') as $module) {
$function = $module .'_calendar_add_items';
@@ -171,14 +170,14 @@ function template_preprocess_calendar(&$vars) {
}
$view->date_info->mini = isset($view->date_info->mini) ? $view->date_info->mini : $view->date_info->granularity == 'year';
-
+
// Create the calendar day names and rows.
$rows = calendar_build_calendar($view, $items);
-
+
$vars['items'] = $items;
$vars['rows'] = $rows;
$view->date_info->calendar_processed = TRUE;
- $vars['view'] = $view;
+ $vars['view'] = $view;
$vars['mini'] = !empty($view->date_info->mini);
$vars['block'] = !empty($view->date_info->block);
}
@@ -190,9 +189,9 @@ function template_preprocess_calendar_month(&$vars) {
// Add in all the $vars added by the main calendar preprocessor.
template_preprocess_calendar($vars);
$view = $vars['view'];
-
+
$rows = $vars['rows'];
-
+
if (sizeof($rows) > 1) {
$day_names = array_shift($rows);
}
@@ -200,7 +199,7 @@ function template_preprocess_calendar_month(&$vars) {
$day_names = $rows;
$rows = array();
}
-
+
$month_rows = $rows;
foreach ($rows as $weekno => $row) {
// If this row is already rendered, don't do anything.
@@ -234,10 +233,10 @@ function template_preprocess_calendar_month(&$vars) {
}
}
}
-
+
$vars['rows'] = $month_rows;
$vars['day_names'] = $day_names;
-
+
$vars['display_type'] = $view->date_info->granularity;
$vars['min_date_formatted'] = date_format($view->date_info->min_date, DATE_FORMAT_DATETIME);
$vars['max_date_formatted'] = date_format($view->date_info->max_date, DATE_FORMAT_DATETIME);
@@ -249,7 +248,7 @@ function template_preprocess_calendar_month(&$vars) {
function template_preprocess_calendar_mini(&$vars) {
// Add in all the $vars added by the main calendar preprocessor.
template_preprocess_calendar_month($vars);
-
+
$view = $vars['view'];
$view->date_info->show_title = !empty($view->date_info->show_title) ? $view->date_info->show_title : FALSE;
$vars['show_title'] = $view->date_info->show_title;
@@ -263,15 +262,15 @@ function template_preprocess_calendar_year(&$vars) {
// Add in all the $vars added by the main calendar preprocessor.
$vars['view']->date_info->style_with_weekno = FALSE;
template_preprocess_calendar($vars);
-
+
// Get the url of the year view and remove the year argument from it.
// TODO clean this up in case there is another arg that looks like
// the year to make sure only the year gets removed.
$view = $vars['view'];
$year = date_format($view->date_info->min_date, 'Y');
-
- // Construct a calendar for each month, adjusting the $view passed
- // to the theme so it will produce the right results.
+
+ // Construct a calendar for each month, adjusting the $view passed
+ // to the theme so it will produce the right results.
$view = drupal_clone($vars['view']);
$rows = $vars['rows'];
$months = array();
@@ -291,7 +290,7 @@ function template_preprocess_calendar_year(&$vars) {
$vars['months'] = $months;
$vars['view']->date_info->hide_nav = FALSE;
$vars['view']->date_info->granularity = 'year';
-
+
}
/**
@@ -305,27 +304,27 @@ function template_preprocess_calendar_day_overlap(&$vars) {
* Display a day view.
*/
function template_preprocess_calendar_day(&$vars) {
-
+
// Add in all the $vars added by the main calendar preprocessor.
$vars['view']->style_with_weekno = FALSE;
template_preprocess_calendar($vars);
-
+
$view = $vars['view'];
$rows = $vars['rows'];
-
+
$item_count = 0;
$by_hour_count = 0;
$grouping_field = $view->date_info->style_groupby_field;
-
+
$display_overlap = $view->date_info->style_theme_style == '1';
-
+
// Add optional css
if ($display_overlap) {
drupal_add_css(drupal_get_path('module', 'calendar_multiday') .'/calendar-overlap.css');
drupal_add_js(drupal_get_path('module', 'calendar_multiday') . '/calendar_overlap.js');
$overlapped_items = array();
}
-
+
// If we're not grouping by time, move all items into the 'all day' array.
if (empty($view->date_info->style_groupby_times)) {
// Items are already grouped into times, so we need to process each time-group.
@@ -336,14 +335,14 @@ function template_preprocess_calendar_day(&$vars) {
}
$rows['items'] = array();
}
-
+
$columns = array();
-
+
// Move all_day items into the right columns and render them.
$grouped_items = array();
foreach ($rows['all_day'] as $item) {
if (isset($item->{$grouping_field})) {
- $column = $item->{$grouping_field};
+ $column = $item->{$grouping_field};
$item->{$grouping_field} = ''; // Remove the grouping field from the results.
if (!in_array($column, $columns)) {
$columns[] = $column;
@@ -357,14 +356,14 @@ function template_preprocess_calendar_day(&$vars) {
$item_count++;
}
$vars['rows']['all_day'] = $grouped_items;
-
+
// Moved timed items into the right columns and render them.
$start_times = $view->date_info->style_groupby_times;
- $show_empty_times = $view->date_info->style_show_empty_times;
+ $show_empty_times = $view->date_info->style_show_empty_times;
$end_start_time = '23:59:59';
$start_time = array_shift($start_times);
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
-
+
$grouped_items = array();
foreach ($rows['items'] as &$items) {
foreach ($items as &$item) {
@@ -383,7 +382,7 @@ function template_preprocess_calendar_day(&$vars) {
// slots if the option to show empty times was chosen.
while ($time >= $next_start_time && $time < $end_start_time) {
if ((!empty($show_empty_times) || $display_overlap) && !array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'] = array();
+ $grouped_items[$start_time]['values'] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -392,14 +391,14 @@ function template_preprocess_calendar_day(&$vars) {
if ($display_overlap) {
$time_end = date_format($item->date_end, 'H:i:s');
$item->time_start = $time;
- $item->time_end = $time_end;
+ $item->time_end = $time_end;
_calc_indents($overlapped_items, $time, $time_end, $item);
}
$item_count++;
$by_hour_count++;
}
}
-
+
// Finish out the day's time values if we want to see empty times.
if (!empty($show_empty_times) || $display_overlap) {
while ($start_time < $end_start_time && ($start_time != NULL || $display_overlap)) {
@@ -409,13 +408,13 @@ function template_preprocess_calendar_day(&$vars) {
$next_start_time = array_shift($start_times);
}
if (!array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'] = array();
+ $grouped_items[$start_time]['values'] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
}
}
-
+
// Do the headers last, once we know what the actual values are.
$i = 0;
$start_times = array_keys($grouped_items);
@@ -423,38 +422,38 @@ function template_preprocess_calendar_day(&$vars) {
$next_start_time = array_key_exists($i + 1, $start_times) ? $start_times[$i + 1] : '23:59:59';
$heading = theme('calendar_time_row_heading', $start_time, $next_start_time, $rows['date']);
$grouped_items[$start_time]['hour'] = $heading['hour'];
- $grouped_items[$start_time]['ampm'] = $heading['ampm'];
+ $grouped_items[$start_time]['ampm'] = $heading['ampm'];
foreach ($grouped_items[$start_time]['values'] as $column => &$items) {
foreach ($items as $index => &$item) {
if ($display_overlap) {
$offset = round(date_format($item->date_start, 'i') / 15);
- $duration = date_convert('1970-01-01 ' . $item->time_end, DATE_DATETIME, DATE_UNIX) -
+ $duration = date_convert('1970-01-01 ' . $item->time_end, DATE_DATETIME, DATE_UNIX) -
date_convert('1970-01-01 ' . $item->time_start, DATE_DATETIME, DATE_UNIX);
$duration = round($duration / (15 * 60));
$item->class = 'd_'. $duration . ' o_'. $offset . ' i_' . $item->indent . ' md_' . min($item->max_depth, 5);
}
$theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
$grouped_items[$start_time]['values'][$column][$index] = theme($theme, $item, $view);
- }
+ }
}
- $i++;
+ $i++;
}
ksort($grouped_items);
$vars['rows']['items'] = $grouped_items;
-
+
if (empty($columns)) {
$columns = array(t('Items'));
}
$vars['columns'] = $columns;
-
+
$vars['agenda_hour_class'] = 'calendar-agenda-hour';
$first_column_width = 10;
-
+
if (empty($view->date_info->style_groupby_times)) {
$vars['agenda_hour_class'] .= ' calendar-agenda-no-hours';
$first_column_width = 1;
}
-
+
$vars['first_column_width'] = $first_column_width;
if (count($columns)) {
$vars['column_width'] = round((100 - $first_column_width)/count($columns));
@@ -482,13 +481,13 @@ function template_preprocess_calendar_week(&$vars) {
// Add in all the $vars added by the main calendar preprocessor.
$vars['view']->style_with_weekno = FALSE;
template_preprocess_calendar($vars);
-
+
$view = $vars['view'];
$rows = $vars['rows'];
$item_count = 0;
$by_hour_count = 0;
$start_time = NULL;
-
+
if (sizeof($rows) > 1) {
$day_names = array_shift($rows);
}
@@ -496,27 +495,27 @@ function template_preprocess_calendar_week(&$vars) {
$day_names = $rows;
$rows = array();
}
-
+
// Moved timed items into the right columns and render them.
- $show_empty_times = $view->date_info->style_show_empty_times;
+ $show_empty_times = $view->date_info->style_show_empty_times;
$end_start_time = '23:59:59';
-
+
$grouped_items = array();
-
+
// pass the multiday buckets
$vars['all_day'] = $rows['multiday_buckets'];
// Remove the count for singleday
- $vars['multiday_rows'] = max(0, $rows['total_rows'] - 1);
+ $vars['multiday_rows'] = max(0, $rows['total_rows'] - 1);
$display_overlap = ($view->date_info->style_multiday_theme == '1' && $view->date_info->style_theme_style == '1');
$vars['display_overlap'] = $display_overlap;
-
+
// Add optional css
if ($display_overlap) {
drupal_add_css(drupal_get_path('module', 'calendar_multiday') .'/calendar-overlap.css');
drupal_add_js(drupal_get_path('module', 'calendar_multiday') . '/calendar_overlap.js');
$overlapped_items = array( array(), array(), array(), array(), array(), array(), array());
-
+
// Locate the first item
$first_time = '23:59:59';
$first_time_index = -1;
@@ -528,13 +527,13 @@ function template_preprocess_calendar_week(&$vars) {
$first_time = $time;
$first_time_index = $i;
}
- }
+ }
}
if ($first_time_index > -1) {
$rows['singleday_buckets'][$first_time_index][$first_time][0]['is_first'] = TRUE;
}
}
-
+
// If we're not grouping by time, move all items into the 'all day' array.
if (empty($view->date_info->style_groupby_times)) {
$add_row = FALSE;
@@ -547,9 +546,9 @@ function template_preprocess_calendar_week(&$vars) {
}
}
if ( $add_row ) {
- $vars['multiday_rows']++;
+ $vars['multiday_rows']++;
}
- }
+ }
else {
foreach ($rows['singleday_buckets'] as $wday => $singleday_row) {
$columns[] = $wday;
@@ -564,23 +563,23 @@ function template_preprocess_calendar_week(&$vars) {
if ($vars['multiday_rows'] == 0) {
$vars['multiday_rows']++;
}
- }
+ }
else {
// Find the next time slot and fill it. Populate the skipped
// slots if the option to show empty times was chosen.
while ($time >= $next_start_time && $time < $end_start_time) {
if (($show_empty_times || $display_overlap) && !array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'][$wday] = array();
+ $grouped_items[$start_time]['values'][$wday] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
}
- $grouped_items[$start_time]['values'][$wday][] = &$item;
+ $grouped_items[$start_time]['values'][$wday][] = &$item;
if ($display_overlap) {
$date_end = date_format($item['item']->date_end, 'H:i:s');
_calc_indents($overlapped_items[$wday], $time, $date_end, $item);
}
- $item_count++;
+ $item_count++;
$by_hour_count++;
}
}
@@ -594,7 +593,7 @@ function template_preprocess_calendar_week(&$vars) {
$next_start_time = array_shift($start_times);
}
if (!array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'][$wday] = array();
+ $grouped_items[$start_time]['values'][$wday] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -603,7 +602,7 @@ function template_preprocess_calendar_week(&$vars) {
ksort($grouped_items);
}
}
-
+
// Do the headers last, once we know what the actual values are.
$i = 0;
$start_times = array_keys($grouped_items);
@@ -622,21 +621,21 @@ function template_preprocess_calendar_week(&$vars) {
$duration = round($duration / (15 * 60));
$item['class'] = 'd_'. $duration . ' o_'. $offset . ' i_' . $item['indent'] . ' md_' . min($item['max_depth'], 5);
}
- }
+ }
}
}
}
- $vars['items'] = $grouped_items;
-
+ $vars['items'] = $grouped_items;
+
$vars['day_names'] = $day_names;
$vars['columns'] = $columns;
$vars['start_times'] = $view->date_info->style_groupby_times;
$vars['first_time'] = $first_time;
-
+
$vars['agenda_hour_class'] = 'calendar-agenda-hour';
$first_column_width = 10;
-
+
if (empty($view->date_info->style_groupby_times)) {
$vars['agenda_hour_class'] .= ' calendar-agenda-no-hours';
$first_column_width = 1;
@@ -652,14 +651,14 @@ function template_preprocess_calendar_week(&$vars) {
function template_preprocess_calendar_datebox(&$vars) {
$date = $vars['date'];
$view = $vars['view'];
-
+
$vars['day'] = intval(substr($date, 8, 2));
$force_view_url = !empty($view->date_info->block) ? TRUE : FALSE;
$vars['url'] = date_real_url($view, NULL, $date, $force_view_url);
$vars['link'] = l($vars['day'], $vars['url']);
$vars['granularity'] = $view->date_info->granularity;
$vars['mini'] = $view->date_info->mini;
-
+
if ($view->date_info->mini) {
if (!empty($vars['selected'])) {
$vars['class'] = 'mini-day-on';
@@ -682,11 +681,11 @@ function template_preprocess_calendar_node(&$vars) {
$fields = array();
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;
if (!empty($node->$field_alias)) {
$data = $node->$field_alias;
$label = $field->options['label'];
-
+
// CCK has some special label options.
if (!empty($field->content_field)) {
switch ($field->options['label_type']) {
@@ -710,10 +709,10 @@ function template_preprocess_calendar_node(&$vars) {
$vars['calendar_end'] = $node->calendar_end;
$vars['calendar_start_date'] = $node->calendar_start_date;
$vars['calendar_end_date'] = $node->calendar_end_date;
-
+
// We added the node type to the results in the query,
// but it will show up as $node->node_type instead of
- // $node->type. Rename it to match the normal way it
+ // $node->type. Rename it to match the normal way it
// would show up on a node object.
$vars['node']->type = $vars['node']->node_type;
}
@@ -737,7 +736,7 @@ function template_preprocess_calendar_month_multiple_node(&$vars) {
$year = $parts[0];
$month = intval($parts[1]);
$day = intval($parts[2]);
-
+
// create the link to the day
$vars['link'] = date_real_url($view, NULL, date_pad($year, 4) .'-'. date_pad($month) .'-'. date_pad($day));
}
@@ -767,13 +766,13 @@ function template_preprocess_calendar_week_node(&$vars) {
function template_preprocess_calendar_week_multiple_node(&$vars) {
$view = $vars['view'];
$curday = $vars['curday'];
-
+
// get the year month and date
$parts = explode('-', substr($curday, 0, 10));
$year = $parts[0];
$month = intval($parts[1]);
$day = intval($parts[2]);
-
+
// create the link to the day
$vars['link'] = date_real_url($view, NULL, date_pad($year, 4) .'-'. date_pad($month) .'-'. date_pad($day));
}
@@ -820,7 +819,7 @@ function theme_calendar_stripe_legend() {
array('class' => 'calendar-legend', 'data' => t('Key'))
);
$rows = array();
- $output = '';
+ $output = '';
foreach ((array) $GLOBALS['calendar_stripes'] as $label => $stripe) {
if ($stripe) {
$rows[] = array($label, '
');
@@ -858,7 +857,7 @@ function theme_calendar_stripe_stripe($node) {
* The day to display.
*/
function theme_calendar_empty_day($curday, $view) {
-
+
if ($view->date_info->calendar_type != 'day') {
return '
'."\n";
}
@@ -885,18 +884,18 @@ function theme_calendar_empty_day($curday, $view) {
* Returns an array with the max depth of the branch and whether an overlap occurred
*/
function _calc_indents(&$overlapped_items, $start, $end, &$item, $depth = 0) {
-
+
// Are there any items at this depth?
if (!empty($overlapped_items)) {
-
+
// Iterate for each item as this depth and see if we overlap
- foreach ($overlapped_items as $index => &$entry) {
+ foreach ($overlapped_items as $index => &$entry) {
// We search depth-first, so if there are children for this item, recurse into
// each child tree looking for an overlap
if (!empty($entry['children'])) {
$rc = _calc_indents($entry['children'], $start, $end, $item, $depth + 1);
-
+
// Was there an overlap in the child tree?
if ($rc['overlap']) {
if (is_object($entry['item'])) {
@@ -907,16 +906,16 @@ function _calc_indents(&$overlapped_items, $start, $end, &$item, $depth = 0) {
$entry['item']['indent'] = _calc_indent($entry['depth'], $rc['max_depth']);
$entry['item']['max_depth'] = $rc['max_depth'];
}
-
+
// There was an overlap, pop out of this depth
return $rc;
}
}
-
+
// No, child overlap, so check if we overlap this item
# if ($start >= $entry['start'] && $start <= $entry['end']) {
if ($start >= $entry['start'] && $start < $entry['end']) {
-
+
// We overlap, create an overlapping entry
$entry['children'][] = array('item' => &$item, 'depth' => $depth + 1, 'start' => $start, 'end' => $end, 'children' => array());
if (is_object($entry['item'])) {
@@ -937,19 +936,19 @@ function _calc_indents(&$overlapped_items, $start, $end, &$item, $depth = 0) {
$item['indent'] = _calc_indent($depth + 1, $max_depth);
$item['max_depth'] = $max_depth;
}
-
+
// We overlap, so pop out of this depth
return array('overlap' => TRUE, 'max_depth' => $max_depth);
}
}
-
+
// If there are items at this depth, but no overlap, then return no overlap and pop
// out of this depth
if ($depth > 0) {
return array('overlap' => FALSE, 'max_depth' => 0);
}
}
-
+
// No overlap at any depth, reset the array of overlaps
if ($depth == 0) {
reset($overlapped_items);
@@ -958,7 +957,7 @@ function _calc_indents(&$overlapped_items, $start, $end, &$item, $depth = 0) {
else {
$overlapped_items[] = array('item' => &$item, 'depth' => $depth, 'start' => $start, 'end' => $end, 'children' => array());
}
-
+
if (is_object($item)) {
$item->indent = _calc_indent($depth, $depth);
$item->max_depth = $depth;
diff --git a/modules/calendar/help/calendar.help.ini b/modules/calendar/help/calendar.help.ini
index c65d429..83148ae 100644
--- a/modules/calendar/help/calendar.help.ini
+++ b/modules/calendar/help/calendar.help.ini
@@ -1,5 +1,3 @@
-; $Id: calendar.help.ini,v 1.1.2.4 2008/10/28 11:46:19 karens Exp $
-
[advanced help settings]
name = Calendar
index name = "Calendar"
diff --git a/modules/calendar/includes/calendar.inc b/modules/calendar/includes/calendar.inc
index a7c7fa5..374c388 100644
--- a/modules/calendar/includes/calendar.inc
+++ b/modules/calendar/includes/calendar.inc
@@ -1,5 +1,4 @@
date_info->min_date);
-
+
switch ($view->date_info->granularity) {
case 'year':
$rows = array();
@@ -53,7 +52,7 @@ function calendar_build_calendar($view, $items) {
break;
}
return $rows;
-
+
}
/**
@@ -90,7 +89,7 @@ function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
$day_wday = date_format($curday, 'w');
date_modify($curday, '-' . strval((7 + $day_wday - $first_day) % 7) . ' days');
$curday_date = date_format($curday, DATE_FORMAT_DATE);
-
+
// If we're displaying the week number, add it as the
// first cell in the week.
if (!empty($view->date_info->style_with_weekno) && !in_array($view->date_info->granularity, array('day', 'week'))) {
@@ -98,27 +97,27 @@ function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
if (!empty($view->date_info->display_types['week'])) {
$weekno = l($week, $url, array('query' => !empty($view->date_info->append) ? $view->date_info->append : ''));
}
- else {
+ else {
// Do not link week numbers, if Week views are disabled.
$weekno = $week;
}
$rows[$week][] = array(
'data' => $weekno,
- 'id' => $view->name . '-weekno-' . $curday_date,
+ 'id' => $view->name . '-weekno-' . $curday_date,
'class' => 'week');
}
for ($i = 0; $i < 7; $i++) {
- $curday_date = date_format($curday, DATE_FORMAT_DATE);
+ $curday_date = date_format($curday, DATE_FORMAT_DATE);
$class = strtolower($weekdays[$i] .
($view->date_info->mini ? ' mini' : ''));
if ($check_month && ($curday_date < $view->date_info->min_date_date || $curday_date > $view->date_info->max_date_date || date_format($curday, 'n') != $month)) {
$class .= ' empty';
$content = array(
- 'date' => '',
- 'datebox' => '',
- 'empty' => theme('calendar_empty_day', $curday_date, $view),
+ 'date' => '',
+ 'datebox' => '',
+ 'empty' => theme('calendar_empty_day', $curday_date, $view),
'link' => '',
- 'all_day' => array(),
+ 'all_day' => array(),
'items' => array(),
);
}
@@ -129,7 +128,7 @@ function calendar_build_week(&$curday, $view, $items, $check_month = FALSE) {
($curday_date > $today ? ' future' : '') .
(empty($items[$curday_date]) ? ' has-no-events' : ' has-events');
}
-
+
$rows[$week][] = array(
'data' => $content,
'class' => $class, 'id' => $view->name . '-' . $curday_date);
@@ -189,10 +188,10 @@ function calendar_build_day($curday, $view, $items) {
}
$link = theme('calendar_'. $view->date_info->calendar_type .'_multiple_node', $curday_date, $count, $view, $types);
}
-
+
$content = array(
- 'date' => $curday_date,
- 'datebox' => theme('calendar_datebox', $curday_date, $view, $items, $selected),
+ 'date' => $curday_date,
+ 'datebox' => theme('calendar_datebox', $curday_date, $view, $items, $selected),
'empty' => $empty,
'link' => $link,
'all_day' => $all_day,
@@ -200,4 +199,3 @@ function calendar_build_day($curday, $view, $items) {
);
return $content;
}
-
diff --git a/modules/calendar/includes/calendar.views.inc b/modules/calendar/includes/calendar.views.inc
index 475f73e..e779cad 100644
--- a/modules/calendar/includes/calendar.views.inc
+++ b/modules/calendar/includes/calendar.views.inc
@@ -1,8 +1,7 @@
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;
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/includes/calendar.views_default.inc b/modules/calendar/includes/calendar.views_default.inc
index 121d52a..8c8d78d 100644
--- a/modules/calendar/includes/calendar.views_default.inc
+++ b/modules/calendar/includes/calendar.views_default.inc
@@ -1,15 +1,14 @@
'example_event',
@@ -20,19 +19,19 @@
* );
* $options[] = $option;
* variable_set('calendar_default_view_options', $options);
- *
+ *
*/
function calendar_views_default_views() {
$views = array();
-
+
// Construct the default view with default options.
$view = calendar_views_construct();
$views[$view->name] = $view;
-
- // Then see if there are any custom calendars to be created
+
+ // Then see if there are any custom calendars to be created
// using variable_get().
$calendar_options = variable_get('calendar_default_view_options', array());
-
+
foreach ((array) $calendar_options as $calendar_option) {
$view = calendar_views_construct($calendar_option);
$views[$view->name] = $view;
@@ -41,31 +40,31 @@ function calendar_views_default_views() {
}
/**
- *
+ *
* Construct a default calendar to match specified options.
- * Views calls it without options, so the basic
+ * Views calls it without options, so the basic
* default view will use the default values.
- *
- * @param $options: an optional array of options to
+ *
+ * @param $options: an optional array of options to
* create default calendars.
- *
+ *
* Possible options include:
- * @param string $name:
+ * @param string $name:
* The view name, if empty, defaults to 'calendar'.
- * @param string $description:
+ * @param string $description:
* The view description, if empty, defaults to generic description.
- * @param string $path:
+ * @param string $path:
* The view url, if empty, defaults to 'calendar'.
- * @param array $types:
- * Array of content types to limit the calendar to those types.
+ * @param array $types:
+ * Array of content types to limit the calendar to those types.
* If empty, defaults to no type filter.
- * @param array $date_fields:
+ * @param array $date_fields:
* Date fields used to filter the calendar.
* If empty, defaults to array('changed') for node.changed.
- * @param array $display_fields:
+ * @param array $display_fields:
* Fields to display in the calendar.
* If empty, defaults to title and date fields.
- *
+ *
* @return the default calendar array.
*/
function calendar_views_construct($options = NULL) {
@@ -76,7 +75,7 @@ $path = NULL;
$types = NULL;
$date_fields = NULL;
$display_fields = NULL;
-
+
if (empty($options)) {
$disabled = TRUE;
}
@@ -126,7 +125,7 @@ foreach ($date_fields as $key => $field_name) {
$cck_field = FALSE;
}
$fields[$alias] = $alias;
-
+
// Add a sort for each date field:
$sort_fields[$field_name] = array(
'order' => 'ASC',
diff --git a/modules/calendar/includes/calendar_plugin_display_attachment.inc b/modules/calendar/includes/calendar_plugin_display_attachment.inc
index a9557fa..18cfb33 100644
--- a/modules/calendar/includes/calendar_plugin_display_attachment.inc
+++ b/modules/calendar/includes/calendar_plugin_display_attachment.inc
@@ -1,18 +1,17 @@
view->style_plugin->render($this->view->result);
}
-
+
/**
* Create an array of possible display periods.
*/
@@ -43,9 +42,9 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$types = calendar_display_types();
$default = $this->get_option('calendar_type');
if (!array_key_exists($default, $types)) $default = 'month';
- return $default;
+ return $default;
}
-
+
/**
* Inspect argument and view information to see which calendar
@@ -54,7 +53,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
* if there are values.
*/
function display_granularity($display_id) {
-
+
$arguments = $this->view->get_items('argument', $display_id);
$wildcard = '';
$argument = '';
@@ -84,19 +83,19 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
}
return $view_granularity;
}
-
+
/**
* Display validation.
*/
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("A Calendar period display will not work without a Date argument.");
+ $errors[] = t("A Calendar period display will not work without a Date argument.");
}
- $this->view->date_info->arg_missing = TRUE;
+ $this->view->date_info->arg_missing = TRUE;
}
elseif ($arguments['date_argument']['default_action'] != 'default' || $arguments['date_argument']['default_argument_type'] != 'date') {
if (empty($this->view->date_info->arg_missing_default)) {
@@ -107,21 +106,21 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
return $errors;
}
-
+
/**
* Attach only the appropriate displays for the current argument.
*/
function attach_to($display_id) {
$display_granularity = $this->calendar_type();
$view_granularity = $this->display_granularity($display_id);
-
- // If this is not the right display to show,
+
+ // If this is not the right display to show,
// don't attach it, just exit.
if ($view_granularity != $display_granularity) {
unset($this->display);
return;
}
-
+
$this->view->date_info->parent_id = $display_id;
// See if we're attaching to a block rather than a page.
@@ -139,7 +138,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$this->view->date_info->calendar_colors_group = $this->view->display[$display_id]->handler->options['calendar_colors_group'];
$this->view->date_info->calendar_popup = $this->view->display[$display_id]->handler->options['calendar_popup'];
$this->view->date_info->calendar_date_link = $this->view->display[$display_id]->handler->options['calendar_date_link'];
- }
+ }
parent::attach_to($display_id);
}
@@ -149,17 +148,17 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$this->view->date_info->display_granularity = $this->calendar_type();
$this->view->date_info->calendar_type = $this->calendar_type();
}
-
+
function query() {
- // If we are using legend colors based on taxonomy, make sure the
+ // If we are using legend colors based on taxonomy, make sure the
// node vid field is added to the query so the theme can use it.
if (!empty($this->view->date_info->calendar_colors_taxonomy)) {
- if (empty($this->additional_fields)) $this->additional_fields = array();
+ if (empty($this->additional_fields)) $this->additional_fields = array();
$this->view->query->add_field('node', 'vid');
}
- parent::query();
+ parent::query();
}
-
+
/**
* Override some of the parent options.
*/
@@ -168,7 +167,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$display['inherit_argments'] = TRUE;
$display['inherit_filters'] = TRUE;
$display['attachment_position'] = 'after';
- }
+ }
/**
* Add custom option definitions.
@@ -178,11 +177,11 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$options['calendar_type'] = array('default' => $this->calendar_type());
return $options;
}
-
+
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_type':
$form['#title'] .= t('Calendar period');
@@ -210,7 +209,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
break;
}
}
-
+
/**
* Provide the summary for attachment options in the views UI.
*
@@ -222,7 +221,7 @@ class calendar_plugin_display_attachment extends views_plugin_display_attachment
$categories['calendar_settings'] = array(
'title' => t('Calendar settings'),
);
-
+
$options['calendar_type'] = array(
'category' => 'calendar_settings',
'title' => t('Calendar period'),
diff --git a/modules/calendar/includes/calendar_plugin_display_block.inc b/modules/calendar/includes/calendar_plugin_display_block.inc
index a5b6e8d..220dc62 100644
--- a/modules/calendar/includes/calendar_plugin_display_block.inc
+++ b/modules/calendar/includes/calendar_plugin_display_block.inc
@@ -1,8 +1,7 @@
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 period display '@display_title' will not work without a Date argument.", array('@display_title' => $this->definition['title']));
+ $errors[] = t("The Calendar period display '@display_title' will not work without a Date argument.", array('@display_title' => $this->definition['title']));
}
$this->view->date_info->arg_missing = TRUE;
}
elseif ($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;
}
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;
@@ -58,11 +57,11 @@ class calendar_plugin_display_block extends views_plugin_display_block {
$display['defaults']['items_per_page'] = FALSE;
$display['defaults']['row_plugin'] = FALSE;
$display['defaults']['row_options'] = FALSE;
- }
+ }
/**
* The display block handler returns the structure necessary for a block.
- *
+ *
* TODO This can be removed when the patch at http://drupal.org/node/290328
* gets into an official release.
*/
diff --git a/modules/calendar/includes/calendar_plugin_display_page.inc b/modules/calendar/includes/calendar_plugin_display_page.inc
index 4ee841a..63005e2 100644
--- a/modules/calendar/includes/calendar_plugin_display_page.inc
+++ b/modules/calendar/includes/calendar_plugin_display_page.inc
@@ -1,15 +1,14 @@
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' => '',
'#suffix' => '
',
);
- $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;
}
- }
+ }
}
diff --git a/modules/calendar/includes/calendar_plugin_style.inc b/modules/calendar/includes/calendar_plugin_style.inc
index c794abb..521c0dc 100644
--- a/modules/calendar/includes/calendar_plugin_style.inc
+++ b/modules/calendar/includes/calendar_plugin_style.inc
@@ -1,14 +1,13 @@
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());
}
}
-
diff --git a/modules/calendar/includes/calendar_view_plugin_style.inc b/modules/calendar/includes/calendar_view_plugin_style.inc
index 82c5944..784f5b6 100644
--- a/modules/calendar/includes/calendar_view_plugin_style.inc
+++ b/modules/calendar/includes/calendar_view_plugin_style.inc
@@ -1,6 +1,4 @@
date_info->style_groupby_times = calendar_groupby_times($this->options['groupby_times']);
}
$view->date_info->style_groupby_field = $this->options['groupby_field'];
-
+
// TODO make this an option setting.
$view->date_info->style_show_empty_times = !empty($this->options['groupby_times_custom']) ? TRUE : FALSE;
-
+
// Make sure views does't try to limit the number of items in this view.
$this->view->pager['items_per_page'] = 0;
-
+
}
-
+
/**
* Set default options
*/
@@ -62,7 +60,7 @@ class calendar_view_plugin_style extends calendar_plugin_style {
'#options' => array(1 => t('First letter of name'), 2 => t('First two letters of name'), 3 => t('Abbreviated name'), 99 => t('Full name')),
'#description' => t('The way day of week names should be displayed in a calendar.'),
);
-
+
$form['with_weekno'] = array(
'#title' => t('Show week numbers'),
'#default_value' => $this->options['with_weekno'],
@@ -98,7 +96,7 @@ class calendar_view_plugin_style extends calendar_plugin_style {
'#description' => t("When choosing the 'custom' Time grouping option above, create custom time period groupings as a comma-separated list of 24-hour times in the format HH:MM:SS, like '00:00:00,08:00:00,18:00:00'. Be sure to start with '00:00:00'. All items after the last time will go in the final group."),
);
// Create a list of fields that are available for grouping and truncation,
- // excluding the date fields in the view from the grouping options.
+ // excluding the date fields in the view from the grouping options.
$field_options = array();
$date_field_options = array();
$fields = $this->display->handler->get_option('fields');
@@ -119,8 +117,8 @@ class calendar_view_plugin_style extends calendar_plugin_style {
'#description' => t("Optionally group items into columns by a field value, for instance select the content type to show items for each content type in their own column, or use a location field to organize items into columns by location."),
'#options' => array('' => '') + $field_options,
);
-
- if (module_exists('calendar_multiday')) {
+
+ if (module_exists('calendar_multiday')) {
$form['multiday_theme'] = array(
'#title' => t('Multi-day style'),
'#default_value' => $this->options['multiday_theme'],
@@ -135,8 +133,8 @@ class calendar_view_plugin_style extends calendar_plugin_style {
'#options' => array(0 => t('Do not display overlapping items'), 1 => t('Display overlapping items')),
'#description' => t('Select whether calendar items are displayed as overlapping items.'),
);
- }
-
+ }
+
foreach ($form as $key => $value) {
if ($value['#type'] == 'value') {
$form[$key]['#value'] = $value['#default_value'];
@@ -170,4 +168,4 @@ class calendar_view_plugin_style extends calendar_plugin_style {
$this->view->date_info->hide_admin_links = TRUE;
return theme($this->theme_functions(), $this->view, $this->options, array());
}
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/jcalendar/jcalendar.info b/modules/calendar/jcalendar/jcalendar.info
index 3305cfd..14a2bac 100644
--- a/modules/calendar/jcalendar/jcalendar.info
+++ b/modules/calendar/jcalendar/jcalendar.info
@@ -1,4 +1,3 @@
-; $Id: jcalendar.info,v 1.1.4.2 2008/06/23 14:55:01 karens Exp $
name = Calendar Popup
description = "Replaces the links to calendar items with a javascript popup that gracefully regresses if javascript is not enabled"
dependencies[] = calendar
@@ -11,4 +10,3 @@ version = "6.x-2.4"
core = "6.x"
project = "calendar"
datestamp = "1294072550"
-
diff --git a/modules/calendar/jcalendar/jcalendar.module b/modules/calendar/jcalendar/jcalendar.module
index da3cc6a..66fe5ad 100644
--- a/modules/calendar/jcalendar/jcalendar.module
+++ b/modules/calendar/jcalendar/jcalendar.module
@@ -1,6 +1,4 @@
'. l(t('more', array(), $node->language), calendar_get_node_link($node)) .'
';
return $output;
-}
\ No newline at end of file
+}
diff --git a/modules/calendar/js/calendar_colorpicker.js b/modules/calendar/js/calendar_colorpicker.js
index aa28fe8..27c62c9 100644
--- a/modules/calendar/js/calendar_colorpicker.js
+++ b/modules/calendar/js/calendar_colorpicker.js
@@ -1,7 +1,6 @@
-// $Id: calendar_colorpicker.js,v 1.1.4.3 2008/11/21 22:04:56 karens Exp $
/**
* Implementation of hook_elements.
- *
+ *
* Much of the colorpicker code was adapted from the Colorpicker module.
* That module has no stable release yet nor any D6 branch.
*/
@@ -9,16 +8,16 @@
* Bind the colorpicker event to the form element
*/
Drupal.behaviors.calendarColorpicker = function (context) {
-
+
// do we have multiple calendar_colors?
if ($("div.calendar_colorpicker").size() > 0) {
-
+
// loop over each calendar_color type
$("div.calendar_colorpicker").each(function() {
// create the farbtastic colorpicker
var farb = $.farbtastic(this);
-
+
// get the id of the current matched colorpicker wrapper div
var id = $(this).attr("id");
@@ -26,7 +25,7 @@ Drupal.behaviors.calendarColorpicker = function (context) {
$("input.calendar_colorfield").filter("." + id).each(function () {
// set the background colors of all of the textfields appropriately
farb.linkTo(this);
-
+
// when clicked, they get linked to the farbtastic colorpicker that they are associated with
$(this).click(function () {
farb.linkTo(this);
@@ -37,4 +36,3 @@ Drupal.behaviors.calendarColorpicker = function (context) {
});
}
};
-
diff --git a/modules/calendar/theme/calendar-datebox.tpl.php b/modules/calendar/theme/calendar-datebox.tpl.php
index 85f09e2..2600565 100644
--- a/modules/calendar/theme/calendar-datebox.tpl.php
+++ b/modules/calendar/theme/calendar-datebox.tpl.php
@@ -1,7 +1,6 @@
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-day-node.tpl.php b/modules/calendar/theme/calendar-day-node.tpl.php
index 3f1ab67..6d57d2c 100644
--- a/modules/calendar/theme/calendar-day-node.tpl.php
+++ b/modules/calendar/theme/calendar-day-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,20 +20,20 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_day_node.
*/
?>
@@ -45,9 +44,9 @@
+
-
+
diff --git a/modules/calendar/theme/calendar-day.tpl.php b/modules/calendar/theme/calendar-day.tpl.php
index c8cf307..dba013d 100644
--- a/modules/calendar/theme/calendar-day.tpl.php
+++ b/modules/calendar/theme/calendar-day.tpl.php
@@ -1,10 +1,9 @@
+ *
+ * The width of the columns is dynamically set using
* based on the number of columns presented. The values passed in will
- * work to set the 'hour' column to 10% and split the remaining columns
+ * work to set the 'hour' column to 10% and split the remaining columns
* evenly over the remaining 90% of the table.
*/
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
@@ -57,7 +56,7 @@
-
+
@@ -73,9 +72,9 @@
-
+
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-main.tpl.php b/modules/calendar/theme/calendar-main.tpl.php
index e736b9d..b2d2a35 100644
--- a/modules/calendar/theme/calendar-main.tpl.php
+++ b/modules/calendar/theme/calendar-main.tpl.php
@@ -1,9 +1,8 @@
@@ -23,4 +22,4 @@
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-mini.tpl.php b/modules/calendar/theme/calendar-mini.tpl.php
index fcbc71a..8eb0436 100644
--- a/modules/calendar/theme/calendar-mini.tpl.php
+++ b/modules/calendar/theme/calendar-mini.tpl.php
@@ -1,9 +1,8 @@
date_info->show_title): ?>
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-month-multiple-node.tpl.php b/modules/calendar/theme/calendar-month-multiple-node.tpl.php
index f7c9204..9206f89 100644
--- a/modules/calendar/theme/calendar-month-multiple-node.tpl.php
+++ b/modules/calendar/theme/calendar-month-multiple-node.tpl.php
@@ -1,10 +1,9 @@
@@ -17,12 +16,12 @@
date_info->style_max_items_behavior != 'more'): ?>
-
+
$count)), $link) ?>
-
+
»
-
+
diff --git a/modules/calendar/theme/calendar-month-node.tpl.php b/modules/calendar/theme/calendar-month-node.tpl.php
index 7db254b..5684340 100644
--- a/modules/calendar/theme/calendar-month-node.tpl.php
+++ b/modules/calendar/theme/calendar-month-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,20 +20,20 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_month_node.
*/
?>
@@ -45,9 +44,9 @@
+
-
+
diff --git a/modules/calendar/theme/calendar-month.tpl.php b/modules/calendar/theme/calendar-month.tpl.php
index 903d378..647e028 100644
--- a/modules/calendar/theme/calendar-month.tpl.php
+++ b/modules/calendar/theme/calendar-month.tpl.php
@@ -1,9 +1,8 @@
@@ -43,4 +42,4 @@
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-week-multiple-node.tpl.php b/modules/calendar/theme/calendar-week-multiple-node.tpl.php
index 4830fdc..185b6ee 100644
--- a/modules/calendar/theme/calendar-week-multiple-node.tpl.php
+++ b/modules/calendar/theme/calendar-week-multiple-node.tpl.php
@@ -1,11 +1,10 @@
@@ -16,12 +15,12 @@
date_info->style_max_items_behavior != 'more'): ?>
-
+
$count)), $link) ?>
-
+
»
-
+
diff --git a/modules/calendar/theme/calendar-week-node.tpl.php b/modules/calendar/theme/calendar-week-node.tpl.php
index 9302601..856fcea 100644
--- a/modules/calendar/theme/calendar-week-node.tpl.php
+++ b/modules/calendar/theme/calendar-week-node.tpl.php
@@ -1,19 +1,18 @@
nid
* that you can use to load the full object, and
* $node->type to tell the content type of the node.
- *
+ *
* $fields
* An array of information for every field selected in the 'Fields'
* section of this view, formatted as requested in the View setup.
- *
+ *
* Calendar info for this individual calendar item is in local time --
* the user timezone where configurable timezones are allowed and set,
* otherwise the site timezone. If this item has extends over more than
@@ -21,22 +20,22 @@
* date and calendar_start will be no earlier than the start of
* the current day and calendar_end will be no later than the end
* of the current day.
- *
+ *
* $calendar_start - A formatted datetime start date for this item.
* i.e. '2008-05-12 05:26:15'.
* $calendar_end - A formatted datetime end date for this item,
* the same as the start date except for fields that have from/to
- * fields defined, like Date module dates.
+ * fields defined, like Date module dates.
* $calendar_start_date - a PHP date object for the start time.
* $calendar_end_date - a PHP date object for the end time.
- *
+ *
* You can use PHP date functions on the date object to display date
* information in other ways, like:
- *
+ *
* print date_format($calendar_start_date, 'l, j F Y - g:ia');
- *
+ *
* @see template_preprocess_calendar_week_node.
- */
+ */
?>
+
diff --git a/modules/calendar/theme/calendar-week.tpl.php b/modules/calendar/theme/calendar-week.tpl.php
index 869b039..ff6ed50 100644
--- a/modules/calendar/theme/calendar-week.tpl.php
+++ b/modules/calendar/theme/calendar-week.tpl.php
@@ -1,14 +1,13 @@
-
+
@@ -71,10 +70,10 @@
-
+
-
+
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/calendar-year.tpl.php b/modules/calendar/theme/calendar-year.tpl.php
index 8b36f5d..8373c6e 100644
--- a/modules/calendar/theme/calendar-year.tpl.php
+++ b/modules/calendar/theme/calendar-year.tpl.php
@@ -1,16 +1,15 @@
@@ -18,10 +17,10 @@
class="mini">
- | | |
- | | |
- | | |
- | | |
+ | | |
+ | | |
+ | | |
+ | | |
-
\ No newline at end of file
+
diff --git a/modules/calendar/theme/theme.inc b/modules/calendar/theme/theme.inc
index 3bcd94f..c620ebe 100644
--- a/modules/calendar/theme/theme.inc
+++ b/modules/calendar/theme/theme.inc
@@ -1,5 +1,4 @@
date_info->week)) {
$week = date_week_range($view->date_info->week, $view->date_info->year);
- $current_date = $week[0];
+ $current_date = $week[0];
}
elseif (!empty($view->date_info->month)) {
$current_date = date_make_date($view->date_info->year .'-'. date_pad($view->date_info->month) .'-01 00:00:00');
@@ -76,19 +75,19 @@ function template_preprocess_calendar_main(&$vars) {
// If an 'Add new ... link is provided, add it here.
// the query will bring the user back here after adding the node.
- if (!empty($view->date_info->calendar_date_link)
+ if (!empty($view->date_info->calendar_date_link)
&& (user_access("administer nodes") || user_access('create '. $view->date_info->calendar_date_link .' content'))) {
$name = node_get_types('name', $view->date_info->calendar_date_link);
$href = 'node/add/'. str_replace('_', '-', $view->date_info->calendar_date_link);
- $query = 'destination='. $view->date_info->url;
+ $query = 'destination='. $view->date_info->url;
$vars['calendar_links']['calendar calendar-add'] = $base + array(
- 'title' => t('Add+'),
- 'href' => $href,
+ 'title' => t('Add+'),
+ 'href' => $href,
'query' => $query,
);
}
- $vars['view'] = $view;
+ $vars['view'] = $view;
$vars['mini'] = !empty($view->date_info->mini);
$vars['block'] = !empty($view->date_info->block);
$vars['block_identifier'] = date_block_identifier($view);
@@ -97,7 +96,7 @@ function template_preprocess_calendar_main(&$vars) {
/**
* Display a view as a calendar.
- *
+ *
* This preprocessor does all the work needed for all types of calendar
* views and the template takes care of displaying links to related views.
*/
@@ -117,7 +116,7 @@ function template_preprocess_calendar(&$vars) {
$fields = $view->field;
// Render each field into an output array. We have to do the rendering
- // here because we don't apppear to have full access to the view
+ // here because we don't apppear to have full access to the view
// handlers in the theme functions.
$items = array();
$calendar_fields = date_api_fields($view->base_table);
@@ -136,7 +135,7 @@ function template_preprocess_calendar(&$vars) {
}
foreach ($fields 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;
if (!empty($field) && is_object($field)) {
// Theme the copy instead of the original row so duplicate date
// fields each get a fresh copy of the original data to theme.
@@ -176,7 +175,7 @@ function template_preprocess_calendar(&$vars) {
$vars['rows'] = $rows;
$view->date_info->calendar_processed = TRUE;
- $vars['view'] = $view;
+ $vars['view'] = $view;
$vars['mini'] = !empty($view->date_info->mini);
$vars['block'] = !empty($view->date_info->block);
}
@@ -265,8 +264,8 @@ function template_preprocess_calendar_year(&$vars) {
$view = $vars['view'];
$year = date_format($view->date_info->min_date, 'Y');
- // Construct a calendar for each month, adjusting the $view passed
- // to the theme so it will produce the right results.
+ // Construct a calendar for each month, adjusting the $view passed
+ // to the theme so it will produce the right results.
$view = drupal_clone($vars['view']);
$rows = $vars['rows'];
$months = array();
@@ -322,7 +321,7 @@ function template_preprocess_calendar_day(&$vars) {
$grouped_items = array();
foreach ($rows['all_day'] as $item) {
if (isset($item->{$grouping_field})) {
- $column = $item->{$grouping_field};
+ $column = $item->{$grouping_field};
$item->{$grouping_field} = ''; // Remove the grouping field from the results.
if (!in_array($column, $columns)) {
$columns[] = $column;
@@ -339,7 +338,7 @@ function template_preprocess_calendar_day(&$vars) {
// Moved timed items into the right columns and render them.
$start_times = $view->date_info->style_groupby_times;
- $show_empty_times = $view->date_info->style_show_empty_times;
+ $show_empty_times = $view->date_info->style_show_empty_times;
$end_start_time = '23:59:59';
$start_time = array_shift($start_times);
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -361,7 +360,7 @@ function template_preprocess_calendar_day(&$vars) {
// slots if the option to show empty times was chosen.
while ($time >= $next_start_time && $time < $end_start_time) {
if ((!empty($show_empty_times)) && !array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'] = array();
+ $grouped_items[$start_time]['values'] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -377,7 +376,7 @@ function template_preprocess_calendar_day(&$vars) {
if (!empty($show_empty_times)) {
while ($start_time < $end_start_time) {
if (!array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'] = array();
+ $grouped_items[$start_time]['values'] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -391,8 +390,8 @@ function template_preprocess_calendar_day(&$vars) {
$next_start_time = array_key_exists($i + 1, $start_times) ? $start_times[$i + 1] : '23:59:59';
$heading = theme('calendar_time_row_heading', $start_time, $next_start_time, $rows['date']);
$grouped_items[$start_time]['hour'] = $heading['hour'];
- $grouped_items[$start_time]['ampm'] = $heading['ampm'];
- $i++;
+ $grouped_items[$start_time]['ampm'] = $heading['ampm'];
+ $i++;
}
ksort($grouped_items);
$vars['rows']['items'] = $grouped_items;
@@ -444,7 +443,7 @@ function template_preprocess_calendar_week(&$vars) {
}
// Moved timed items into the right columns and render them.
- $show_empty_times = $view->date_info->style_show_empty_times;
+ $show_empty_times = $view->date_info->style_show_empty_times;
$end_start_time = '23:59:59';
$grouped_items = array();
@@ -477,15 +476,15 @@ function template_preprocess_calendar_week(&$vars) {
// slots if the option to show empty times was chosen.
while ($time >= $next_start_time && $time < $end_start_time) {
if (($show_empty_times) && !array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'][$weekno] = array();
+ $grouped_items[$start_time]['values'][$weekno] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
}
$theme = isset($item->calendar_node_theme) ? $item->calendar_node_theme : 'calendar_'. $view->date_info->granularity .'_node';
$grouped_items[$start_time]['values'][$weekno][] = theme($theme, $item, $view);
- $item_count++;
- $by_hour_count++;
+ $item_count++;
+ $by_hour_count++;
}
}
@@ -493,7 +492,7 @@ function template_preprocess_calendar_week(&$vars) {
if ($show_empty_times) {
while ($start_time < $end_start_time) {
if (!array_key_exists($start_time, $grouped_items)) {
- $grouped_items[$start_time]['values'][$weekno] = array();
+ $grouped_items[$start_time]['values'][$weekno] = array();
}
$start_time = $next_start_time;
$next_start_time = count($start_times) ? array_shift($start_times) : $end_start_time;
@@ -509,10 +508,10 @@ function template_preprocess_calendar_week(&$vars) {
$next_start_time = array_key_exists($i + 1, $start_times) ? $start_times[$i + 1] : '23:59:59';
$heading = theme('calendar_time_row_heading', $start_time, $next_start_time, $row['data']['date']);
$grouped_items[$start_time]['hour'] = $heading['hour'];
- $grouped_items[$start_time]['ampm'] = $heading['ampm'];
+ $grouped_items[$start_time]['ampm'] = $heading['ampm'];
}
- $vars['items'] = $grouped_items;
+ $vars['items'] = $grouped_items;
$vars['day_names'] = $day_names;
$vars['columns'] = $columns;
@@ -566,7 +565,7 @@ function template_preprocess_calendar_node(&$vars) {
$fields = array();
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;
if (!empty($node->$field_alias)) {
$data = $node->$field_alias;
$label = $field->options['label'];
@@ -597,7 +596,7 @@ function template_preprocess_calendar_node(&$vars) {
// We added the node type to the results in the query,
// but it will show up as $node->node_type instead of
- // $node->type. Rename it to match the normal way it
+ // $node->type. Rename it to match the normal way it
// would show up on a node object.
$vars['node']->type = $vars['node']->node_type;
}
@@ -704,7 +703,7 @@ function theme_calendar_stripe_legend() {
array('class' => 'calendar-legend', 'data' => t('Key'))
);
$rows = array();
- $output = '';
+ $output = '';
foreach ((array) $GLOBALS['calendar_stripes'] as $label => $stripe) {
if($stripe){
$rows[] = array($label, '
');
diff --git a/modules/ckeditor/ckeditor.make.example b/modules/ckeditor/ckeditor.make.example
index fb54fd6..27b173e 100644
--- a/modules/ckeditor/ckeditor.make.example
+++ b/modules/ckeditor/ckeditor.make.example
@@ -1,5 +1,3 @@
-; $Id$
-
core = 6.x
api = 2
@@ -7,4 +5,4 @@ projects[] = drupal
libraries[ckeditor][download][type] = "svn"
libraries[ckeditor][download][url] = "http://svn.ckeditor.com/CKEditor/releases/stable/"
-libraries[ckeditor][directory_name] = "ckeditor"
\ No newline at end of file
+libraries[ckeditor][directory_name] = "ckeditor"
diff --git a/modules/content_taxonomy/content_taxonomy.info b/modules/content_taxonomy/content_taxonomy.info
index c20c6c1..25194eb 100644
--- a/modules/content_taxonomy/content_taxonomy.info
+++ b/modules/content_taxonomy/content_taxonomy.info
@@ -1,7 +1,6 @@
-; $Id: content_taxonomy.info,v 1.1.2.2.2.1 2008/04/30 08:05:19 mh86 Exp $
name = Content Taxonomy
description = Defines a field type for taxonomy terms
-dependencies[] = content
+dependencies[] = content
dependencies[] = taxonomy
package = CCK
core = 6.x
@@ -12,4 +11,3 @@ version = "6.x-1.0-rc2"
core = "6.x"
project = "content_taxonomy"
datestamp = "1250688034"
-
diff --git a/modules/content_taxonomy/content_taxonomy.install b/modules/content_taxonomy/content_taxonomy.install
index 88f752f..6e90ab3 100644
--- a/modules/content_taxonomy/content_taxonomy.install
+++ b/modules/content_taxonomy/content_taxonomy.install
@@ -1,7 +1,4 @@
$attributes) {
$attributes['not null'] = FALSE;
$column = $attributes['column'];
@@ -139,7 +136,7 @@ function content_taxonomy_update_6000() {
/**
* Implemenation of hook_update_N().
- *
+ *
* Renaming of the Parent setting
*/
function content_taxonomy_update_6001() {
@@ -167,7 +164,7 @@ function content_taxonomy_update_6001() {
/**
* Implemenation of hook_update_N().
- *
+ *
* Fixing parent setting
*/
function content_taxonomy_update_6002() {
@@ -194,17 +191,17 @@ function content_taxonomy_install_terms_by_field($node, $field) {
$result = db_query("SELECT n.tid FROM {term_hierarchy} h, {term_node} n, {term_data} td WHERE
n.nid = %d AND n.tid = h.tid AND h.parent = %d AND td.tid=n.tid AND td.vid=%d",
$node->nid, $field['tid'], $field['vid']);
-
+
while ($data = db_fetch_array($result)) {
$terms[$data["tid"]] = $data["tid"];
}
}
- else {
+ else {
$result = taxonomy_node_get_terms_by_vocabulary($node, $field['vid']);
foreach ($result as $tid => $term) {
$terms[$tid] = $tid;
}
}
-
+
return $terms;
}
diff --git a/modules/content_taxonomy/content_taxonomy.module b/modules/content_taxonomy/content_taxonomy.module
index 537f3d0..b7f1ee3 100644
--- a/modules/content_taxonomy/content_taxonomy.module
+++ b/modules/content_taxonomy/content_taxonomy.module
@@ -1,7 +1,4 @@
'checkbox',
+ '#type' => 'checkbox',
'#title' => t('Save values additionally to the core taxonomy system (into the \'term_node\' table).'),
'#default_value' => is_numeric($field['save_term_node']) ? $field['save_term_node'] : 0,
- '#description' => t('If this option is set, saving of terms is additionally handled by the taxonomy module. So saved terms from Content Taxonomy fields will appear as any other terms saved by the core taxonomy module. Set this option if you are using any other taxonomy application, like tagadelic. Otherwise terms are only saved in the cck tables and can only be accessed via the node or a view'),
+ '#description' => t('If this option is set, saving of terms is additionally handled by the taxonomy module. So saved terms from Content Taxonomy fields will appear as any other terms saved by the core taxonomy module. Set this option if you are using any other taxonomy application, like tagadelic. Otherwise terms are only saved in the cck tables and can only be accessed via the node or a view'),
);
-
+
$options_voc = array();
foreach (taxonomy_get_vocabularies() as $voc) {
_content_taxonomy_localize_vocabulary($voc);
$options_voc[$voc->vid] = $voc->name;
}
-
+
$form['vid'] = array(
'#title' => t('Vocabulary'),
'#type' => 'select',
@@ -84,13 +81,13 @@ function content_taxonomy_field_settings($op, $field) {
'#options' => $options_voc,
'#description' => t('Terms of the selected vocabulary get exposed to the field'),
);
-
+
$form['hierarchical_vocabulary'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings for hierarchical vocabularies'),
'#collapsible' => TRUE,
);
-
+
$form['hierarchical_vocabulary']['parent'] = array(
'#title' => t('Parent Term'),
'#type' => 'select',
@@ -118,22 +115,22 @@ function content_taxonomy_field_settings($op, $field) {
'#default_value' => is_numeric($field['depth']) ? $field['depth'] : '',
'#description' => t('By setting a numeric value, the depth of the hierarchy shown can be limited. Leave this field blank to show the whole hierarchy.'),
);
-
-
- return $form;
-
+
+
+ return $form;
+
case 'save':
return array('save_term_node', 'vid', 'parent', 'parent_php_code', 'depth');
-
+
case 'database columns':
return array(
'value' => array('type' => 'int', 'not null' => FALSE, 'sortable' => FALSE),
);
-
+
case 'views data':
$data = content_views_field_views_data($field);
$table_alias = content_views_tablename($field);
-
+
// Add a relation to the taxonomy term table.
$data[$table_alias][$field['field_name'] .'_value']['relationship'] = array(
'handler' => 'views_handler_relationship',
@@ -152,7 +149,7 @@ function content_taxonomy_field_settings($op, $field) {
* Implementation of hook_field().
*/
function content_taxonomy_field($op, &$node, $field, &$items, $teaser, $page) {
- switch ($op) {
+ switch ($op) {
case 'presave':
if ($field['save_term_node']) {
static $_content_taxonomy_array_cleared;
@@ -160,10 +157,10 @@ function content_taxonomy_field($op, &$node, $field, &$items, $teaser, $page) {
_content_taxonomy_taxonomy_unset($node->taxonomy, array($field['vid']));
$_content_taxonomy_array_cleared[$node->nid][$field['vid']] = TRUE;
}
-
+
foreach ($items as $key => $entry) {
if ($entry['value']) {
- if (is_object($node->taxonomy[$entry['value']])
+ if (is_object($node->taxonomy[$entry['value']])
|| (is_array($node->taxonomy) && in_array($entry['value'], $node->taxonomy))
|| (isset($entry['_remove']) && $entry['_remove'] == 1)) {
continue;
@@ -182,7 +179,7 @@ function content_taxonomy_field($op, &$node, $field, &$items, $teaser, $page) {
}
}
}
- // the $node->taxonomy array should never be empty, because in this case the
+ // the $node->taxonomy array should never be empty, because in this case the
// taxonomy nodeapi doesn't call taxonomy_node_save which handles removing
// and inserting of terms
if (empty($node->taxonomy)) {
@@ -251,16 +248,16 @@ function content_taxonomy_content_is_empty($item, $field) {
*/
function content_taxonomy_allowed_values($field) {
$options = array();
-
+
//for opt groups call different function
if (isset($field['widget']['group_parent']) && $field['widget']['group_parent'] > 0) {
return content_taxonomy_allowed_values_groups($field);
}
-
+
$depth = (is_numeric($field['depth'])) ? $field['depth'] : NULL;
$tree = taxonomy_get_tree($field['vid'], content_taxonomy_field_get_parent($field), -1, $depth);
-
+
if (is_array($tree)) {
foreach ($tree as $term) {
_content_taxonomy_localize_term($term);
@@ -280,14 +277,14 @@ function content_taxonomy_allowed_values($field) {
return $options;
}
-/**
+/**
* Creating Opt Groups for content_taxonomy_options
*/
function content_taxonomy_allowed_values_groups($field) {
$options = array();
$parent = content_taxonomy_field_get_parent($field);
$group_parent = $field['widget']['group_parent'];
-
+
//if children in no group
$default_terms = taxonomy_get_children($parent, $field['vid']);
foreach ($default_terms as $default_term) {
@@ -345,13 +342,13 @@ function content_taxonomy_form_alter(&$form, $form_state, $form_id) {
}
}
_content_taxonomy_taxonomy_unset($form['taxonomy'], $_content_taxonomy_vids);
-
+
//hide empty 'Vocabularies' fieldsets
$empty_fieldset = TRUE;
if (is_array($form['taxonomy'])) {
foreach ($form['taxonomy'] as $key => $value) {
if (is_array($value) && !empty($value)) {
- $empty_fieldset = FALSE;
+ $empty_fieldset = FALSE;
break;
}
}
@@ -423,7 +420,7 @@ function content_taxonomy_views_api() {
*/
function content_taxonomy_fields() {
static $ct_fields;
-
+
if (!is_array($ct_fields)) {
$ct_fields = array();
foreach (content_types() as $type_name => $type) {
@@ -438,7 +435,7 @@ function content_taxonomy_fields() {
}
-/**
+/**
* Helper functions that returns all terms group by their vocabulary
*
* needed for some settings forms
@@ -452,7 +449,7 @@ function _content_taxonomy_get_all_terms() {
_content_taxonomy_localize_term($term);
$options[$voc->name][$term->tid] = str_repeat('- ', $term->depth) . $term->name;
}
- }
+ }
}
return $options;
}
@@ -489,7 +486,7 @@ function _content_taxonomy_localize_vocabulary(&$vocabulary) {
/**
* carefully unsets node or node form taxonomy items
- *
+ *
*
* @param $form the node or node form's taxonomy selections. nodes are objects and forms are arrays, so only the actual taxonomy value or property is passed
* @param $vids an array containing a list of vocabulary IDs whose terms should be unset
@@ -533,7 +530,7 @@ function content_taxonomy_content_diff_values($node, $field, $items) {
foreach ($items as $item) {
if (isset($item['value']) && is_numeric($item['value'])) {
$term = taxonomy_get_term($item['value']);
- $return[] = $term->name;
+ $return[] = $term->name;
}
}
return $return;
diff --git a/modules/content_taxonomy/content_taxonomy_autocomplete.info b/modules/content_taxonomy/content_taxonomy_autocomplete.info
index eb54b68..c29fa15 100644
--- a/modules/content_taxonomy/content_taxonomy_autocomplete.info
+++ b/modules/content_taxonomy/content_taxonomy_autocomplete.info
@@ -1,8 +1,7 @@
-; $Id: content_taxonomy_autocomplete.info,v 1.1.2.4.2.1 2008/04/30 08:05:19 mh86 Exp $
name = Content Taxonomy Autocomplete
description = Defines a autocomplete widget type for content_taxonomy
-dependencies[] = content
-dependencies[] = content_taxonomy
+dependencies[] = content
+dependencies[] = content_taxonomy
dependencies[] = taxonomy
package = CCK
core = 6.x
@@ -12,4 +11,3 @@ version = "6.x-1.0-rc2"
core = "6.x"
project = "content_taxonomy"
datestamp = "1250688034"
-
diff --git a/modules/content_taxonomy/content_taxonomy_autocomplete.install b/modules/content_taxonomy/content_taxonomy_autocomplete.install
index eb129c0..ae6b57e 100644
--- a/modules/content_taxonomy/content_taxonomy_autocomplete.install
+++ b/modules/content_taxonomy/content_taxonomy_autocomplete.install
@@ -1,6 +1,4 @@
'select',
- '#title' => t('Extra Parent for new terms'),
- '#options' => _content_taxonomy_get_all_terms(),
+ '#type' => 'select',
+ '#title' => t('Extra Parent for new terms'),
+ '#options' => _content_taxonomy_get_all_terms(),
'#default_value' => (isset($widget['extra_parent']) && is_numeric($widget['extra_parent'])) ? $widget['extra_parent'] : 0,
'#description' => t('This setting is only relevant if you have selected "Allow and insert new terms by the user into the vocabulary". If you select any term here, new terms will get children of the selected one, otherwise new terms get children of the parent term (root, if no parent selected) selected in the global settings.'),
);
-
+
$form['autocomplete']['maxlength'] = array(
- '#type' => 'textfield',
- '#title' => t('Maximum length of autocomplete'),
+ '#type' => 'textfield',
+ '#title' => t('Maximum length of autocomplete'),
'#default_value' => (isset($widget['maxlength']) && is_numeric($widget['maxlength'])) ? $widget['maxlength'] : 255,
'#element_validate' => array('_content_taxonomy_autocomplete_widget_settings_maxlength_validate'),
'#required' => TRUE,
@@ -86,8 +84,8 @@ function content_taxonomy_autocomplete_widget_settings($op, $widget) {
);
if (module_exists('active_tags')) {
$form['autocomplete']['active_tags'] = array(
- '#type' => 'checkbox',
- '#title' => t('Use Active Tags style widget'),
+ '#type' => 'checkbox',
+ '#title' => t('Use Active Tags style widget'),
'#default_value' => isset($widget['active_tags']) ? $widget['active_tags'] : 0,
'#description' => t('Use the Active Tags module to improve the usability of this autocomplete widget.'),
);
@@ -122,7 +120,7 @@ function content_taxonomy_autocomplete_elements() {
return array(
'content_taxonomy_autocomplete' => array(
'#input' => TRUE,
- '#columns' => array('value'),
+ '#columns' => array('value'),
'#delta' => 0,
'#process' => array('content_taxonomy_autocomplete_process'),
'#autocomplete_path' => FALSE,
@@ -173,7 +171,7 @@ function content_taxonomy_autocomplete_process($element, $edit, $form_state, $fo
$field_name = $element['#field_name'];
$field = $form['#field_info'][$field_name];
$field_key = $element['#columns'][0];
-
+
$element[$field_key] = array(
'#type' => 'textfield',
'#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : '',
@@ -187,16 +185,16 @@ function content_taxonomy_autocomplete_process($element, $edit, $form_state, $fo
'#columns' => $element['#columns'],
'#maxlength' => !empty($field['widget']['maxlength']) ? $field['widget']['maxlength'] : 255,
);
-
+
if (empty($element[$field_key]['#element_validate'])) {
$element[$field_key]['#element_validate'] = array();
}
array_unshift($element[$field_key]['#element_validate'], 'content_taxonomy_autocomplete_validate');
-
+
if (module_exists('active_tags') && $field['widget']['active_tags']) {
active_tags_enable_widget('#' . $element['#id'] . '-value-wrapper');
}
-
+
return $element;
}
@@ -209,16 +207,16 @@ function content_taxonomy_autocomplete_validate($element, &$form_state) {
$field_name = $element['#field_name'];
$field = content_fields($field_name, $element['#type_name']);
$field_key = $element['#columns'][0];
-
+
//if the element parents array contains the field key, we have to remove it
//because otherwise form_set_value won't work. (still the question why is it in)
if ($element['#parents'][count($element['#parents'])-1] == $field_key) {
array_pop($element['#parents']);
array_pop($element['#array_parents']);
}
-
+
$value = $element['#value'];
-
+
$extracted_ids = content_taxonomy_autocomplete_tags_get_tids($value, $field['vid'], content_taxonomy_field_get_parent($field), $field['widget']['extra_parent']);
if (!$field['multiple'] && count(content_taxonomy_autocomplete_split_tags($value, $field['vid'])) > 1) {
@@ -234,7 +232,7 @@ function content_taxonomy_autocomplete_validate($element, &$form_state) {
return;
}
}
-
+
$values = content_taxonomy_autocomplete_form2data($extracted_ids, $field, $element);
form_set_value($element, $values, $form_state);
}
@@ -249,9 +247,9 @@ function content_taxonomy_autocomplete_form2data($extracted_ids, $field, $elemen
if (is_array($extracted_ids['non_existing_terms'])) {
if ($field['widget']['extra_parent']) {
$new_tids = content_taxonomy_autocomplete_insert_tags($extracted_ids['non_existing_terms'], $field['widget']['extra_parent']);
- }
+ }
else {
- $new_tids = content_taxonomy_autocomplete_insert_tags($extracted_ids['non_existing_terms'], content_taxonomy_field_get_parent($field));
+ $new_tids = content_taxonomy_autocomplete_insert_tags($extracted_ids['non_existing_terms'], content_taxonomy_field_get_parent($field));
}
}
return content_transpose_array_rows_cols(array($element['#columns'][0] => array_merge($existing_tids, $new_tids)));
@@ -261,7 +259,7 @@ function content_taxonomy_autocomplete_form2data($extracted_ids, $field, $elemen
/**
* Retrieve a pipe delimited string of autocomplete suggestions
- *
+ *
* @param String Fieldname
* @param Integer TID of a parent (optional)
* @param BOOLEAN whether a multiple field or not
@@ -274,13 +272,13 @@ function content_taxonomy_autocomplete_load($field_name, $string = '') {
$content_type_info = _content_type_info();
$vid = $content_type_info['fields'][$field_name]['vid'];
$tid = content_taxonomy_field_get_parent($content_type_info['fields'][$field_name]);
-
+
// If the menu system has splitted the search text because of slashes, glue it back.
if (func_num_args() > 2) {
$args = func_get_args();
$string .= '/'. implode('/', array_slice($args, 2));
}
-
+
// The user enters a comma-separated list of tags. We only autocomplete the last tag.
$array = drupal_explode_tags($string);
@@ -289,17 +287,17 @@ function content_taxonomy_autocomplete_load($field_name, $string = '') {
$matches = array();
if ($last_string != '') {
if ($tid) {
- $result = db_query_range(db_rewrite_sql("SELECT t.name FROM {term_data} t
+ $result = db_query_range(db_rewrite_sql("SELECT t.name FROM {term_data} t
LEFT JOIN {term_synonym} s ON t.tid = s.tid
INNER JOIN {term_hierarchy} h ON t.tid = h.tid
- WHERE h.parent = %d
+ WHERE h.parent = %d
AND (LOWER(t.name) LIKE LOWER('%%%s%%') OR LOWER(s.name) LIKE LOWER('%%%s%%'))", 't', 'tid'),
$tid,$last_string,$last_string,0,10);
}
else {
- $result = db_query_range(db_rewrite_sql("SELECT t.name FROM {term_data} t
+ $result = db_query_range(db_rewrite_sql("SELECT t.name FROM {term_data} t
LEFT JOIN {term_synonym} s ON t.tid = s.tid
- WHERE t.vid = %d
+ WHERE t.vid = %d
AND (LOWER(t.name) LIKE LOWER('%%%s%%') OR LOWER(s.name) LIKE LOWER('%%%s%%'))", 't', 'tid'),
$vid, $last_string, $last_string, 0, 10);
}
@@ -335,7 +333,7 @@ function content_taxonomy_autocomplete_tags_get_tids($typed_input, $vid, $parent
// formatting so to save the term into the DB as the user intends.
$typed_term = trim(str_replace('""', '"', preg_replace('/^"(.*)"$/', '\1', $typed_term)));
if ($typed_term == "") { continue; }
-
+
// See if the term exists in the chosen vocabulary
// and return the tid, otherwise, add a new record.
$possibilities = taxonomy_get_term_by_name($typed_term);
@@ -348,7 +346,7 @@ function content_taxonomy_autocomplete_tags_get_tids($typed_input, $vid, $parent
$parents = taxonomy_get_parents($possibility->tid);
if (in_array($parent, array_keys($parents)) || in_array($extra_parent, array_keys($parents))) {
$result['existing_tids'][$possibility->tid] = $possibility->tid;
- $typed_term_tid = $possibility->tid;
+ $typed_term_tid = $possibility->tid;
}
}
else {
diff --git a/modules/content_taxonomy/content_taxonomy_options.info b/modules/content_taxonomy/content_taxonomy_options.info
index ddfc3d1..52dfa91 100644
--- a/modules/content_taxonomy/content_taxonomy_options.info
+++ b/modules/content_taxonomy/content_taxonomy_options.info
@@ -1,8 +1,7 @@
-; $Id: content_taxonomy_options.info,v 1.1.2.5.2.1 2008/04/30 08:05:19 mh86 Exp $
name = Content Taxonomy Options
description = Defines a option widget type for content_taxonomy for selects, radios/checkboxes
-dependencies[] = content
-dependencies[] = content_taxonomy
+dependencies[] = content
+dependencies[] = content_taxonomy
dependencies[] = taxonomy
dependencies[] = optionwidgets
package = CCK
@@ -14,4 +13,3 @@ version = "6.x-1.0-rc2"
core = "6.x"
project = "content_taxonomy"
datestamp = "1250688034"
-
diff --git a/modules/content_taxonomy/content_taxonomy_options.install b/modules/content_taxonomy/content_taxonomy_options.install
index 05dd6df..5f54709 100644
--- a/modules/content_taxonomy/content_taxonomy_options.install
+++ b/modules/content_taxonomy/content_taxonomy_options.install
@@ -1,6 +1,4 @@
10,
);
$form['settings']['show_depth'] = array(
- '#type' => 'checkbox',
+ '#type' => 'checkbox',
'#title' => t('Indent child terms with \' - \' signs'),
'#default_value' => is_numeric($widget['show_depth']) ? $widget['show_depth'] : 1,
'#description' => t('If this option is checked, a hierarchy gets visualized by indenting child terms, otherwise it\'s a flat list'),
@@ -69,7 +66,7 @@ function content_taxonomy_options_widget_settings($op, $widget) {
'#description' => t('This settings applies only for select fields. Select a parent term containg the grouping terms. Grouping terms should be parents of the selected terms (from the Global Settings).'),
);
return $form;
-
+
case 'save':
return array('group_parent', 'show_depth');
}
@@ -80,7 +77,7 @@ function content_taxonomy_options_widget_settings($op, $widget) {
*/
function content_taxonomy_options_widget(&$form, &$form_state, $field, $items, $delta = NULL) {
$element = array(
- '#type' => ($field['widget']['type'] == 'content_taxonomy_select') ? 'optionwidgets_select' : 'optionwidgets_buttons',
+ '#type' => ($field['widget']['type'] == 'content_taxonomy_select') ? 'optionwidgets_select' : 'optionwidgets_buttons',
'#default_value' => !empty($items) ? $items : array(),
);
return $element;
diff --git a/modules/content_taxonomy/content_taxonomy_tree.info b/modules/content_taxonomy/content_taxonomy_tree.info
index a56c669..f6ad056 100644
--- a/modules/content_taxonomy/content_taxonomy_tree.info
+++ b/modules/content_taxonomy/content_taxonomy_tree.info
@@ -1,8 +1,7 @@
-; $Id: content_taxonomy_tree.info,v 1.1.2.1 2008/04/30 08:05:19 mh86 Exp $
name = Content Taxonomy Tree
description = Defines a dynamic tree widget for Content Taxonomy
-dependencies[] = content
-dependencies[] = content_taxonomy
+dependencies[] = content
+dependencies[] = content_taxonomy
dependencies[] = taxonomy
dependencies[] = taxonomy_manager
package = CCK
@@ -13,4 +12,3 @@ version = "6.x-1.0-rc2"
core = "6.x"
project = "content_taxonomy"
datestamp = "1250688034"
-
diff --git a/modules/content_taxonomy/content_taxonomy_tree.install b/modules/content_taxonomy/content_taxonomy_tree.install
index dc750f1..0ea92d0 100644
--- a/modules/content_taxonomy/content_taxonomy_tree.install
+++ b/modules/content_taxonomy/content_taxonomy_tree.install
@@ -1,7 +1,4 @@
10,
);
$form['settings']['expand_all'] = array(
- '#type' => 'checkbox',
+ '#type' => 'checkbox',
'#title' => t('Expand whole tree by default'),
'#default_value' => isset($widget['expand_all']) ? $widget['expand_all'] : 0,
'#description' => t('Otherwise only branches, where a term is selected get expanded by default'),
@@ -64,7 +59,7 @@ function content_taxonomy_tree_elements() {
return array(
'content_taxonomy_tree' => array(
'#input' => TRUE,
- '#columns' => array('value'),
+ '#columns' => array('value'),
'#delta' => 0,
'#process' => array('content_taxonomy_tree_process'),
'#element_validate' => array('content_taxonomy_tree_validate'),
@@ -106,12 +101,12 @@ function content_taxonomy_tree_process($element, $edit, &$form_state, $form) {
}
$element['#value'] = content_taxonomy_tree_data2form($element, $element['#value'], $field);
}
-
+
$element[$field_key] = array(
'#type' => 'taxonomy_manager_tree',
'#default_value' => isset($element['#value']) ? $element['#value'] : '',
'#vid' => $field['vid'],
- '#parent' => content_taxonomy_field_get_parent($field),
+ '#parent' => content_taxonomy_field_get_parent($field),
'#default_value' => is_array($element['#value']) ? $element['#value'] : array(),
'#render_whole_tree' => TRUE,
'#pager' => FALSE,
@@ -126,12 +121,12 @@ function content_taxonomy_tree_process($element, $edit, &$form_state, $form) {
'#title' => $element['#title'],
'#description' => $element['#description'],
);
-
-
+
+
// Make sure field info will be available to the validator which
// does not get the values in $form.
$form_state['#field_info'][$field['field_name']] = $field;
-
+
return $element;
}
@@ -146,7 +141,7 @@ function content_taxonomy_tree_validate($element, &$form_state) {
$field_key = $element['#columns'][0];
$values = content_taxonomy_tree_form2data($element, $form_state, $field);
-
+
//check for required fields
//if $element['#value'] is empty, it's validated by form.inc
//otherwise we have to check this by our own
@@ -156,9 +151,9 @@ function content_taxonomy_tree_validate($element, &$form_state) {
if (($field['multiple'] >= 2) && (count($element['#value']) > $field['multiple'])) {
form_error($element[$field_key], t('%name: this field cannot hold more than @count values.', array('%name' => t($field['widget']['label']), '@count' => $field['multiple'])));
}
-
+
form_set_value($element, $values, $form_state);
-
+
}
/**
@@ -186,7 +181,7 @@ function content_taxonomy_tree_form2data($element, &$form_state, $field) {
if (!is_array($selected_terms) || !count($selected_terms)) {
$selected_terms[] = NULL;
}
-
+
$form_state['#field_info'][$field['field_name']] = $field;
return content_transpose_array_rows_cols(array($element['#columns'][0] => array_values($selected_terms)));
}
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs.admin.inc b/modules/custom_breadcrumbs/custom_breadcrumbs.admin.inc
index 4280f59..b666cd4 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs.admin.inc
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs.admin.inc
@@ -1,5 +1,4 @@
array('name' => 'asc', 'breadcrumb_type' => 'asc', 'language' => 'asc'),
'column' => 'name'));
- $sort = $custom_breadcrumbs_sort['direction'];
+ $sort = $custom_breadcrumbs_sort['direction'];
$multilingual = _custom_breadcrumbs_multilingual();
$breadcrumbs = array();
// Read session variable to load breadcrumbs of type and language selected by user.
@@ -35,7 +34,7 @@ function custom_breadcrumbs_page() {
}
}
if (empty($modules)) {
- $modules = module_implements('cb_breadcrumb_info');
+ $modules = module_implements('cb_breadcrumb_info');
}
foreach ($modules as $key => $module) {
$more = custom_breadcrumbs_load_breadcrumbs($module, $tables[$key], NULL, $languages);
@@ -61,7 +60,7 @@ function custom_breadcrumbs_page() {
// Add an arrow indicating sort direction.
$image = array($order => theme('tablesort_indicator', $sort[$order]));
- $headers = array();
+ $headers = array();
foreach ($columns as $key => $title) {
$options = array('attributes' => array('title' => t('sort by @s', array('@s' => $title))));
$options['query'] = 'order=' . $key . '&sort=' . $sort[$key];
@@ -90,7 +89,7 @@ function custom_breadcrumbs_page() {
$rows[] = array(array('data' => t('No custom breadcrumbs have been defined.'), 'colspan' => 2 + (int)$multilingual));
}
- $output = drupal_get_form('custom_breadcrumbs_filter_form');
+ $output = drupal_get_form('custom_breadcrumbs_filter_form');
$output .= theme('table', $headers, $rows);
return $output;
}
@@ -105,17 +104,17 @@ function custom_breadcrumbs_page() {
* @param $bc2
* Second breadcrumb object.
*
- * @return
+ * @return
* 0 if the two objects have equal ranking,
* 1 if the first object is greater than the second,
- * -1 if the second object is greater than the first,
+ * -1 if the second object is greater than the first,
*/
function _custom_breadcrumbs_sort_cmp($bc1, $bc2) {
$custom_breadcrumbs_sort = variable_get('custom_breadcrumbs_sort', array(
'direction' => array('name' => 'asc', 'breadcrumb_type' => 'asc', 'language' => 'asc'),
'column' => 'name')
);
- $options = array('name', 'breadcrumb_type', 'language');
+ $options = array('name', 'breadcrumb_type', 'language');
$first = $custom_breadcrumbs_sort['column'];
$keys = array_keys($options, $first);
$key = array_pop($keys);
@@ -130,7 +129,7 @@ function _custom_breadcrumbs_sort_cmp($bc1, $bc2) {
if ($bc1->$options[0] == $bc2->$options[0]) {
if ($bc1->$options[1] == $bc2->$options[1]) {
return 0;
- }
+ }
return ($bc1->$options[1] > $bc2->$options[1]) ? $sortdir[$options[1]] : -1*$sortdir[$options[1]];
}
return ($bc1->$options[0] > $bc2->$options[0]) ? $sortdir[$options[0]] : -1*$sortdir[$options[0]];
@@ -204,7 +203,7 @@ function custom_breadcrumbs_form_validate($form, &$form_state) {
}
else {
// If PHP is used, don't validate number of paths and titles.
- if ((strpos($form_state['values']['titles'], ' ''));
- }
+ }
$form['titles'] = array(
'#type' => 'textarea',
@@ -538,7 +537,7 @@ function custom_breadcrumbs_admin_settings() {
$form['adv_settings']['module_weights']['table'] = custom_breadcrumbs_module_weight();
if (!empty($form['adv_settings']['module_weights']['table'])) {
$form['adv_settings']['module_weights']['table']['#theme'] = 'custom_breadcrumbs_module_weight';
- }
+ }
else {
unset($form['adv_settings']['module_weights']);
}
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs.info b/modules/custom_breadcrumbs/custom_breadcrumbs.info
index 6c42f1e..13b3229 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs.info
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs.info
@@ -1,4 +1,3 @@
-; $Id: custom_breadcrumbs.info,v 1.6.4.1 2009/03/28 21:31:24 mgn Exp $
name = Custom Breadcrumbs
package = Custom Breadcrumbs
description = Allows administrators to define custom breadcrumb trails for node types.
@@ -12,4 +11,3 @@ version = "6.x-2.0-rc1"
core = "6.x"
project = "custom_breadcrumbs"
datestamp = "1294462254"
-
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs.install b/modules/custom_breadcrumbs/custom_breadcrumbs.install
index 60e3c09..5c6b3be 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs.install
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs.install
@@ -1,6 +1,4 @@
handler->view->args array.
*
* @return $arg_values
- * An associative array of two elements, 'types' and 'values', each an array with elements
+ * An associative array of two elements, 'types' and 'values', each an array with elements
* corresponding to the views arguments.
*/
function _custom_breadcrumbs_views_parse_args($arguments, $viewargs) {
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.info b/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.info
index b630dc3..02481b3 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.info
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.info
@@ -1,4 +1,3 @@
-; $Id: custom_breadcrumbs_identifiers.info,v 1.1.2.1 2010/04/25 19:50:50 mgn Exp $
name = Custom Breadcrumbs Identifiers
package = Custom Breadcrumbs
description = Provides special identifiers for custom breadcrumbs.
@@ -10,4 +9,3 @@ version = "6.x-2.0-rc1"
core = "6.x"
project = "custom_breadcrumbs"
datestamp = "1294462254"
-
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.module b/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.module
index 743f8cd..a499d24 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.module
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.module
@@ -1,6 +1,4 @@
1) {
foreach ($terms as $term) {
- // Only consider terms in the lightest vocabulary.
+ // Only consider terms in the lightest vocabulary.
if (!isset($vid)) {
$vid = $term->vid;
}
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.info b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.info
index babfa43..5d5046c 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.info
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.info
@@ -1,4 +1,3 @@
-; $Id: custom_breadcrumbs_taxonomy.info,v 1.1.2.2 2009/05/30 22:02:07 mgn Exp $
name = Custom Breadcrumbs for Taxonomy
description = "Enables taxonomy based breadcrumbs and allows for node assosciations with taxonomy terms."
package = Custom Breadcrumbs
@@ -11,4 +10,3 @@ version = "6.x-2.0-rc1"
core = "6.x"
project = "custom_breadcrumbs"
datestamp = "1294462254"
-
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.install b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.install
index cc8a0c7..a6cd619 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.install
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.install
@@ -1,6 +1,4 @@
array('bid'),
);
-
+
$schema['custom_breadcrumbs_taxonomy_vocabulary'] = array(
'description' => 'Stores custom breadcrumbs for taxonomy vocabularies',
'fields' => array(
@@ -211,6 +209,6 @@ function custom_breadcrumbs_taxonomy_update_6200() {
$ret = array();
db_add_field($ret, 'custom_breadcrumbs_taxonomy_term', 'name', array('type' => 'varchar', 'length' => 128, 'NOT NULL' => FALSE, 'description' => 'An optional name for the custom breadcrumb.'));
db_add_field($ret, 'custom_breadcrumbs_taxonomy_vocabulary', 'name', array('type' => 'varchar', 'length' => 128, 'NOT NULL' => FALSE, 'description' => 'An optional name for the custom breadcrumb.'));
-
+
return $ret;
}
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
index d8b8502..183e2a4 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module
@@ -1,6 +1,4 @@
> term >> term
* home >> vocabulary >> term >> term
* vocabulary >> term >> term
- *
- * If 'Use taxonomy hierarchy' is not checked, then the titles and paths used to
+ *
+ * If 'Use taxonomy hierarchy' is not checked, then the titles and paths used to
* construct the breadcrumb should be defined at the custom_breadcrumbs administration
* page in the same as other custom breadcrumbs. For a node containing multiple terms
* and vocabularies, the lightest term with a visible, matching custom breadcrumb is
@@ -52,14 +50,14 @@ define('CUSTOM_BREADCRUMBS_TAXONOMY_NODE_TYPES_DEFAULT', 'book');
function custom_breadcrumbs_taxonomy_cb_breadcrumb_info() {
$breadcrumb_type_info = array();
$breadcrumb_type_info['taxonomy_vocabulary'] = array(
- 'table' => 'custom_breadcrumbs_taxonomy_vocabulary',
- 'field' => 'vid',
+ 'table' => 'custom_breadcrumbs_taxonomy_vocabulary',
+ 'field' => 'vid',
'type' => 'taxonomy_vocabulary',
'name_constructor' => '_custom_breadcrumbs_taxonomy_vocabulary_breadcrumb_name'
);
$breadcrumb_type_info['taxonomy_term'] = array(
- 'table' => 'custom_breadcrumbs_taxonomy_term',
- 'field' => 'tid',
+ 'table' => 'custom_breadcrumbs_taxonomy_term',
+ 'field' => 'tid',
'type' => 'taxonomy_term',
'name_constructor' => '_custom_breadcrumbs_taxonomy_term_breadcrumb_name'
);
@@ -71,7 +69,7 @@ function custom_breadcrumbs_taxonomy_cb_breadcrumb_info() {
*
* @param $breadcrumb
* The breadcrumb object.
- *
+ *
* @return
* A text string that will be used as the breadcrumb name.
*/
@@ -79,11 +77,11 @@ function _custom_breadcrumbs_taxonomy_term_breadcrumb_name($breadcrumb) {
$names = array();
$parents = taxonomy_get_parents_all($breadcrumb->tid);
while ($parent = array_shift($parents)) {
- $names[] = $parent->name;
+ $names[] = $parent->name;
}
$term = taxonomy_get_term($breadcrumb->tid);
$vocabulary = taxonomy_vocabulary_load($term->vid);
- $names[] = $vocabulary->name;
+ $names[] = $vocabulary->name;
$names = array_reverse($names);
$output = implode('>', $names);
return $output;
@@ -94,7 +92,7 @@ function _custom_breadcrumbs_taxonomy_term_breadcrumb_name($breadcrumb) {
*
* @param $breadcrumb
* The breadcrumb object.
- *
+ *
* @return
* A text string that will be used as the breadcrumb name.
*/
@@ -449,7 +447,7 @@ function custom_breadcrumbs_taxonomy_form_taxonomy_form_term_alter(&$form, &$for
/**
* Implements hook_cb_node_form_table.
*
- * @param $node
+ * @param $node
* The node object being edited
*
* @return $breadcrumbs
@@ -482,7 +480,7 @@ function custom_breadcrumbs_taxonomy_cb_node_form_table($node) {
}
/**
- * Determines if the current node is one of the types listed on the advanced settings page.
+ * Determines if the current node is one of the types listed on the advanced settings page.
*
* @param $nodetype
* The node type being considered for a custom breadcrumb.
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.info b/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.info
index 73edf8f..003c843 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.info
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.info
@@ -1,4 +1,3 @@
-; $Id: custom_breadcrumbs_views.info,v 1.1.2.1 2009/03/29 04:36:45 mgn Exp $
name = Custom Breadcrumbs for Views
package = Custom Breadcrumbs
dependencies[] = custom_breadcrumbs
@@ -14,4 +13,3 @@ version = "6.x-2.0-rc1"
core = "6.x"
project = "custom_breadcrumbs"
datestamp = "1294462254"
-
diff --git a/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.install b/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.install
index eb8f883..71c324b 100644
--- a/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.install
+++ b/modules/custom_breadcrumbs/custom_breadcrumbs_views/custom_breadcrumbs_views.install
@@ -1,5 +1,4 @@
title) ? $node->title : (isset($field['widget']['thumbnail_link_title']) ? $field['widget']['thumbnail_link_title'] : variable_get('emvideo_default_thumbnail_link_title', t('See video')))));
-
+
$destination = 'video-cck/lightbox2/'. $node->nid .'/'. $field['widget']['video_width'] .'/'. $field['widget']['video_height'] .'/'. $field['field_name'] .'/'. $item['provider'] .'/'. $item['value'];
$width = $field['widget']['video_width'] + 20;
$height = $field['widget']['video_height'] + 20;
@@ -548,4 +546,3 @@ function theme_lightbox2_emvideo($field, $item, $formatter, $node, $options = ar
$output = l($thumbnail, $destination, $attributes);
return $output;
}
-
diff --git a/modules/lightbox2/lightbox2.info b/modules/lightbox2/lightbox2.info
index 3938d8b..23fe1a7 100644
--- a/modules/lightbox2/lightbox2.info
+++ b/modules/lightbox2/lightbox2.info
@@ -1,4 +1,3 @@
-; $Id: lightbox2.info,v 1.1.6.4 2008/07/14 11:51:34 snpower Exp $
name = Lightbox2
description = Enables Lightbox2 for Drupal
package = User interface
diff --git a/modules/lightbox2/lightbox2.insert.inc b/modules/lightbox2/lightbox2.insert.inc
index 6e89a02..f2aa951 100644
--- a/modules/lightbox2/lightbox2.insert.inc
+++ b/modules/lightbox2/lightbox2.insert.inc
@@ -1,6 +1,4 @@
'Roles',
'page callback' => 'drupal_get_form',
@@ -91,7 +89,7 @@ function role_delegation_roles_form(&$form_state, $account) {
'#type' => 'submit',
'#value' => t('Submit'),
);
-
+
drupal_set_title(check_plain($account->name));
return $form;
}
@@ -105,7 +103,7 @@ function role_delegation_roles_form_submit($form, &$form_state) {
$myroles = array();
$rolenames = user_roles(TRUE);
foreach (array_keys(array_filter($form_state['values']['roles'])) as $rid) {
- $myroles[$rid] = $rolenames[$rid];
+ $myroles[$rid] = $rolenames[$rid];
}
user_save($account, array('roles' => $myroles));
@@ -244,7 +242,7 @@ function role_delegation_user($op, &$edit, &$account, $category = NULL) {
}
if (empty($roles_options)) {
// No role can be assigned.
- return;
+ return;
}
// Generate the form items.
$form['roles_preserve'] = array(
diff --git a/modules/storm/storminvoice/storminvoice.module b/modules/storm/storminvoice/storminvoice.module
index 105f5fc..d3d74fb 100644
--- a/modules/storm/storminvoice/storminvoice.module
+++ b/modules/storm/storminvoice/storminvoice.module
@@ -883,7 +883,7 @@ function storminvoice_admin_settings() {
$form['storminvoice_tcpdf_location'] = array(
'#type' => 'textfield',
'#title' => t('Location of tcpdf library'),
- '#default_value' => variable_get('storminvoice_tcpdf_location', t('libraries/tcpdf')),
+ '#default_value' => variable_get('storminvoice_tcpdf_location', 'libraries/tcpdf'),
'#description' => t('The directory that contains the TCPDF library (libraries/tcpdf is recommended).'),
'#size' => 50,
);
diff --git a/modules/storm/stormtimetracking/stormtimetracking.admin.inc b/modules/storm/stormtimetracking/stormtimetracking.admin.inc
index 2ae6356..84f4441 100644
--- a/modules/storm/stormtimetracking/stormtimetracking.admin.inc
+++ b/modules/storm/stormtimetracking/stormtimetracking.admin.inc
@@ -426,4 +426,3 @@ function stormtimetracking_list_report($report, $language) {
print theme('stormtimetracking_list_report', $report, $language, $timetrackings);
}
-
diff --git a/modules/storm/stormtimetracking/stormtimetracking.module b/modules/storm/stormtimetracking/stormtimetracking.module
index 697b70b..ece7129 100644
--- a/modules/storm/stormtimetracking/stormtimetracking.module
+++ b/modules/storm/stormtimetracking/stormtimetracking.module
@@ -202,7 +202,7 @@ function stormtimetracking_menu() {
$items['timetrackings/report/%/%'] = array(
'title' => 'Timetrackings',
'description' => 'SuiteDesk timetrackings',
- 'page arguments' => array(3, 4),
+ 'page arguments' => array(2, 3),
'page callback' => 'stormtimetracking_list_report',
'access arguments' => array('Storm timetracking: access'),
'type' => MENU_CALLBACK,
diff --git a/modules/view_revisions_by_content_type/view_revisions_by_content_type.info b/modules/view_revisions_by_content_type/view_revisions_by_content_type.info
index ac9e0fd..5e4585f 100644
--- a/modules/view_revisions_by_content_type/view_revisions_by_content_type.info
+++ b/modules/view_revisions_by_content_type/view_revisions_by_content_type.info
@@ -1,4 +1,3 @@
-; $Id: view_revisions_by_content_type.info,v 1.1 2009/09/27 22:07:01 wimleers Exp $
name = View revisions by content type
description = "Provides per-content type 'view revisions' permissions."
package = Core - extended
diff --git a/modules/views/css/views-tabs.css b/modules/views/css/views-tabs.css
index e884e07..ef1979d 100644
--- a/modules/views/css/views-tabs.css
+++ b/modules/views/css/views-tabs.css
@@ -1,5 +1,3 @@
-/* $Id */
-
.ui-tabs-hide {
- display: none;
+ display: none;
}
diff --git a/modules/views/modules/node/views_handler_field_node_path.inc b/modules/views/modules/node/views_handler_field_node_path.inc
index 6deff88..d88a2f4 100644
--- a/modules/views/modules/node/views_handler_field_node_path.inc
+++ b/modules/views/modules/node/views_handler_field_node_path.inc
@@ -1,5 +1,4 @@
diff --git a/modules/watcher/watcher.info b/modules/watcher/watcher.info
index 0ac01d1..11ac8f9 100644
--- a/modules/watcher/watcher.info
+++ b/modules/watcher/watcher.info
@@ -1,4 +1,3 @@
-; $Id: watcher.info,v 1.2.4.2 2009/02/26 17:03:48 solipsist Exp $
name = "Watcher"
description = "Watcher enables your site's users to watch nodes for changes and new comments and be notified about them."
package = Core - extended
diff --git a/modules/watcher/watcher.install b/modules/watcher/watcher.install
index bb8d773..1cb897e 100644
--- a/modules/watcher/watcher.install
+++ b/modules/watcher/watcher.install
@@ -1,5 +1,4 @@
array('uid'),
);
-
+
return $schema;
}
diff --git a/modules/watcher/watcher.module b/modules/watcher/watcher.module
index 77c7518..e895e4b 100644
--- a/modules/watcher/watcher.module
+++ b/modules/watcher/watcher.module
@@ -1,5 +1,4 @@