[Vtigercrm-commits] [vtiger-commits] r7148 - in /vtigercrm/branches/4.2: include/ListView/ListView.php include/utils.php install/2setConfig.php modules/Contacts/ListView.php modules/CustomView/CustomView.php themes/blue/header.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 15 12:08:28 EDT 2006
Author: jrydbeck
Date: Thu Jun 15 10:08:20 2006
New Revision: 7148
Log:
Begin fixing variable undefined errors for bug #748. This is an ongoing effort so fixes will be incremental.
Modified:
vtigercrm/branches/4.2/include/ListView/ListView.php
vtigercrm/branches/4.2/include/utils.php
vtigercrm/branches/4.2/install/2setConfig.php
vtigercrm/branches/4.2/modules/Contacts/ListView.php
vtigercrm/branches/4.2/modules/CustomView/CustomView.php
vtigercrm/branches/4.2/themes/blue/header.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 Thu Jun 15 10:08:20 2006
@@ -597,20 +597,20 @@
break;
}
-session_start();
+//session_start();
if (isset($_REQUEST['order_by'])) {
$order_by = $_REQUEST['order_by'];
$_SESSION["ListViewOrder[$currentModule_name][0]"] = $order_by;
-} elseif ($_SESSION["ListViewOrder[$currentModule_name][0]"] != '') {
- $order_by = $_SESSION["ListViewOrder[$currentModule_name][0]"];
+} elseif (isset($_SESSION['ListViewOrder']) && $_SESSION['ListViewOrder[$currentModule_name][0]'] != '') {
+ $order_by = $_SESSION['ListViewOrder[$currentModule_name][0]'];
}
$sorder = 'ASC';
if(isset($_REQUEST['sorder']) && $_REQUEST['sorder'] != '') {
$sorder = $_REQUEST['sorder'];
- $_SESSION["ListViewOrder[$currentModule_name][1]"] = $sorder;
-} elseif ($_SESSION["ListViewOrder[$currentModule_name][1]"] != '') {
- $sorder = $_SESSION["ListViewOrder[$currentModule_name][1]"];
+ $_SESSION['ListViewOrder[$currentModule_name][1]'] = $sorder;
+} elseif (isset($_SESSION['ListViewOrder']) && $_SESSION['ListViewOrder[$currentModule_name][1]'] != '') {
+ $sorder = $_SESSION['ListViewOrder[$currentModule_name][1]'];
}
Modified: vtigercrm/branches/4.2/include/utils.php
==============================================================================
--- vtigercrm/branches/4.2/include/utils.php (original)
+++ vtigercrm/branches/4.2/include/utils.php Thu Jun 15 10:08:20 2006
@@ -4160,28 +4160,51 @@
//parameter $viewid added for customview 27/5
function AlphabeticalSearch($module,$action,$fieldname,$query,$type,$popuptype='',$recordid='',$return_module='',$append_url='',$viewid='')
{
- /* for access to alphabetical_search values stored in /include/$lang.language.php */
- global $app_list_strings;
+ /* for access to alphabetical_search values stored in /include/$lang.language.php */
+ global $app_list_strings;
if($type=='advanced')
- $flag='&advanced=true';
+ {
+ $flag = '&advanced=true';
+ }
+ else
+ {
+ $flag = '';
+ }
if($popuptype != '')
- $popuptypevalue = "&popuptype=".$popuptype;
-
- if($recordid != '')
- $returnvalue = '&recordid='.$recordid;
- if($return_module != '')
- $returnvalue .= '&return_module='.$return_module;
+ {
+ $popuptypevalue = '&popuptype='.$popuptype;
+ }
+ else
+ {
+ $popuptypevalue = '';
+ }
+
+ if($return_module != '')
+ {
+ $returnvalue .= '&return_module='.$return_module;
+ }
+ elseif($recordid != '')
+ {
+ $returnvalue = '&recordid='.$recordid;
+ }
+ else
+ {
+ $returnvalue = '';
+ }
+
// gettin' values
$alphabetical_search_values = & $app_list_strings['alphabetical_search_values'];
/* world alphabets has different count of letters. Plus we can add "special" (multucharacter) values in alphabetical seach bar */
- $count = count($alphabetical_search_values);
+ $count = count($alphabetical_search_values);
// building alphabetical search bar from array values
- for($i =0;$i<=$count;$i++)
- $list .= '<td class="alphaBg"><a href="index.php?module='.$module.'&action='.$action.'&viewname='.$viewid.'&query='.$query.'&'.$fieldname.'='.$alphabetical_search_values[$i].$flag.$popuptypevalue.$returnvalue.$append_url.'">'.$alphabetical_search_values[$i].'</a></td>';
-
+ for($i =0;$i<$count;$i++)
+ {
+ $list = '<td class="alphaBg"><a href="index.php?module='.$module.'&action='.$action.'&viewname='.$viewid.'&query='.$query.'&'.$fieldname.'='.$alphabetical_search_values[$i].$flag.$popuptypevalue.$returnvalue.$append_url.'">'.$alphabetical_search_values[$i].'</a></td>';
+ }
+
return $list;
}
Modified: vtigercrm/branches/4.2/install/2setConfig.php
==============================================================================
--- vtigercrm/branches/4.2/install/2setConfig.php (original)
+++ vtigercrm/branches/4.2/install/2setConfig.php Thu Jun 15 10:08:20 2006
@@ -344,6 +344,7 @@
<select class="dataInput" name="dbtype">
<option value="mysql" <?php echo $dbconfig['db_type'] == 'mysql' ? 'selected' : '' ?>>MySQL</option>
<option value="pgsql" <?php echo $dbconfig['db_type'] == 'pgsql' ? 'selected' : '' ?>>Postgresql</option>
+ <option value="oci8" <?php echo $dbconfig['db_type'] == 'oci8' ? 'selected' : '' ?>>Oracle 8+</option>
</select>
</td>
</tr>
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 Thu Jun 15 10:08:20 2006
@@ -219,13 +219,21 @@
$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 (isset($order_by) && $order_by !='')
+ {
+ $search_form->assign("ORDER_BY", $order_by);
+ }
+
+ if ($sorder !='')
+ {
+ $search_form->assign("SORDER", $sorder);
+ }
$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/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/4.2/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/4.2/modules/CustomView/CustomView.php Thu Jun 15 10:08:20 2006
@@ -97,14 +97,15 @@
function getCustomViewCombo()
{
global $adb;
- $tabid = getTabid($this->customviewmodule);
- $ssql = "select customview.* from customview inner join tab on tab.name = customview.entitytype";
- $ssql .= " where tab.tabid=".$tabid;
- //echo $ssql;
- $result = $adb->query($ssql);
- while($cvrow=$adb->fetch_array($result))
- {
- if($cvrow['setdefault'] == 1)
+ $tabid = getTabid($this->customviewmodule);
+ $ssql = "select customview.* from customview inner join tab on tab.name = customview.entitytype";
+ $ssql .= " where tab.tabid=".$tabid;
+ $result = $adb->query($ssql);
+ $shtml = '';
+
+ while($cvrow=$adb->fetch_array($result))
+ {
+ if($cvrow['setdefault'] == 1)
{
$shtml .= "<option selected value=\"".$cvrow['cvid']."\">".$cvrow['viewname']."</option>";
$this->setdefaultviewid = $cvrow['cvid'];
@@ -113,9 +114,8 @@
{
$shtml .= "<option value=\"".$cvrow['cvid']."\">".$cvrow['viewname']."</option>";
}
- }
- //echo $shtml;
- return $shtml;
+ }
+ return $shtml;
}
function getColumnsListbyBlock($module,$block)
{
Modified: vtigercrm/branches/4.2/themes/blue/header.php
==============================================================================
--- vtigercrm/branches/4.2/themes/blue/header.php (original)
+++ vtigercrm/branches/4.2/themes/blue/header.php Thu Jun 15 10:08:20 2006
@@ -254,15 +254,19 @@
$xtpl->assign("RECENT_LABEL",$row['item_summary']);
- if($row['module_name']=='Activities')
- {
- $sql = 'select activitytype from activity where activityid = '.$row['item_id'];
- $activitytype = $adb->query_result($adb->query($sql),0,'activitytype');
- if($activitytype == 'Task')
- $activity_mode = '&activity_mode=Task';
- elseif($activitytype == 'Call' || $activitytype == 'Meeting')
- $activity_mode = '&activity_mode=Events';
- }
+ if($row['module_name']=='Activities')
+ {
+ $sql = 'select activitytype from activity where activityid = '.$row['item_id'];
+ $activitytype = $adb->query_result($adb->query($sql),0,'activitytype');
+ if($activitytype == 'Task')
+ $activity_mode = '&activity_mode=Task';
+ elseif($activitytype == 'Call' || $activitytype == 'Meeting')
+ $activity_mode = '&activity_mode=Events';
+ }
+ else
+ {
+ $activity_mode = null;
+ }
$url_module = $row['module_name'];
$url_action = 'DetailView';
More information about the vtigercrm-commits
mailing list