[Vtigercrm-commits] [vtiger-commits] r4849 - in /vtigercrm/branches/4.2_postgresql_integration/modules: Notes/Delete.php Products/Delete.php Products/Popup.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 3 15:59:20 EDT 2006
Author: allanbush
Date: Mon Apr 3 13:59:15 2006
New Revision: 4849
Log:
Added some input checking to pervent query errors from missing data. Refs #17.
Modified:
vtigercrm/branches/4.2_postgresql_integration/modules/Notes/Delete.php
vtigercrm/branches/4.2_postgresql_integration/modules/Products/Delete.php
vtigercrm/branches/4.2_postgresql_integration/modules/Products/Popup.php
Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Notes/Delete.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Notes/Delete.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Notes/Delete.php Mon Apr 3 13:59:15 2006
@@ -32,8 +32,10 @@
$sql = 'update notes set contact_id = 0 where notesid = '.$_REQUEST['record'];
$adb->query($sql);
}
-$sql = 'delete from senotesrel where notesid = '.$_REQUEST['record']. ' and crmid = '.$_REQUEST['return_id'];
-$adb->query($sql);
+if($_REQUEST['return_id']) {
+ $sql = 'delete from senotesrel where notesid = '.$_REQUEST['record']. ' and crmid = '.$_REQUEST['return_id'];
+ $adb->query($sql);
+}
$sql_recentviewed ='delete from tracker where user_id = '.$current_user->id.' and item_id = '.$_REQUEST['record'];
$adb->query($sql_recentviewed);
Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Products/Delete.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Products/Delete.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Products/Delete.php Mon Apr 3 13:59:15 2006
@@ -37,7 +37,7 @@
if($_REQUEST['return_module'] == 'Potentials' || $_REQUEST['return_module'] == 'Accounts' || $_REQUEST['return_module'] == 'Leads')
$sql = 'delete from seproductsrel where crmid = '.$_REQUEST['return_id'].' and productid = '.$_REQUEST['record'];
- $adb->query($sql);
+ if($sql) $adb->query($sql);
}
if($_REQUEST['return_module'] == "Contacts")
{
Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Products/Popup.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Products/Popup.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Products/Popup.php Mon Apr 3 13:59:15 2006
@@ -37,7 +37,7 @@
$xtpl->assign("SMODULE",$_REQUEST['smodule']);
$smodule = $_REQUEST['smodule'];
$url_string = '&smodule=VENDOR';
- $search_query .= " and vendor_id=''";
+ $search_query .= " and vendor_id is null";
}
More information about the vtigercrm-commits
mailing list