[Vtigercrm-commits] [vtiger-commits] r6273 - /vtigercrm/trunk/modules/Calendar/Calendar.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun May 21 07:47:47 EDT 2006
Author: saraj
Date: Sun May 21 05:47:44 2006
New Revision: 6273
Log:
code added to support hour format if user is not selected the format
Modified:
vtigercrm/trunk/modules/Calendar/Calendar.php
Modified: vtigercrm/trunk/modules/Calendar/Calendar.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/Calendar.php (original)
+++ vtigercrm/trunk/modules/Calendar/Calendar.php Sun May 21 05:47:44 2006
@@ -135,12 +135,23 @@
function add_Activities($current_user,$free_busy='')
{
- $this->hour_format = $current_user->hour_format;
- list($sthour,$stmin)= explode(":",$current_user->start_hour);
- $hr = $sthour+0;
- list($endhour,$endmin)=explode(":",$current_user->end_hour);
- $this->day_start_hour=$hr;
- $this->day_end_hour=$endhour;
+ if($this->hour_format == '')
+ $this->hour_format = 'am/pm';
+ else
+ $this->hour_format = $current_user->hour_format;
+ if($current_user->start_hour == '' || $current_user->end_hour)
+ {
+ $this->day_start_hour = 8;
+ $this->day_end_hour = 18;
+ }
+ else
+ {
+ list($sthour,$stmin)= explode(":",$current_user->start_hour);
+ $hr = $sthour+0;
+ list($endhour,$endmin)=explode(":",$current_user->end_hour);
+ $this->day_start_hour=$hr;
+ $this->day_end_hour=$endhour;
+ }
if ( $this->view == 'week')
{
$start_datetime = $this->date_time->getThisweekDaysbyIndex(0);
More information about the vtigercrm-commits
mailing list