[TEP-COMMIT] [CVS admin] remove redundant files

hpdl-OfajU3CKLf1/[email protected] 2 Nov 2004 00:52:45 -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>admin/admin/includes/classes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><span id="removed">payment_module_info.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/payment_module_info.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a> removed</td></tr>
<tr class="alt"><td><tt><span id="removed">shopping_cart.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.11&amp;content-type=text/vnd.viewcvs-markup">1.11</a> removed</td></tr>
</table>
<small id="info">2 removed files</small><br />
<pre class="comment">
remove redundant files
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes">classes</a><br /></span>
<div class="fileheader" id="removed"><big><b>payment_module_info.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/payment_module_info.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a></small></div>
<pre class="diff"><small id="info">diff -N payment_module_info.php
--- /tmp/cvsAAAspaaHb	Tue Nov  2 01:52:43 2004
+++ /dev/null	Tue Nov  2 01:52:43 2004
@@ -1,19 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?php
-  class paymentModuleInfo {
-    var $payment_code, $keys;
-
-// class constructor
-    function paymentModuleInfo($pmInfo_array) {
-      $this-&gt;payment_code = $pmInfo_array['payment_code'];
-
-      for ($i = 0, $n = sizeof($pmInfo_array) - 1; $i &lt; $n; $i++) {
-        $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description from " . TABLE_CONFIGURATION . " where configuration_key = '" . $pmInfo_array[$i] . "'");
-        $key_value = tep_db_fetch_array($key_value_query);
-
-        $this-&gt;keys[$pmInfo_array[$i]]['title'] = $key_value['configuration_title'];
-        $this-&gt;keys[$pmInfo_array[$i]]['value'] = $key_value['configuration_value'];
-        $this-&gt;keys[$pmInfo_array[$i]]['description'] = $key_value['configuration_description'];
-      }
-    }
-  }
-?&gt;
</pre><pre class="diff"><small id="info">\ No newline at end of file
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes">classes</a><br /></span>
<div class="fileheader" id="removed"><big><b>shopping_cart.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.11&amp;content-type=text/vnd.viewcvs-markup">1.11</a></small></div>
<pre class="diff"><small id="info">diff -N shopping_cart.php
--- /tmp/cvsAAA3paqHb	Tue Nov  2 01:52:43 2004
+++ /dev/null	Tue Nov  2 01:52:43 2004
@@ -1,306 +0,0 @@
</small></pre><pre class="diff" id="removed">-&lt;?php
-/*
-  $Id$
-
-  osCommerce, Open Source E-Commerce Solutions
-  http://www.oscommerce.com
-
-  Copyright (c) 2003 osCommerce
-
-  Released under the GNU General Public License
-*/
-
-  class shoppingCart {
-    var $contents, $total, $weight;
-
-    function shoppingCart() {
-      $this-&gt;reset();
-    }
-
-    function restore_contents() {
-      global $customer_id;
-
-      if (!$customer_id) return 0;
-
-// insert current cart contents in database
-      if ($this-&gt;contents) {
-        reset($this-&gt;contents);
-        while (list($products_id, ) = each($this-&gt;contents)) {
-          $qty = $this-&gt;contents[$products_id]['qty'];
-          $product_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");
-          if (!tep_db_num_rows($product_query)) {
-            tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . tep_db_input($qty) . "', '" . date('Ymd') . "')");
-            if ($this-&gt;contents[$products_id]['attributes']) {
-              reset($this-&gt;contents[$products_id]['attributes']);
-              while (list($option, $value) = each($this-&gt;contents[$products_id]['attributes'])) {
-                tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");
-              }
-            }
-          } else {
-            tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . tep_db_input($qty) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");
-          }
-        }
-      }
-
-// reset per-session cart contents, but not the database contents
-      $this-&gt;reset(FALSE);
-
-      $products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
-      while ($products = tep_db_fetch_array($products_query)) {
-        $this-&gt;contents[$products['products_id']] = array('qty' =&gt; $products['customers_basket_quantity']);
-// attributes
-        $attributes_query = tep_db_query("select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "'");
-        while ($attributes = tep_db_fetch_array($attributes_query)) {
-          $this-&gt;contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
-        }
-      }
-
-      $this-&gt;cleanup();
-    }
-
-    function reset($reset_database = FALSE) {
-      global $customer_id;
-
-      $this-&gt;contents = array();
-      $this-&gt;total = 0;
-
-      if ($customer_id &amp;&amp; $reset_database) {
-        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
-        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "'");
-      }
-    }
-
-    function add_cart($products_id, $qty = '', $attributes = '') {
-      global $new_products_id_in_cart, $customer_id, $osC_Session;
-
-      $products_id = tep_get_uprid($products_id, $attributes);
-
-      if ($this-&gt;in_cart($products_id)) {
-        $this-&gt;update_quantity($products_id, $qty, $attributes);
-      } else {
-        if ($qty == '') $qty = '1'; // if no quantity is supplied, then add '1' to the customers basket
-
-        $this-&gt;contents[] = array($products_id);
-        $this-&gt;contents[$products_id] = array('qty' =&gt; $qty);
-// insert into database
-        if ($customer_id) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . tep_db_input($qty) . "', '" . date('Ymd') . "')");
-
-        if (is_array($attributes)) {
-          reset($attributes);
-          while (list($option, $value) = each($attributes)) {
-            $this-&gt;contents[$products_id]['attributes'][$option] = $value;
-// insert into database
-            if ($customer_id) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");
-          }
-        }
-        $new_products_id_in_cart = $products_id;
-        $osC_Session-&gt;set('new_products_id_in_cart', $new_products_id_in_cart);
-      }
-      $this-&gt;cleanup();
-    }
-
-    function update_quantity($products_id, $quantity = '', $attributes = '') {
-      global $customer_id;
-
-      if ($quantity == '') return true; // nothing needs to be updated if theres no quantity, so we return true..
-
-      $this-&gt;contents[$products_id] = array('qty' =&gt; $quantity);
-// update database
-      if ($customer_id) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . tep_db_input($quantity) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");
-
-      if (is_array($attributes)) {
-        reset($attributes);
-        while (list($option, $value) = each($attributes)) {
-          $this-&gt;contents[$products_id]['attributes'][$option] = $value;
-// update database
-          if ($customer_id) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and products_options_id = '" . (int)$option . "'");
-        }
-      }
-    }
-
-    function cleanup() {
-      global $customer_id;
-
-      reset($this-&gt;contents);
-      while (list($key,) = each($this-&gt;contents)) {
-        if ($this-&gt;contents[$key]['qty'] &lt; 1) {
-          unset($this-&gt;contents[$key]);
-// remove from database
-          if ($customer_id) {
-            tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "'");
-            tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "'");
-          }
-        }
-      }
-    }
-
-    function count_contents() {  // get total number of items in cart
-        $total_items = 0;
-        if (is_array($this-&gt;contents)) {
-            reset($this-&gt;contents);
-            while (list($products_id, ) = each($this-&gt;contents)) {
-                $total_items += $this-&gt;get_quantity($products_id);
-            }
-        }
-        return $total_items;
-    }
-
-    function get_quantity($products_id) {
-      if ($this-&gt;contents[$products_id]) {
-        return $this-&gt;contents[$products_id]['qty'];
-      } else {
-        return 0;
-      }
-    }
-
-    function in_cart($products_id) {
-      if ($this-&gt;contents[$products_id]) {
-        return true;
-      } else {
-        return false;
-      }
-    }
-
-    function remove($products_id) {
-      global $customer_id;
-
-      unset($this-&gt;contents[$products_id]);
-// remove from database
-      if ($customer_id) {
-        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");
-        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "'");
-      }
-    }
-
-    function remove_all() {
-      $this-&gt;reset();
-    }
-
-    function get_product_id_list() {
-      $product_id_list = '';
-      if (is_array($this-&gt;contents))
-      {
-        reset($this-&gt;contents);
-        while (list($products_id, ) = each($this-&gt;contents)) {
-          $product_id_list .= ', ' . $products_id;
-        }
-      }
-      return substr($product_id_list, 2);
-    }
-
-    function calculate() {
-      $this-&gt;total = 0;
-      $this-&gt;weight = 0;
-      if (!is_array($this-&gt;contents)) return 0;
-
-      reset($this-&gt;contents);
-      while (list($products_id, ) = each($this-&gt;contents)) {
-        $qty = $this-&gt;contents[$products_id]['qty'];
-
-// products price
-        $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id='" . (int)tep_get_prid($products_id) . "'");
-        if ($product = tep_db_fetch_array($product_query)) {
-          $prid = $product['products_id'];
-          $products_tax = tep_get_tax_rate($product['products_tax_class_id']);
-          $products_price = $product['products_price'];
-          $products_weight = $product['products_weight'];
-
-          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
-          if (tep_db_num_rows ($specials_query)) {
-            $specials = tep_db_fetch_array($specials_query);
-            $products_price = $specials['specials_new_products_price'];
-          }
-
-          $this-&gt;total += tep_add_tax($products_price, $products_tax) * $qty;
-          $this-&gt;weight += ($qty * $products_weight);
-        }
-
-// attributes price
-        if (isset($this-&gt;contents[$products_id]['attributes'])) {
-          reset($this-&gt;contents[$products_id]['attributes']);
-          while (list($option, $value) = each($this-&gt;contents[$products_id]['attributes'])) {
-            $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
-            $attribute_price = tep_db_fetch_array($attribute_price_query);
-            if ($attribute_price['price_prefix'] == '+') {
-              $this-&gt;total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
-            } else {
-              $this-&gt;total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
-            }
-          }
-        }
-      }
-    }
-
-    function attributes_price($products_id) {
-      $attributes_price = 0;
-
-      if (isset($this-&gt;contents[$products_id]['attributes'])) {
-        reset($this-&gt;contents[$products_id]['attributes']);
-        while (list($option, $value) = each($this-&gt;contents[$products_id]['attributes'])) {
-          $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
-          $attribute_price = tep_db_fetch_array($attribute_price_query);
-          if ($attribute_price['price_prefix'] == '+') {
-            $attributes_price += $attribute_price['options_values_price'];
-          } else {
-            $attributes_price -= $attribute_price['options_values_price'];
-          }
-        }
-      }
-
-      return $attributes_price;
-    }
-
-    function get_products() {
-      global $languages_id;
-
-      if (!is_array($this-&gt;contents)) return 0;
-      $products_array = array();
-      reset($this-&gt;contents);
-      while (list($products_id, ) = each($this-&gt;contents)) {
-        $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id='" . (int)tep_get_prid($products_id) . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
-        if ($products = tep_db_fetch_array($products_query)) {
-          $prid = $products['products_id'];
-          $products_price = $products['products_price'];
-
-          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'");
-          if (tep_db_num_rows($specials_query)) {
-            $specials = tep_db_fetch_array($specials_query);
-            $products_price = $specials['specials_new_products_price'];
-          }
-
-          $products_array[] = array('id' =&gt; $products_id,
-                                    'name' =&gt; $products['products_name'],
-                                    'model' =&gt; $products['products_model'],
-                                    'price' =&gt; $products_price,
-                                    'quantity' =&gt; $this-&gt;contents[$products_id]['qty'],
-                                    'weight' =&gt; $products['products_weight'],
-                                    'final_price' =&gt; ($products_price + $this-&gt;attributes_price($products_id)),
-                                    'tax_class_id' =&gt; $products['products_tax_class_id'],
-                                    'attributes' =&gt; (isset($this-&gt;contents[$products_id]['attributes']) ? $this-&gt;contents[$products_id]['attributes'] : ''));
-        }
-      }
-      return $products_array;
-    }
-
-    function show_total() {
-      $this-&gt;calculate();
-
-      return $this-&gt;total;
-    }
-
-    function show_weight() {
-      $this-&gt;calculate();
-
-      return $this-&gt;weight;
-    }
-
-    function unserialize($broken) {
-      for(reset($broken);$kv=each($broken);) {
-        $key=$kv['key'];
-        if (gettype($this-&gt;$key)!="user function")
-        $this-&gt;$key=$kv['value'];
-      }
-    }
-
-  }
-?&gt;
<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>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click