[TEP-COMMIT] [CVS catalog] keep products special price in memory to save on database queries if it is

hpdl-OfajU3CKLf1/[email protected] 28 Nov 2004 20:49:28 -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</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>boxes/<a href="#file1">specials.php</a></tt></td><td></td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php?rev=1.35&amp;content-type=text/vnd.viewcvs-markup">1.35</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php.diff?r1=1.35&amp;r2=1.36">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php?rev=1.36&amp;content-type=text/vnd.viewcvs-markup">1.36</a></td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file2">whats_new.php</a></tt></td><td align="right" id="added">+4</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php?rev=1.36&amp;content-type=text/vnd.viewcvs-markup">1.36</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php.diff?r1=1.36&amp;r2=1.37">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php?rev=1.37&amp;content-type=text/vnd.viewcvs-markup">1.37</a></td></tr>
<tr><td><tt>classes/<a href="#file3">specials.php</a></tt></td><td align="right" id="added">+67</td><td align="right" id="removed">-34</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr class="alt"><td><tt>modules/<a href="#file4">new_products.php</a></tt></td><td align="right" id="added">+3</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/new_products.php?rev=1.39&amp;content-type=text/vnd.viewcvs-markup">1.39</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/new_products.php.diff?r1=1.39&amp;r2=1.40">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/new_products.php?rev=1.40&amp;content-type=text/vnd.viewcvs-markup">1.40</a></td></tr>
<tr><td><tt>modules/services/<a href="#file5">specials.php</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php?rev=1.3&amp;content-type=text/vnd.viewcvs-markup">1.3</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php.diff?r1=1.3&amp;r2=1.4">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a></td></tr>
<tr><td></td><td align="right" id="added">+79</td><td align="right" id="removed">-49</td><td></td></tr>
</table>
<small id="info">5 modified files</small><br />
<pre class="comment">
keep products special price in memory to save on database queries if it is
shown multiple times on the same page
</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/boxes">boxes</a><br /></span>
<div class="fileheader"><big><b>specials.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php?rev=1.35&amp;content-type=text/vnd.viewcvs-markup">1.35</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php.diff?r1=1.35&amp;r2=1.36">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/specials.php?rev=1.36&amp;content-type=text/vnd.viewcvs-markup">1.36</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.35 -r1.36
--- specials.php	2004/10/31 09:46:13	1.35
+++ specials.php	2004/11/28 20:49:25	1.36
@@ -11,7 +11,6 @@
</small></pre><pre class="diff" id="context"> */
 
   if ($osC_Services-&gt;isStarted('specials')) {
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context">     $Qspecials = $osC_Database-&gt;query('select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from :table_products p, :table_products_description pd, :table_specials s where s.status = 1 and s.products_id = p.products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by s.specials_date_added desc limit :max_random_select_specials');
     $Qspecials-&gt;bindRaw(':table_products', TABLE_PRODUCTS);
     $Qspecials-&gt;bindRaw(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
</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/boxes">boxes</a><br /></span>
<div class="fileheader"><big><b>whats_new.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php?rev=1.36&amp;content-type=text/vnd.viewcvs-markup">1.36</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php.diff?r1=1.36&amp;r2=1.37">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/boxes/whats_new.php?rev=1.37&amp;content-type=text/vnd.viewcvs-markup">1.37</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.36 -r1.37
--- whats_new.php	2004/10/31 09:46:14	1.36
+++ whats_new.php	2004/11/28 20:49:25	1.37
@@ -11,7 +11,7 @@
</small></pre><pre class="diff" id="context"> */
 
   $Qwhatsnew = $osC_Database-&gt;query('select products_id, products_image, products_tax_class_id, products_price from :table_products where products_status = 1 order by products_date_added desc limit :max_random_select_new');
</pre><pre class="diff" id="removed">-  $Qwhatsnew-&gt;bind<span id="removedchars">Raw</span>(':table_products', TABLE_PRODUCTS);
</pre><pre class="diff" id="added">+  $Qwhatsnew-&gt;bind<span id="addedchars">Table</span>(':table_products', TABLE_PRODUCTS);
</pre><pre class="diff" id="context">   $Qwhatsnew-&gt;bindInt(':max_random_select_new', MAX_RANDOM_SELECT_NEW);
 
   if ($Qwhatsnew-&gt;executeRandomMulti()) {
</pre><pre class="diff"><small id="info">@@ -22,18 +22,16 @@
</small></pre><pre class="diff" id="context"> &lt;?php
     $new_products_name = tep_get_products_name($Qwhatsnew-&gt;valueInt('products_id'));
 
</pre><pre class="diff" id="removed">-    if ($osC_Services-&gt;isStarted('specials')) {
-      $new_products_specials_price = $osC_Specials-&gt;getPrice($Qwhatsnew-&gt;valueInt('products_id'));
-    }
-    
</pre><pre class="diff" id="context">     $info_box_contents = array();
     $info_box_contents[] = array('text' =&gt; BOX_HEADING_WHATS_NEW);
 
     new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));
 
     $new_products_price = $osC_Currencies-&gt;displayPrice($Qwhatsnew-&gt;valueDecimal('products_price'), $Qwhatsnew-&gt;valueInt('products_tax_class_id'));
</pre><pre class="diff" id="added">+
+    if ($osC_Services-&gt;isStarted('specials') &amp;&amp; $osC_Specials-&gt;isActive($Qwhatsnew-&gt;valueInt('products_id'))) {
+      $new_products_specials_price = $osC_Specials-&gt;getPrice($Qwhatsnew-&gt;valueInt('products_id'));
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-    if (tep_not_null($new_products_specials_price)) {
</pre><pre class="diff" id="context">       $new_products_price = '&lt;s&gt;' . $new_products_price . '&lt;/s&gt;&amp;nbsp;&lt;span class="productSpecialPrice"&gt;' . $osC_Currencies-&gt;displayPrice($new_products_specials_price, $Qwhatsnew-&gt;valueInt('products_tax_class_id')) . '&lt;/span&gt;';
     }
 
</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/classes">classes</a><br /></span>
<div class="fileheader"><big><b>specials.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/specials.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- specials.php	2004/10/31 09:46:15	1.1
+++ specials.php	2004/11/28 20:49:26	1.2
@@ -12,68 +12,101 @@
</small></pre><pre class="diff" id="context"> 
   class osC_Specials {
 
</pre><pre class="diff" id="removed">-// class constructor
-    function osC_Specials() {
</pre><pre class="diff" id="added">+/* Private variables */
+
+    var $_specials = array();
+
+/* Class constructor */
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      $this-&gt;expireSpecials();
-      $this-&gt;activateSpecials();
</pre><pre class="diff" id="added">+    function osC_Specials() {
</pre><pre class="diff" id="context">     }
 
</pre><pre class="diff" id="removed">-    function expireSpecials() {
-      global $osC_Database, $osC_Session;
</pre><pre class="diff" id="added">+/* Public methods */
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      $Qspecials = $osC_Database-&gt;query('select specials_id from :table_specials where status = 1 and now() &gt;= expires_date and expires_date &gt; 0');
-      $Qspecials-&gt;bindRaw(':table_specials', TABLE_SPECIALS);
</pre><pre class="diff" id="added">+    function activateAll() {
+      global $osC_Database;
+
+      $Qspecials = $osC_Database-&gt;query('select specials_id from :table_specials where status = 0 and now() &gt;= start_date and start_date &gt; 0 and now() &lt; expires_date');
+      $Qspecials-&gt;bindTable(':table_specials', TABLE_SPECIALS);
</pre><pre class="diff" id="context">       $Qspecials-&gt;execute();
 
       while ($Qspecials-&gt;next()) {
</pre><pre class="diff" id="removed">-        $this-&gt;setStatus($Qspecials-&gt;valueInt('specials_id'), '0');
</pre><pre class="diff" id="added">+        $this-&gt;_setStatus($Qspecials-&gt;valueInt('specials_id'), true);
</pre><pre class="diff" id="context">       }
</pre><pre class="diff" id="removed">-    
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context">       $Qspecials-&gt;freeResult();
     }
 
</pre><pre class="diff" id="removed">-    function activateSpecials() {
-      global $osC_Database, $osC_Session;
</pre><pre class="diff" id="added">+    function expireAll() {
+      global $osC_Database;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      $Qspecials = $osC_Database-&gt;query('select specials_id from :table_specials where status = 0 and now() &gt;= start_date and start_date &gt; 0 and now() &lt; expires_date');
-      $Qspecials-&gt;bindRaw(':table_specials', TABLE_SPECIALS);
</pre><pre class="diff" id="added">+      $Qspecials = $osC_Database-&gt;query('select specials_id from :table_specials where status = 1 and now() &gt;= expires_date and expires_date &gt; 0');
+      $Qspecials-&gt;bindTable(':table_specials', TABLE_SPECIALS);
</pre><pre class="diff" id="context">       $Qspecials-&gt;execute();
 
       while ($Qspecials-&gt;next()) {
</pre><pre class="diff" id="removed">-        $this-&gt;setStatus($Qspecials-&gt;valueInt('specials_id'), '1');
</pre><pre class="diff" id="added">+        $this-&gt;_setStatus($Qspecials-&gt;valueInt('specials_id'), false);
</pre><pre class="diff" id="context">       }
</pre><pre class="diff" id="removed">-    
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context">       $Qspecials-&gt;freeResult();
     }
 
</pre><pre class="diff" id="removed">-    function setStatus($specials_id, $status) {
</pre><pre class="diff" id="added">+    function isActive($id) {
</pre><pre class="diff" id="context">       global $osC_Database;
</pre><pre class="diff" id="added">+
+      if (isset($this-&gt;_specials[$id]) === false) {
+        $Qcheck = $osC_Database-&gt;query('select products_id from :table_specials where products_id = :products_id and status = 1');
+        $Qcheck-&gt;bindTable(':table_specials', TABLE_SPECIALS);
+        $Qcheck-&gt;bindInt(':products_id', $id);
+        $Qcheck-&gt;execute();
+
+        if ($Qcheck-&gt;numberOfRows() &gt; 0) {
+          $this-&gt;_specials[$id] = true;
+        } else {
+          $this-&gt;_specials[$id] = false;
+        }
+
+        $Qcheck-&gt;freeResult();
+      }
+
+      if ($this-&gt;_specials[$id] !== false) {
+        return true;
+      }
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      $QspecialsStatus = $osC_Database-&gt;query('update :table_specials set status = :status, date_status_change = now() where specials_id = :specials_id');
-      $QspecialsStatus-&gt;bindRaw(':table_specials', TABLE_SPECIALS);
-      $QspecialsStatus-&gt;bindInt(':status', $status);
-      $QspecialsStatus-&gt;bindInt(':specials_id', $specials_id);
-      $QspecialsStatus-&gt;execute();
</pre><pre class="diff" id="added">+      return false;
</pre><pre class="diff" id="context">     }
 
</pre><pre class="diff" id="removed">-    function getPrice($<span id="removedchars">product_</span>id) {
</pre><pre class="diff" id="added">+    function getPrice($id) {
</pre><pre class="diff" id="context">       global $osC_Database;
 
</pre><pre class="diff" id="removed">-      $Qspecial = $osC_Database-&gt;query('select specials_new_products_price from :table_specials where products_id = :products_id and status = 1');
-      $Qspecial-&gt;bindRaw(':table_specials', TABLE_SPECIALS);
-      $Qspecial-&gt;bindInt(':products_id', $product_id);
-      $Qspecial-&gt;execute();
-
-      if ($Qspecial-&gt;numberOfRows()) {
-        $special_price = $Qspecial-&gt;valueDecimal('specials_new_products_price');
-      } else {
-        $special_price = false;
</pre><pre class="diff" id="added">+      if ( (isset($this-&gt;_specials[$id]) === false) || (isset($this-&gt;_specials[$id]) &amp;&amp; is_bool($this-&gt;_specials[$id])) ) {
+        $Qspecial = $osC_Database-&gt;query('select specials_new_products_price from :table_specials where products_id = :products_id and status = 1');
+        $Qspecial-&gt;bindTable(':table_specials', TABLE_SPECIALS);
+        $Qspecial-&gt;bindInt(':products_id', $id);
+        $Qspecial-&gt;execute();
+
+        if ($Qspecial-&gt;numberOfRows() &gt; 0) {
+          $this-&gt;_specials[$id] = $Qspecial-&gt;valueDecimal('specials_new_products_price');
+        }
+
+        $Qspecial-&gt;freeResult();
</pre><pre class="diff" id="context">       }
</pre><pre class="diff" id="added">+
+      return $this-&gt;_specials[$id];
+    }
+
+/* Private methods */
+
+    function _setStatus($id, $status) {
+      global $osC_Database;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      $Qspecial-&gt;freeResult();
</pre><pre class="diff" id="added">+      $Qstatus = $osC_Database-&gt;query('update :table_specials set status = :status, date_status_change = now() where specials_id = :specials_id');
+      $Qstatus-&gt;bindTable(':table_specials', TABLE_SPECIALS);
+      $Qstatus-&gt;bindInt(':status', ($status === true) ? '1' : '0');
+      $Qstatus-&gt;bindInt(':specials_id', $id);
+      $Qstatus-&gt;execute();
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      return $special_price;
</pre><pre class="diff" id="added">+      $Qstatus-&gt;freeResult();
</pre><pre class="diff" id="context">     }
   }
 ?&gt;
</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><br /></span>
<div class="fileheader"><big><b>new_products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/new_products.php?rev=1.39&amp;content-type=text/vnd.viewcvs-markup">1.39</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/new_products.php.diff?r1=1.39&amp;r2=1.40">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/new_products.php?rev=1.40&amp;content-type=text/vnd.viewcvs-markup">1.40</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.39 -r1.40
--- new_products.php	2004/10/31 09:46:17	1.39
+++ new_products.php	2004/11/28 20:49:26	1.40
@@ -46,14 +46,11 @@
</small></pre><pre class="diff" id="context">     $info_box_contents = array();
 
     while ($Qnewproducts-&gt;next()) {
</pre><pre class="diff" id="removed">-    	
-    	if ($osC_Services-&gt;isStarted('specials')) {
-        $specials_price = $osC_Specials-&gt;getPrice($Qnewproducts-&gt;valueInt('products_id'));
-      }
-
</pre><pre class="diff" id="context">       $products_price = $osC_Currencies-&gt;displayPrice($Qnewproducts-&gt;valueDecimal('products_price'), $Qnewproducts-&gt;valueInt('products_tax_class_id'));
</pre><pre class="diff" id="added">+
+      if ($osC_Services-&gt;isStarted('specials') &amp;&amp; $osC_Specials-&gt;isActive($Qnewproducts-&gt;valueInt('products_id'))) {
+        $specials_price = $osC_Specials-&gt;getPrice($Qnewproducts-&gt;valueInt('products_id'));
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-      if (tep_not_null($specials_price)) {
</pre><pre class="diff" id="context">         $products_price = '&lt;s&gt;' . $products_price . '&lt;/s&gt;&amp;nbsp;&lt;span class="productSpecialPrice"&gt;' . $osC_Currencies-&gt;displayPrice($specials_price, $Qnewproducts-&gt;valueInt('products_tax_class_id')) . '&lt;/span&gt;';
       }
 
</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/services">services</a><br /></span>
<div class="fileheader"><big><b>specials.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php?rev=1.3&amp;content-type=text/vnd.viewcvs-markup">1.3</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php.diff?r1=1.3&amp;r2=1.4">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/specials.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- specials.php	2004/11/28 18:39:10	1.3
+++ specials.php	2004/11/28 20:49:27	1.4
@@ -20,9 +20,12 @@
</small></pre><pre class="diff" id="context">     function start() {
       global $osC_Specials;
 
</pre><pre class="diff" id="removed">-      include('includes/classes/specials.php');
-
</pre><pre class="diff" id="added">+      require('includes/classes/specials.php');
</pre><pre class="diff" id="context">       $osC_Specials = new osC_Specials();
</pre><pre class="diff" id="added">+
+      $osC_Specials-&gt;activateAll();
+      $osC_Specials-&gt;expireAll();
+
</pre><pre class="diff" id="context">       return true;
     }
 
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; 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://productguide.itmanagersjournal.com/