[Vtigercrm-commits] [vtiger-commits] r7242 - in /vtigercrm/branches/4.2: ./ include/ include/database/ include/language/ modules/Accounts/ modules/Activities/ modules/Activities/language/ modules/Calendar/ modules/Contacts/ modules/Emails/ modules/HelpDesk/ modules/Leads/ modules/Potentials/ modules/Products/ modules/Quotes/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Jun 17 17:03:52 EDT 2006
Author: jrydbeck
Date: Sat Jun 17 15:03:33 2006
New Revision: 7242
Log:
Additional fixes on bug #748. Most ListView's no longer produce notices. There are some that will give errors (including 2 notices on the homepage); but for the most part things are a lot cleaner.
Modified:
vtigercrm/branches/4.2/include/database/PearDatabase.php
vtigercrm/branches/4.2/include/language/en_us.lang.php
vtigercrm/branches/4.2/include/utils.php
vtigercrm/branches/4.2/index.php
vtigercrm/branches/4.2/modules/Accounts/ListView.php
vtigercrm/branches/4.2/modules/Activities/ListView.php
vtigercrm/branches/4.2/modules/Activities/language/en_us.lang.php
vtigercrm/branches/4.2/modules/Calendar/webelements.p3
vtigercrm/branches/4.2/modules/Contacts/ListView.php
vtigercrm/branches/4.2/modules/Contacts/index.php
vtigercrm/branches/4.2/modules/Emails/ListView.php
vtigercrm/branches/4.2/modules/HelpDesk/ListView.php
vtigercrm/branches/4.2/modules/Leads/ListView.php
vtigercrm/branches/4.2/modules/Potentials/Charts.php
vtigercrm/branches/4.2/modules/Potentials/ListView.php
vtigercrm/branches/4.2/modules/Products/ListView.php
vtigercrm/branches/4.2/modules/Products/index.php
vtigercrm/branches/4.2/modules/Quotes/ListView.php
Modified: vtigercrm/branches/4.2/include/database/PearDatabase.php
==============================================================================
--- vtigercrm/branches/4.2/include/database/PearDatabase.php (original)
+++ vtigercrm/branches/4.2/include/database/PearDatabase.php Sat Jun 17 15:03:33 2006
@@ -436,17 +436,20 @@
/* ADODB newly added. replacement for mysql_result() */
function query_result(&$result, $row, $col=0)
- {
+ {
+ $return_val = null;
+
if($result->_numOfRows > $row)
{
$result->Move($row);
$rowdata = $this->change_key_case($result->FetchRow());
- return to_html($rowdata[$col]);
- }
- else
- {
- return to_html(null);
- }
+ if(isset($rowdata[$col]))
+ {
+ return to_html($rowdata[$col]);
+ }
+ }
+
+ return to_html($return_val);
}
/* ADODB Converted
Modified: vtigercrm/branches/4.2/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/4.2/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/4.2/include/language/en_us.lang.php Sat Jun 17 15:03:33 2006
@@ -738,7 +738,7 @@
'LBL_JSCALENDAR_LANG'=>'en',
'LNK_CV_EDIT'=>'Edit',
'LNK_CV_DELETE'=>'Delete',
-'LNK_CV_CREATEVIEW'=>'Create View',
+'LNK_CV_CREATEVIEW'=>'Create View'
);
Modified: vtigercrm/branches/4.2/include/utils.php
==============================================================================
--- vtigercrm/branches/4.2/include/utils.php (original)
+++ vtigercrm/branches/4.2/include/utils.php Sat Jun 17 15:03:33 2006
@@ -189,11 +189,14 @@
$temp_app_list_strings = $app_list_strings;
$language_used = $language;
- @include("include/language/$language.lang.php");
if(!isset($app_list_strings))
{
+ @include("include/language/$language.lang.php");
+ }
+ if(!isset($app_list_strings))
+ {
$log->warn("Unable to find the application language file for language: ".$language);
- require("include/language/$default_language.lang.php");
+ @include("include/language/$default_language.lang.php");
$language_used = $default_language;
}
@@ -221,11 +224,14 @@
$temp_app_strings = $app_strings;
$language_used = $language;
- @include("include/language/$language.lang.php");
if(!isset($app_strings))
{
+ @include("include/language/$language.lang.php");
+ }
+ if(!isset($app_strings))
+ {
$log->warn("Unable to find the application language file for language: ".$language);
- require("include/language/$default_language.lang.php");
+ @include("include/language/$default_language.lang.php");
$language_used = $default_language;
}
@@ -269,11 +275,14 @@
$temp_mod_strings = $mod_strings;
$language_used = $language;
- @include("modules/$module/language/$language.lang.php");
if(!isset($mod_strings))
{
+ @include("include/language/$language.lang.php");
+ }
+ if(!isset($mod_strings))
+ {
$log->warn("Unable to find the module language file for language: ".$language." and module: ".$module);
- require("modules/$module/language/$default_language.lang.php");
+ @include("modules/$module/language/$default_language.lang.php");
$language_used = $default_language;
}
@@ -315,8 +324,10 @@
return $mod_list_strings;
}
- @include("modules/$module/language/$language.lang.php");
-
+ if(!isset($mod_list_strings))
+ {
+ @include("include/language/$language.lang.php");
+ }
if(!isset($mod_list_strings))
{
$log->fatal("Unable to load the application list language file for the selected language($language) or the default language($default_language)");
@@ -340,14 +351,16 @@
$language_used = $language;
- @include("themes/$theme/language/$current_language.lang.php");
if(!isset($theme_strings))
{
+ @include("themes/$theme/language/$current_language.lang.php");
+ }
+ if(!isset($theme_strings))
+ {
$log->warn("Unable to find the theme file for language: ".$language." and theme: ".$theme);
- require("themes/$theme/language/$default_language.lang.php");
+ @include("themes/$theme/language/$default_language.lang.php");
$language_used = $default_language;
}
-
if(!isset($theme_strings))
{
$log->fatal("Unable to load the theme($theme) language file for the selected language($language) or the default language($default_language)");
@@ -2710,11 +2723,11 @@
}
else
{
- if($app_strings[$name])
+ if(isset($app_strings[$name]))
{
$name = $app_strings[$name];
}
- elseif($mod_strings[$name])
+ elseif(isset($mod_strings[$name]))
{
$name = $mod_strings[$name];
}
Modified: vtigercrm/branches/4.2/index.php
==============================================================================
--- vtigercrm/branches/4.2/index.php (original)
+++ vtigercrm/branches/4.2/index.php Sat Jun 17 15:03:33 2006
@@ -86,7 +86,7 @@
$permissionData = $_SESSION['action_permission_set'];
$defSharingPermissionData = $_SESSION['defaultaction_sharing_permission_set'];
- $others_permission_id = $defSharingPermissionData[$tabid];
+ $others_permission_id = isset($defSharingPermissionData[$tabid])? $defSharingPermissionData[$tabid] : 0;
$i=0;
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 Sat Jun 17 15:03:33 2006
@@ -233,11 +233,11 @@
$search_form->assign("MOD", $current_module_strings);
$search_form->assign("APP", $app_strings);
- if ($order_by !='')
+ if($order_by !='')
{
$search_form->assign("ORDER_BY", $order_by);
}
- if ($sorder !='')
+ if($sorder !='')
{
$search_form->assign("SORDER", $sorder);
}
@@ -245,7 +245,7 @@
$search_form->assign("VIEWID",$viewid);
$search_form->assign("JAVASCRIPT", get_clear_form_js());
- if($order_by != '') {
+ if(isset($order_by) && $order_by != '') {
$ordby = "&order_by=".$order_by;
}
else
Modified: vtigercrm/branches/4.2/modules/Activities/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Activities/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Activities/ListView.php Sat Jun 17 15:03:33 2006
@@ -209,15 +209,17 @@
<input name="change_owner" type="hidden">
<input name="change_status" type="hidden">
<td>';
-if(isPermitted("Activities",2,$_REQUEST['record']) == '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_CHANGE_OWNER].'" onclick="this.form.change_owner.value=\'true\'; return changeStatus()"/>
- <input class="button" type="submit" value="'.$app_strings[LBL_CHANGE_STATUS].'" onclick="this.form.change_status.value=\'true\'; return changeStatus()"/--></td>
- <td align="right">'.$app_strings[LBL_VIEW].'
+
+if(isPermitted("Activities",2,isset($_REQUEST['record'])? $_REQUEST['record'] : null) == 'yes')
+//if(isPermitted("Activities",2,$_REQUEST['record']) == '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_CHANGE_OWNER'].'" onclick="this.form.change_owner.value=\'true\'; return changeStatus()"/>
+ <input class="button" type="submit" value="'.$app_strings['LBL_CHANGE_STATUS'].'" onclick="this.form.change_status.value=\'true\'; return changeStatus()"/--></td>
+ <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.'
@@ -327,7 +329,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/Activities/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Activities/language/en_us.lang.php (original)
+++ vtigercrm/branches/4.2/modules/Activities/language/en_us.lang.php Sat Jun 17 15:03:33 2006
@@ -60,6 +60,7 @@
'LBL_LIST_ACCOUNT'=>'Account',
'LBL_LIST_RELATED_TO'=>'Related to',
'LBL_LIST_DUE_DATE'=>'Due Date',
+//'LBL_LIST_DUE_TIME'=>'Due Time',
'LBL_LIST_DATE'=>'Date',
'LBL_LIST_SUBJECT'=>'Subject',
'LBL_LIST_LAST_MODIFIED'=>'Last Modified',
Modified: vtigercrm/branches/4.2/modules/Calendar/webelements.p3
==============================================================================
--- vtigercrm/branches/4.2/modules/Calendar/webelements.p3 (original)
+++ vtigercrm/branches/4.2/modules/Calendar/webelements.p3 Sat Jun 17 15:03:33 2006
@@ -435,7 +435,7 @@
$msg .= "\n";
}
}
- error_log($msg,3,$tutos[errlog]);
+ error_log($msg,3,isset($tutos[errlog]) ? $tutos[errlog] : '');
return;
}
/* ---------------------------------------------------------------------------
Modified: vtigercrm/branches/4.2/modules/Contacts/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Contacts/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Contacts/ListView.php Sat Jun 17 15:03:33 2006
@@ -321,11 +321,11 @@
if(isPermitted('Contacts',2,'') == 'yes')
{
-$other_text .='<td width="12"><input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/>';
+$other_text .='<td width="12"><input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/>';
}
if(isset($CActionDtls))
{
- $other_text .='<td><input class="button" type="submit" value="'.$app_strings[LBL_SEND_MAIL_BUTTON].'" onclick="return massMail()"/>';
+ $other_text .='<td><input class="button" type="submit" value="'.$app_strings['LBL_SEND_MAIL_BUTTON'].'" onclick="return massMail()"/>';
}
if($viewid == 0)
{
@@ -342,9 +342,9 @@
<a href="index.php?module=Contacts&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.'
@@ -413,7 +413,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/Contacts/index.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Contacts/index.php (original)
+++ vtigercrm/branches/4.2/modules/Contacts/index.php Sat Jun 17 15:03:33 2006
@@ -33,7 +33,7 @@
echo "<tr><td class='formOuterBorder' style='padding: 10px'>";
echo "<ul>";
include('modules/Import/ImportButton.php');
-echo "<li><a href='index.php?module=Contacts&action=AddBusinessCard&return_module=Contacts&return_action=ListView'>".$mod_strings[LBL_ADD_BUSINESSCARD]."</a></li>";
+echo "<li><a href='index.php?module=Contacts&action=AddBusinessCard&return_module=Contacts&return_action=ListView'>".$mod_strings['LBL_ADD_BUSINESSCARD']."</a></li>";
echo "</ul>";
echo "</td></tr></table>";
Modified: vtigercrm/branches/4.2/modules/Emails/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Emails/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Emails/ListView.php Sat Jun 17 15:03:33 2006
@@ -65,7 +65,7 @@
$listView = $filename;
$classname = "tabOff";
}
- elseif($_REQUEST['smodule'] && stristr($label,$_REQUEST['smodule']))
+ elseif(isset($_REQUEST['smodule']) && stristr($label,$_REQUEST['smodule']))
{
echo '<td class="tabOn" nowrap><a href="index.php?module=squirrelmail-1.4.4&action=redirect&smodule='.$_REQUEST['smodule'].'" class="tabLink">'.$mod_strings[$label].'</a></td>';
$listView = $filename;
@@ -166,7 +166,7 @@
<td>';
if(isPermitted('Emails',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()"/>';
}
$other_text .= '</td>';
@@ -185,9 +185,9 @@
<a href="index.php?module=Emails&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.'
@@ -325,7 +325,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/HelpDesk/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/HelpDesk/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/HelpDesk/ListView.php Sat Jun 17 15:03:33 2006
@@ -47,19 +47,23 @@
$url_string = ''; // assigning http url string
+$date_criteria = isset($_REQUEST['date_crit'])? $_REQUEST['date_crit'] : '';
+$date = isset($_REQUEST['date'])? $_REQUEST['date'] : '';
+$current_user_only = isset($_REQUEST['current_user_only'])? $_REQUEST['current_user_only'] : '';
+
+
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
{
// we have a query
$url_string .="&query=true";
- if (isset($_REQUEST['ticket_title'])) $name = $_REQUEST['ticket_title'];
- if (isset($_REQUEST['ticket_id'])) $ticket_id_val = $_REQUEST['ticket_id'];
- if (isset($_REQUEST['contact_name'])) $contact_name = $_REQUEST['contact_name'];
- if (isset($_REQUEST['priority'])) $priority = $_REQUEST['priority'];
- if (isset($_REQUEST['status'])) $status = $_REQUEST['status'];
- if (isset($_REQUEST['category'])) $category = $_REQUEST['category'];
- if (isset($_REQUEST['date'])) $date = $_REQUEST['date'];
- if (isset($_REQUEST['current_user_only'])) $current_user_only = $_REQUEST['current_user_only'];
-
+
+ $name = isset($_REQUEST['ticket_title'])? $_REQUEST['ticket_title'] : '';
+ $ticket_id_val = isset($_REQUEST['ticket_id'])? $_REQUEST['ticket_id'] : '';
+ $contact_name = isset($_REQUEST['contact_name'])? $_REQUEST['contact_name'] : '';
+ $priority = isset($_REQUEST['priority'])? $_REQUEST['priority'] : '';
+ $status = isset($_REQUEST['status'])? $_REQUEST['status'] : '';
+ $category = isset($_REQUEST['category'])? $_REQUEST['category'] : '';
+
$where_clauses = Array();
//Added for Custom Field Search
@@ -116,7 +120,6 @@
}
if (isset($date) && $date !='')
{
- $date_criteria = $_REQUEST['date_crit'];
$format_date = getDBInsertDateValue($date);
if($date_criteria == 'is')
{
@@ -278,7 +281,7 @@
<input name="viewname" type="hidden" value="'.$viewid.'">';
if(isPermitted('HelpDesk',2,'') == 'yes')
{
- $other_text .='<td><input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/></td>';
+ $other_text .='<td><input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/></td>';
}
/*$other_text .='<td align="right">'.$app_strings[LBL_VIEW].'
<SELECT NAME="view" onchange="showDefaultCustomView(this)">
@@ -307,9 +310,9 @@
<a href="index.php?module=HelpDesk&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.'
@@ -408,7 +411,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/Leads/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Leads/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Leads/ListView.php Sat Jun 17 15:03:33 2006
@@ -306,16 +306,16 @@
<td>';
if(isPermitted('Leads',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(isPermitted('Leads',1,'') == 'yes')
{
- $other_text .= '<input class="button" type="submit" value="'.$app_strings[LBL_CHANGE_OWNER].'" onclick="this.form.change_owner.value=\'true\'; return changeStatus()"/>
- <input class="button" type="submit" value="'.$app_strings[LBL_CHANGE_STATUS].'" onclick="this.form.change_status.value=\'true\'; return changeStatus()"/>';
+ $other_text .= '<input class="button" type="submit" value="'.$app_strings['LBL_CHANGE_OWNER'].'" onclick="this.form.change_owner.value=\'true\'; return changeStatus()"/>
+ <input class="button" type="submit" value="'.$app_strings['LBL_CHANGE_STATUS'].'" onclick="this.form.change_status.value=\'true\'; return changeStatus()"/>';
}
if(isset($CActionDtls))
{
- $other_text .=' <input class="button" type="submit" value="'.$app_strings[LBL_SEND_MAIL_BUTTON].'" onclick="return massMail()"/>';
+ $other_text .=' <input class="button" type="submit" value="'.$app_strings['LBL_SEND_MAIL_BUTTON'].'" onclick="return massMail()"/>';
}
/*$other_text .= '</td>
<td align="right">'.$app_strings[LBL_VIEW].'
@@ -344,9 +344,9 @@
<span class="sep">|</span>
<a href="index.php?module=Leads&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.'
@@ -420,7 +420,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/Potentials/Charts.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Potentials/Charts.php (original)
+++ vtigercrm/branches/4.2/modules/Potentials/Charts.php Sat Jun 17 15:03:33 2006
@@ -266,7 +266,7 @@
// Setup title
$curr_symbol = getCurrencySymbol();
$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
- $title->setText($titleStr);
+ $title->setText($titlestr);
// Create the xaxis labels
$array_data =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array',
@@ -1261,7 +1261,8 @@
}
// retrieve the translated strings.
-$app_strings = return_application_language($current_language);
+// not needed, these variables are already loaded...
+//$app_strings = return_application_language($current_language);
if(isset($app_strings['LBL_CHARSET']))
{
Modified: vtigercrm/branches/4.2/modules/Potentials/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Potentials/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Potentials/ListView.php Sat Jun 17 15:03:33 2006
@@ -284,7 +284,7 @@
<input name="viewname" type="hidden" value="'.$viewid.'">';
if(isPermitted('Potentials',2,'') == 'yes')
{
- $other_text .='<td><input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/></td>';
+ $other_text .='<td><input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/></td>';
}
/*$other_text .='<td align="right">'.$app_strings[LBL_VIEW].'
<SELECT NAME="view" onchange="showDefaultCustomView(this)">
@@ -313,9 +313,9 @@
<a href="index.php?module=Potentials&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.'
@@ -410,7 +410,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/Products/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Products/ListView.php Sat Jun 17 15:03:33 2006
@@ -50,19 +50,19 @@
if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
{
$url_string .="&query=true";
- if (isset($_REQUEST['productname'])) $productname = $_REQUEST['productname'];
- if (isset($_REQUEST['productcode'])) $productcode = $_REQUEST['productcode'];
- if (isset($_REQUEST['commissionrate'])) $commissionrate = $_REQUEST['commissionrate'];
- if (isset($_REQUEST['qtyperunit'])) $qtyperunit = $_REQUEST['qtyperunit'];
- if (isset($_REQUEST['unitprice'])) $unitprice = $_REQUEST['unitprice'];
- if (isset($_REQUEST['manufacturer'])) $manufacturer = $_REQUEST['manufacturer'];
- if (isset($_REQUEST['productcategory'])) $productcategory = $_REQUEST['productcategory'];
- if (isset($_REQUEST['start_date'])) $start_date = $_REQUEST['start_date'];
- if (isset($_REQUEST['expiry_date'])) $expiry_date = $_REQUEST['expiry_date'];
- if (isset($_REQUEST['purchase_date'])) $purchase_date = $_REQUEST['purchase_date'];
-
+
+ $productname = isset($_REQUEST['productname'])? $_REQUEST['productname'] : '';
+ $productcode = isset($_REQUEST['productcode'])? $_REQUEST['productcode'] : '';
+ $commissionrate = isset($_REQUEST['commissionrate'])? $_REQUEST['commissionrate'] : '';
+ $qtyperunit = isset($_REQUEST['qtyperunit'])? $_REQUEST['qtyperunit'] : '';
+ $unitprice = isset($_REQUEST['unitprice'])? $_REQUEST['unitprice'] : '';
+ $manufacturer = isset($_REQUEST['manufacturer'])? $_REQUEST['manufacturer'] : '';
+ $productcategory = isset($_REQUEST['productcategory'])? $_REQUEST['productcategory'] : '';
+ $start_date = isset($_REQUEST['start_date'])? $_REQUEST['start_date'] : '';
+ $expiry_date = isset($_REQUEST['expiry_date'])? $_REQUEST['expiry_date'] : '';
+ $purchase_date = isset($_REQUEST['purchase_date'])? $_REQUEST['purchase_date'] : '';
+
$where_clauses = Array();
- //$search_query='';
//Added for Custom Field Search
$sql="select * from field where tablename='productcf' order by fieldlabel";
@@ -88,70 +88,75 @@
}
//upto this added for Custom Field
- if (isset($productname) && $productname !='')
+ if($productname !='')
{
array_push($where_clauses, "productname ".$adb->getLike()." ".$adb->quote($productname.'%'));
- //$search_query .= " and productname ".$adb->getLike()." '".$productname."%'";
$url_string .= "&productname=".$productname;
}
- if (isset($productcode) && $productcode !='')
+ if($productcode !='')
{
array_push($where_clauses, "productcode ".$adb->getLike()." ".$adb->quote($productcode.'%'));
//$search_query .= " and productcode ".$adb->getLike()." '".$productcode."%'";
$url_string .= "&productcode=".$productcode;
}
- if (isset($commissionrate) && $commissionrate !='')
+ if($commissionrate !='')
{
array_push($where_clauses, "commissionrate ".$adb->getLike()." ".$adb->quote($commissionrate.'%'));
//$search_query .= " and commissionrate ".$adb->getLike()." '".$commissionrate."%'";
$url_string .= "&commissionrate=".$commissionrate;
}
- if (isset($qtyperunit) && $qtyperunit !='')
+ if($qtyperunit !='')
{
array_push($where_clauses, "qty_per_unit ".$adb->getLike()." ".$adb->quote($qtyperunit.'%'));
//$search_query .= " and qty_per_unit ".$adb->getLike()." '".$qtyperunit."%'";
$url_string .= "&qtyperunit=".$qtyperunit;
}
- if (isset($unitprice) && $unitprice !='')
+ if($unitprice !='')
{
array_push($where_clauses, "unit_price ".$adb->getLike()." ".$adb->quote($unitprice.'%'));
// $search_query .= " and unit_price ".$adb->getLike()." '".$unitprice."%'";
$url_string .= "&unitprice=".$unitprice;
}
- if (isset($manufacturer) && $manufacturer !='' && $manufacturer !='--None--')
+
+ if($manufacturer !='' && $manufacturer !='--None--')
{
array_push($where_clauses, "manufacturer ".$adb->getLike()." ".$adb->quote($manufacturer.'%'));
//$search_query .= " and manufacturer ".$adb->getLike()." '".$manufacturer."%'";
$url_string .= "&manufacturer=".$manufacturer;
}
- if (isset($productcategory) && $productcategory !='' && $productcategory !='--None--')
+
+ if($productcategory !='' && $productcategory !='--None--')
{
array_push($where_clauses, "productcategory ".$adb->getLike()." ".$adb->quote($productcategory.'%'));
//$search_query .= " and productcategory ".$adb->getLike()." '".$productcategory."%'";
$url_string .= "&productcategory=".$productcategory;
}
- if (isset($start_date) && $start_date !='')
- {
+
+ if($start_date !='')
+ {
array_push($where_clauses, "start_date ".$adb->getLike()." ".$adb->quote($start_date.'%'));
- //$search_query .= " and start_date = '".$start_date."%'";
- $url_string .= "&start_date=".$start_date;
- }
- if (isset($expiry_date) && $expiry_date !='')
- {
+ //$search_query .= " and start_date = '".$start_date."%'";
+ $url_string .= "&start_date=".$start_date;
+ }
+
+ if($expiry_date !='')
+ {
array_push($where_clauses, "expiry_date ".$adb->getLike()." ".$adb->quote($expiry_date.'%'));
- //$search_query .= " and expiry_date = '".$expiry_date."%'";
- $url_string .= "&expiry_date=".$expiry_date;
- }
- if (isset($purchase_date) && $purchase_date !='')
- {
+ //$search_query .= " and expiry_date = '".$expiry_date."%'";
+ $url_string .= "&expiry_date=".$expiry_date;
+ }
+
+ if($purchase_date !='')
+ {
array_push($where_clauses, "purchase_date ".$adb->getLike()." ".$adb->quote($purchase_date.'%'));
- //$search_query .= " and purchase_date = '".$purchase_date."%'";
- $url_string .= "&purchase_date=".$purchase_date;
- }
+ //$search_query .= " and purchase_date = '".$purchase_date."%'";
+ $url_string .= "&purchase_date=".$purchase_date;
+ }
+
$where = "";
foreach($where_clauses as $clause)
{
@@ -286,11 +291,11 @@
<input name="viewname" type="hidden" value="'.$viewid.'">';
if(isPermitted('Products',2,'') == 'yes')
{
- $other_text .='<td><input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/></td>';
-}
- $other_text .='<td align="right">'.$app_strings[LBL_VIEW].'
+ $other_text .='<td><input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/></td>';
+}
+ $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.'
@@ -352,7 +357,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/Products/index.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Products/index.php (original)
+++ vtigercrm/branches/4.2/modules/Products/index.php Sat Jun 17 15:03:33 2006
@@ -88,7 +88,7 @@
if($permissionData[$cur_tabid][3] ==0)
{
list($lbl,$sname,$title)=split("_",$label);
- if(stristr($label,$_REQUEST['smodule']))
+ if(stristr($label,isset($_REQUEST['smodule'])? $_REQUEST['smodule'] : null))
{
echo '<td class="tabOn" nowrap><a href="index.php?module=Products&action=index&smodule='.$_REQUEST['smodule'].'" class="tabLink">'.$mod_strings[$label].'</a></td>';
$listView = $filename;
@@ -116,7 +116,7 @@
</table>
<?
-if($_REQUEST['smodule']=='' || $_REQUEST['smodule']=="PRODUCTS")
+if(!isset($_REQUEST['smodule']) || $_REQUEST['smodule']=='' || $_REQUEST['smodule']=="PRODUCTS")
{
echo "<br><table width='250' cellpadding=0 cellspacing=0><tr><td>";
echo get_form_header($mod_strings['LBL_TOOL_FORM_TITLE'], "", false);
Modified: vtigercrm/branches/4.2/modules/Quotes/ListView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/Quotes/ListView.php (original)
+++ vtigercrm/branches/4.2/modules/Quotes/ListView.php Sat Jun 17 15:03:33 2006
@@ -231,7 +231,7 @@
<td>';
if(isPermitted('Quotes',2,'') == 'yes')
{
- $other_text .= '<input class="button" type="submit" value="'.$app_strings[LBL_MASS_DELETE].'" onclick="return massDelete()"/></td>';
+ $other_text .= '<input class="button" type="submit" value="'.$app_strings['LBL_MASS_DELETE'].'" onclick="return massDelete()"/></td>';
}
if($viewid == 0)
@@ -248,9 +248,9 @@
<span class="sep">|</span>
<a href="index.php?module=Quotes&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.'
@@ -323,7 +323,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 !='')
More information about the vtigercrm-commits
mailing list