[Vtigercrm-commits] [vtiger-commits] r10151 - /vtigercrm/branches/5.0.3/modules/Calendar/Activity.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Feb 7 02:34:54 EST 2007
Author: saraj
Date: Wed Feb 7 00:34:49 2007
New Revision: 10151
Log:
fix for foreach warning in Activity.php --Minnie
Modified:
vtigercrm/branches/5.0.3/modules/Calendar/Activity.php
Modified: vtigercrm/branches/5.0.3/modules/Calendar/Activity.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/Activity.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/Activity.php Wed Feb 7 00:34:49 2007
@@ -150,7 +150,7 @@
}
//Inserting into sales man activity rel
- $this->insertIntoSmActivityRel($module,$invitees_array);
+ $this->insertIntoSmActivityRel($module);
@@ -338,7 +338,7 @@
* @param $module -- module:: Type varchar
*/
- function insertIntoSmActivityRel($module,$invitees_array)
+ function insertIntoSmActivityRel($module)
{
global $adb;
global $current_user;
@@ -347,15 +347,20 @@
$adb->query($sql);
}
$sql_qry = "insert into vtiger_salesmanactivityrel (smid,activityid) values(".$this->column_fields['assigned_user_id'].",".$this->id.")";
- foreach($invitees_array as $inviteeid)
- {
- if($inviteeid != '')
- {
- $query="insert into vtiger_salesmanactivityrel values(".$inviteeid.",".$this->id.")";
- $adb->query($query);
- }
- }
$adb->query($sql_qry);
+ if(isset($_REQUEST['inviteesid']) && $_REQUEST['inviteesid']!='')
+ {
+ $selected_users_string = $_REQUEST['inviteesid'];
+ $invitees_array = explode(';',$selected_users_string);
+ foreach($invitees_array as $inviteeid)
+ {
+ if($inviteeid != '')
+ {
+ $query="insert into vtiger_salesmanactivityrel values(".$inviteeid.",".$this->id.")";
+ $adb->query($query);
+ }
+ }
+ }
}
More information about the vtigercrm-commits
mailing list