[Vtigercrm-commits] [vtiger-commits] r9315 - /vtigercrm/trunk/modules/Calendar/Appointment.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Sep 6 05:51:16 EDT 2006


Author: saraj
Date: Wed Sep  6 03:51:12 2006
New Revision: 9315

Log:
changes made to differentiate shared events form others --Minnie

Modified:
    vtigercrm/trunk/modules/Calendar/Appointment.php

Modified: vtigercrm/trunk/modules/Calendar/Appointment.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/Appointment.php (original)
+++ vtigercrm/trunk/modules/Calendar/Appointment.php Wed Sep  6 03:51:12 2006
@@ -36,6 +36,7 @@
 	var $formatted_datetime;
 	var $duration_min;
 	var $duration_hour;
+	var $shared = false;
 
 	function Appointment()
 	{
@@ -127,7 +128,7 @@
          */
 	function readResult($act_array, $view)
 	{
-		global $adb;
+		global $adb,$current_user;
 		$format_sthour='';
                 $format_stmin='';
 		$this->description       = $act_array["description"];
@@ -150,6 +151,11 @@
 		{
 			$this->assignedto ="user";
 			$this->ownerid = $act_array["smownerid"];
+			if(!is_admin($current_user))
+			{
+				if($act_array["smownerid"] != $current_user->id)
+					$this->shared = true;
+			}
 			$this->owner   = getUserName($act_array["smownerid"]);
 			$query="SELECT cal_color FROM vtiger_users where id = ".$this->ownerid;
 			$result=$adb->query($query);





More information about the vtigercrm-commits mailing list