[Vtigercrm-commits] [vtiger-commits] r9772 - in /vtigercrm/branches/5.0.3: Smarty/templates/ProfileDetailView.tpl include/utils/UserInfoUtil.php modules/Users/profilePrivileges.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Nov 6 04:41:49 EST 2006


Author: richie
Date: Mon Nov  6 02:41:42 2006
New Revision: 9772

Log:
error during profile creation - fixed. Fixes #2529

Modified:
    vtigercrm/branches/5.0.3/Smarty/templates/ProfileDetailView.tpl
    vtigercrm/branches/5.0.3/include/utils/UserInfoUtil.php
    vtigercrm/branches/5.0.3/modules/Users/profilePrivileges.php

Modified: vtigercrm/branches/5.0.3/Smarty/templates/ProfileDetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ProfileDetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ProfileDetailView.tpl Mon Nov  6 02:41:42 2006
@@ -139,11 +139,11 @@
 							<table celspacing="0" align="center" bgcolor="white" border="0" cellpadding="5" width="100%">
 								<tr>
 								<td align="right" width="25%" style="padding-right:10px;" nowrap><b>{$APP.LBL_PROFILE_NAME} :</b></td>
-								<td align="left" width="75%" style="padding-right:10px;"><input id = "profile_name" name="profile_name" class="txtBox" value="{$Profile_Name}" type="text"></td>
+								<td align="left" width="75%" style="padding-right:10px;"><input id = "profile_name" name="profile_name" class="txtBox" value="{$PROFILE_NAME}" type="text"></td>
 								</tr>
 								<tr>
                                                                 <td align="right" width="25%" style="padding-right:10px;" nowrap><b>{$APP.LBL_DESCRIPTION} :</b></td>
-                                                                <td align="left" width="75%" style="padding-right:10px;"><textarea name="description" id = "description" class="txtBox">{$Profile_Description} </textarea></td>
+                                                                <td align="left" width="75%" style="padding-right:10px;"><textarea name="description" id = "description" class="txtBox">{$PROFILE_DESCRIPTION} </textarea></td>
                                                                 </tr>
 							</table>
 						</td>

Modified: vtigercrm/branches/5.0.3/include/utils/UserInfoUtil.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/UserInfoUtil.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/UserInfoUtil.php Mon Nov  6 02:41:42 2006
@@ -1359,7 +1359,7 @@
         $sql1 = "select  description from vtiger_profile where profileid=".$profileid;
         $result = $adb->query($sql1);
         $profileDescription = $adb->query_result($result,0,"description");
-        $log->debug("Exiting getProfileName method ...");
+        $log->debug("Exiting getProfileDescription method ...");
         return $profileDescription;
 }
 

Modified: vtigercrm/branches/5.0.3/modules/Users/profilePrivileges.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/profilePrivileges.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/profilePrivileges.php Mon Nov  6 02:41:42 2006
@@ -21,6 +21,8 @@
 $image_path=$theme_path."images/";
 $profileId=$_REQUEST['profileid'];
 $profileName='';
+$profileDescription='';
+
 $parentProfileId=$_REQUEST['parentprofile'];
 if($_REQUEST['mode'] =='create' && $_REQUEST['radiobutton'] != 'baseprofile')
 	$parentProfileId = '';
@@ -66,14 +68,16 @@
 
 if(isset($_REQUEST['profile_description']) && $_REQUEST['profile_description'] != '' && $_REQUEST['mode'] == 'create')
 	
-	$smarty->assign("PROFILE_DESCRIPTION",$_REQUEST['profile_description']);
+	$profileDescription = $_REQUEST['profile_description'];
 else
 {
-	$profileDescription = getProfileDescription($profileId);
-}
-
-$smarty->assign("Profile_Name", $profileName);
-$smarty->assign("Profile_Description", $profileDescription);
+	if($profileId != null)
+	{
+		$profileDescription = getProfileDescription($profileId);
+	}
+}
+
+$smarty->assign("PROFILE_DESCRIPTION", $profileDescription);
 
 if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != '')
 	$smarty->assign("MODE",$_REQUEST['mode']);





More information about the vtigercrm-commits mailing list