[Vtigercrm-commits] [vtiger-commits] r7202 - in /vtigercrm/branches/4.2: include/ListView/ListView.php include/utils.php modules/Accounts/ListView.php modules/Notes/ListView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Jun 16 17:33:18 EDT 2006


Author: jrydbeck
Date: Fri Jun 16 15:33:12 2006
New Revision: 7202

Log:
Continued work on bug #748.

Modified:
    vtigercrm/branches/4.2/include/ListView/ListView.php
    vtigercrm/branches/4.2/include/utils.php
    vtigercrm/branches/4.2/modules/Accounts/ListView.php
    vtigercrm/branches/4.2/modules/Notes/ListView.php

Modified: vtigercrm/branches/4.2/include/ListView/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/include/ListView/ListView.php (original)
+++ vtigercrm/branches/4.2/include/ListView/ListView.php Fri Jun 16 15:33:12 2006
@@ -598,6 +598,7 @@
 }
 
 //session_start();
+$order_by = '';
 if (isset($_REQUEST['order_by'])) {
 	$order_by = $_REQUEST['order_by'];
 	$_SESSION["ListViewOrder[$currentModule_name][0]"] = $order_by;

Modified: vtigercrm/branches/4.2/include/utils.php
==============================================================================
--- vtigercrm/branches/4.2/include/utils.php (original)
+++ vtigercrm/branches/4.2/include/utils.php Fri Jun 16 15:33:12 2006
@@ -892,6 +892,7 @@
         $theme_path="themes/".$theme."/";
         $image_path=$theme_path."images/";
 	$fieldlabel = from_html($fieldlabel);
+	$filename = '';
 
 	//Commented for vulnerability fix as the convertion is added in Peardatabase - Philip
         //$value = htmlentities($col_fields[$fieldname]);
@@ -3030,6 +3031,7 @@
 function getListViewEntries($focus, $module,$list_result,$navigation_array,$relatedlist='',$returnset='',$edit_action='EditView',$del_action='Delete',$oCv='')
 {
 	global $adb, $theme, $app_strings;
+	$filename = '';
 	
 	$noofrows = $adb->num_rows($list_result);
 	$list_header = '<script>
@@ -3237,8 +3239,6 @@
 		$mod_dir=getModuleDirName($module);
 		if(isPermitted($module,1,$entity_id) == 'yes')
 		{
-
-
 			$list_header .='<a href="index.php?action='.$edit_action.'&module='.$mod_dir.'&record='.$entity_id.$returnset.'&filename='.$filename.'">'.$app_strings['LNK_EDIT'].'</a>&nbsp;|&nbsp;';
 		}
 		if(isPermitted($module,2,$entity_id) == 'yes')

Modified: vtigercrm/branches/4.2/modules/Accounts/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Accounts/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Accounts/ListView.php Fri Jun 16 15:33:12 2006
@@ -233,8 +233,14 @@
 	$search_form->assign("MOD", $current_module_strings);
 	$search_form->assign("APP", $app_strings);
 
-	if ($order_by !='') $search_form->assign("ORDER_BY", $order_by);
-	if ($sorder !='') $search_form->assign("SORDER", $sorder);
+	if ($order_by !='')
+	{
+		$search_form->assign("ORDER_BY", $order_by);
+	}
+	if ($sorder !='')
+	{
+		$search_form->assign("SORDER", $sorder);
+	}
 
 	$search_form->assign("VIEWID",$viewid);
 	
@@ -325,7 +331,7 @@
 	<input name="viewname" type="hidden" value="'.$viewid.'">'; //give the viewid to hidden //customview
 if(isPermitted('Accounts',2,'') == 'yes')
 {
-        $other_text .=	'<td width="10"><input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/></td>';
+        $other_text .=	'<td width="10"><input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/></td>';
 }
 if(isset($CActionDtls))
 {
@@ -357,9 +363,9 @@
 	<span class="sep">|</span>
 	<a href="index.php?module=Accounts&action=CustomView" class="link">'.$app_strings['LNK_CV_CREATEVIEW'].'</a>';
 }
-	$other_text .='<td align="right">'.$app_strings[LBL_VIEW].'
+	$other_text .='<td align="right">'.$app_strings['LBL_VIEW'].'
                         <SELECT NAME="view" onchange="showDefaultCustomView(this)">
-                                <OPTION VALUE="0">'.$mod_strings[LBL_ALL].'</option>
+                                <OPTION VALUE="0">'.$mod_strings['LBL_ALL'].'</option>
 				'.$customviewcombo_html.'
                         </SELECT>
 			'.$cvHTML.'
@@ -441,7 +447,7 @@
 $start_rec = $navigation_array['start'];
 $end_rec = $navigation_array['end_val'];
 
-$record_string= $app_strings[LBL_SHOWING]." " .$start_rec." - ".$end_rec." " .$app_strings[LBL_LIST_OF] ." ".$noofrows;
+$record_string= $app_strings['LBL_SHOWING']." " .$start_rec." - ".$end_rec." " .$app_strings['LBL_LIST_OF'] ." ".$noofrows;
 
 //Retreive the List View Table Header
 if($viewid !='')

Modified: vtigercrm/branches/4.2/modules/Notes/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Notes/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Notes/ListView.php Fri Jun 16 15:33:12 2006
@@ -150,7 +150,7 @@
 	<td>';
 if(isPermitted('Notes',2,'') == 'yes')
 {
-        $other_text .='<input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/>';
+        $other_text .='<input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/>';
 }
 
 if($viewid == 0)
@@ -168,9 +168,9 @@
 <a href="index.php?module=Notes&action=CustomView" class="link">'.$app_strings['LNK_CV_CREATEVIEW'].'</a>';
 }
 
-$other_text .='<td align="right">'.$app_strings[LBL_VIEW].'
+$other_text .='<td align="right">'.$app_strings['LBL_VIEW'].'
                         <SELECT NAME="view" onchange="showDefaultCustomView(this)">
-                                <OPTION VALUE="0">'.$mod_strings[LBL_ALL].'</option>
+                                <OPTION VALUE="0">'.$mod_strings['LBL_ALL'].'</option>
 				'.$customviewcombo_html.'
                         </SELECT>
 			'.$cvHTML.'
@@ -238,22 +238,27 @@
 	</script>";
 
 //Retreiving the start value from request
-if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
-        $start = $_REQUEST['start'];
-} else {
-        $start = 1;
-}
+if(isset($_REQUEST['start']) && $_REQUEST['start'] != '')
+{
+	$start = $_REQUEST['start'];
+}
+else
+{
+	$start = 1;
+}
+
 //Retreive the Navigation array
 $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);
 $start_rec = $navigation_array['start'];
 $end_rec = $navigation_array['end_val'];
 
-$record_string= $app_strings[LBL_SHOWING]." " .$start_rec." - ".$end_rec." " .$app_strings[LBL_LIST_OF] ." ".$noofrows;
-
+$record_string= $app_strings['LBL_SHOWING']." " .$start_rec." - ".$end_rec." " .$app_strings['LBL_LIST_OF'] ." ".$noofrows;
 
 //Retreive the List View Table Header
 if($viewid !='')
-$url_string .="&viewname=".$viewid;
+{
+	$url_string .="&viewname=".$viewid;
+}
 
 $listview_header = getListViewHeader($focus,"Notes",$url_string,$sorder,$order_by,"",$oCustomView);
 $xtpl->assign("LISTHEADER", $listview_header);
@@ -264,9 +269,13 @@
 $xtpl->assign("SELECT_SCRIPT", $view_script);
 
 if($order_by !='')
-$url_string .="&order_by=".$order_by;
+{
+	$url_string .="&order_by=".$order_by;
+}
 if($sorder !='')
-$url_string .="&sorder=".$sorder;
+{
+	$url_string .="&sorder=".$sorder;
+}
 
 $navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Notes","index",$viewid);
 $xtpl->assign("NAVIGATION", $navigationOutput);
@@ -275,5 +284,4 @@
 $xtpl->parse("main");
 $xtpl->out("main");
 
-
 ?>





More information about the vtigercrm-commits mailing list