[TEP-COMMIT] [CVS catalog] use the new database class
hpdl-OfajU3CKLf1/[email protected] 24 Feb 2005 00:48:58 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog/includes/modules/order_total</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">ot_loworderfee.php</a></tt></td><td align="right" id="added">+17</td><td align="right" id="removed">-11</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php?rev=1.13&content-type=text/vnd.viewcvs-markup">1.13</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php.diff?r1=1.13&r2=1.14">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php?rev=1.14&content-type=text/vnd.viewcvs-markup">1.14</a></td></tr>
<tr class="alt"><td><tt><a href="#file2">ot_shipping.php</a></tt></td><td align="right" id="added">+15</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php?rev=1.17&content-type=text/vnd.viewcvs-markup">1.17</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php.diff?r1=1.17&r2=1.18">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php?rev=1.18&content-type=text/vnd.viewcvs-markup">1.18</a></td></tr>
<tr><td><tt><a href="#file3">ot_subtotal.php</a></tt></td><td align="right" id="added">+12</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php.diff?r1=1.8&r2=1.9">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a></td></tr>
<tr class="alt"><td><tt><a href="#file4">ot_tax.php</a></tt></td><td align="right" id="added">+12</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php?rev=1.15&content-type=text/vnd.viewcvs-markup">1.15</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php.diff?r1=1.15&r2=1.16">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php?rev=1.16&content-type=text/vnd.viewcvs-markup">1.16</a></td></tr>
<tr><td><tt><a href="#file5">ot_total.php</a></tt></td><td align="right" id="added">+12</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php.diff?r1=1.8&r2=1.9">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a></td></tr>
<tr><td></td><td align="right" id="added">+68</td><td align="right" id="removed">-38</td><td></td></tr>
</table>
<small id="info">5 modified files</small><br />
<pre class="comment">
use the new database class
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total">order_total</a><br /></span>
<div class="fileheader"><big><b>ot_loworderfee.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php?rev=1.13&content-type=text/vnd.viewcvs-markup">1.13</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php.diff?r1=1.13&r2=1.14">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_loworderfee.php?rev=1.14&content-type=text/vnd.viewcvs-markup">1.14</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.13 -r1.14
--- ot_loworderfee.php 2003/12/18 23:52:15 1.13
+++ ot_loworderfee.php 2005/02/24 00:48:55 1.14
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -55,8 +55,7 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS');
</pre><pre class="diff" id="context"> }
return $this->_check;
</pre><pre class="diff"><small id="info">@@ -67,17 +66,24 @@
</small></pre><pre class="diff" id="context"> }
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS', 'true', 'Do you want to display the low order fee?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE', 'false', 'Do you want to allow low order fees?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee For Orders Under', 'MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER', '50', 'Add the low order fee to orders under this amount.', '6', '4', 'currencies->format', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_FEE', '5', 'Low order fee.', '6', '5', 'currencies->format', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Attach Low Order Fee On Orders Made', 'MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION', 'both', 'Attach low order fee for orders sent to the set destination.', '6', '6', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS', '0', 'Use the following tax class on the low order fee.', '6', '7', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS', 'true', 'Do you want to display the low order fee?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE', 'false', 'Do you want to allow low order fees?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee For Orders Under', 'MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER', '50', 'Add the low order fee to orders under this amount.', '6', '4', 'currencies->format', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_FEE', '5', 'Low order fee.', '6', '5', 'currencies->format', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Attach Low Order Fee On Orders Made', 'MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION', 'both', 'Attach low order fee for orders sent to the set destination.', '6', '6', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS', '0', 'Use the following tax class on the low order fee.', '6', '7', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
}
?>
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total">order_total</a><br /></span>
<div class="fileheader"><big><b>ot_shipping.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php?rev=1.17&content-type=text/vnd.viewcvs-markup">1.17</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php.diff?r1=1.17&r2=1.18">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_shipping.php?rev=1.18&content-type=text/vnd.viewcvs-markup">1.18</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.17 -r1.18
--- ot_shipping.php 2003/12/18 23:52:15 1.17
+++ ot_shipping.php 2005/02/24 00:48:55 1.18
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -69,8 +69,7 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_ORDER_TOTAL_SHIPPING_STATUS');
</pre><pre class="diff" id="context"> }
return $this->_check;
</pre><pre class="diff"><small id="info">@@ -81,15 +80,22 @@
</small></pre><pre class="diff" id="context"> }
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true', 'Do you want to display the order shipping cost?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Do you want to allow free shipping?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true', 'Do you want to display the order shipping cost?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '2', 'Sort order of display.', '6', '2', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Do you want to allow free shipping?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
}
?>
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total">order_total</a><br /></span>
<div class="fileheader"><big><b>ot_subtotal.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php.diff?r1=1.8&r2=1.9">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_subtotal.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- ot_subtotal.php 2003/12/18 23:52:15 1.8
+++ ot_subtotal.php 2005/02/24 00:48:56 1.9
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -33,8 +33,7 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS');
</pre><pre class="diff" id="context"> }
return $this->_check;
</pre><pre class="diff"><small id="info">@@ -45,12 +44,19 @@
</small></pre><pre class="diff" id="context"> }
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '1', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER', '1', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
}
?>
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total">order_total</a><br /></span>
<div class="fileheader"><big><b>ot_tax.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php?rev=1.15&content-type=text/vnd.viewcvs-markup">1.15</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php.diff?r1=1.15&r2=1.16">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_tax.php?rev=1.16&content-type=text/vnd.viewcvs-markup">1.16</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.15 -r1.16
--- ot_tax.php 2003/12/18 23:52:15 1.15
+++ ot_tax.php 2005/02/24 00:48:56 1.16
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -38,8 +38,7 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TAX_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_ORDER_TOTAL_TAX_STATUS');
</pre><pre class="diff" id="context"> }
return $this->_check;
</pre><pre class="diff"><small id="info">@@ -50,12 +49,19 @@
</small></pre><pre class="diff" id="context"> }
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Tax', 'MODULE_ORDER_TOTAL_TAX_STATUS', 'true', 'Do you want to display the order tax value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '3', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Tax', 'MODULE_ORDER_TOTAL_TAX_STATUS', 'true', 'Do you want to display the order tax value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TAX_SORT_ORDER', '3', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
}
?>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total">order_total</a><br /></span>
<div class="fileheader"><big><b>ot_total.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php?rev=1.8&content-type=text/vnd.viewcvs-markup">1.8</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php.diff?r1=1.8&r2=1.9">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/order_total/ot_total.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.8 -r1.9
--- ot_total.php 2003/12/18 23:52:15 1.8
+++ ot_total.php 2005/02/24 00:48:56 1.9
@@ -5,7 +5,7 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">5</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff"><small id="info">@@ -33,8 +33,7 @@
</small></pre><pre class="diff" id="context">
function check() {
if (!isset($this->_check)) {
</pre><pre class="diff" id="removed">- $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TOTAL_STATUS'");
- $this->_check = tep_db_num_rows($check_query);
</pre><pre class="diff" id="added">+ $this->_check = defined('MODULE_ORDER_TOTAL_TOTAL_STATUS');
</pre><pre class="diff" id="context"> }
return $this->_check;
</pre><pre class="diff"><small id="info">@@ -45,12 +44,19 @@
</small></pre><pre class="diff" id="context"> }
function install() {
</pre><pre class="diff" id="removed">- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
- tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())");
+ $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
</pre><pre class="diff" id="context"> }
function remove() {
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
</pre><pre class="diff" id="added">+ global $osC_Database;
+
+ $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
+ $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
+ $Qdel->bindRaw(':configuration_key', implode('", "', $this->keys()));
+ $Qdel->execute();
</pre><pre class="diff" id="context"> }
}
?>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click