[TEP-COMMIT] [CVS admin] remove the redundant session functions file
hpdl-OfajU3CKLf1/[email protected] 28 Oct 2004 13:00:03 -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</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>includes/<a href="#file1">application_bottom.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php.diff?r1=1.9&r2=1.10">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a></td></tr>
<tr class="alt"><td><tt> /<a href="#file2">application_top.php</a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.173&content-type=text/vnd.viewcvs-markup">1.173</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php.diff?r1=1.173&r2=1.174">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.174&content-type=text/vnd.viewcvs-markup">1.174</a></td></tr>
<tr><td><tt>includes/classes/<a href="#file3">shopping_cart.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></td></tr>
<tr class="alt"><td><tt>includes/functions/<a href="#file4">general.php</a></tt></td><td align="right" id="added">+5</td><td align="right" id="removed">-21</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.169&content-type=text/vnd.viewcvs-markup">1.169</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php.diff?r1=1.169&r2=1.170">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.170&content-type=text/vnd.viewcvs-markup">1.170</a></td></tr>
<tr><td><tt> /<span id="removed">sessions.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/sessions.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a> removed</td></tr>
<tr class="alt"><td><tt>templates/pages/<a href="#file6">whos_online.php</a></tt></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php?rev=1.2&content-type=text/vnd.viewcvs-markup">1.2</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php.diff?r1=1.2&r2=1.3">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php?rev=1.3&content-type=text/vnd.viewcvs-markup">1.3</a></td></tr>
<tr><td></td><td align="right" id="added">+13</td><td align="right" id="removed">-33</td><td></td></tr>
</table>
<small id="info">1 removed + 5 modified, total 6 files</small><br />
<pre class="comment">
remove the redundant session functions file
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><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><br /></span>
<div class="fileheader"><big><b>application_bottom.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php.diff?r1=1.9&r2=1.10">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_bottom.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.9 -r1.10
--- application_bottom.php 2004/10/26 20:09:42 1.9
+++ application_bottom.php 2004/10/28 12:59:50 1.10
@@ -5,11 +5,11 @@
</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">2</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">4</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff" id="removed">-// close session (store variables)
- tep_session_close();
</pre><pre class="diff" id="added">+// close session
+ $osC_Session->close();
</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/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><br /></span>
<div class="fileheader"><big><b>application_top.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.173&content-type=text/vnd.viewcvs-markup">1.173</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php.diff?r1=1.173&r2=1.174">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.174&content-type=text/vnd.viewcvs-markup">1.174</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.173 -r1.174
--- application_top.php 2004/10/28 12:40:24 1.173
+++ application_top.php 2004/10/28 12:59:50 1.174
@@ -86,10 +86,6 @@
</small></pre><pre class="diff" id="context"> }
$osC_Session = new osC_Session;
$osC_Session->setName('osCAdminID');
</pre><pre class="diff" id="removed">- $osC_Session->setSavePath(DIR_FS_WORK);
-
-// define how the session functions will be used
- require('includes/functions/sessions.php');
</pre><pre class="diff" id="context">
// lets start our session
$osC_Session->start();
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><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"><big><b>shopping_cart.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.10&content-type=text/vnd.viewcvs-markup">1.10</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php.diff?r1=1.10&r2=1.11">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/classes/shopping_cart.php?rev=1.11&content-type=text/vnd.viewcvs-markup">1.11</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- shopping_cart.php 2003/06/23 01:18:56 1.10
+++ shopping_cart.php 2004/10/28 12:59:53 1.11
@@ -71,7 +71,7 @@
</small></pre><pre class="diff" id="context"> }
function add_cart($products_id, $qty = '', $attributes = '') {
</pre><pre class="diff" id="removed">- global $new_products_id_in_cart, $customer_id;
</pre><pre class="diff" id="added">+ global $new_products_id_in_cart, $customer_id<span id="addedchars">, $osC_Session</span>;
</pre><pre class="diff" id="context">
$products_id = tep_get_uprid($products_id, $attributes);
</pre><pre class="diff"><small id="info">@@ -94,7 +94,7 @@
</small></pre><pre class="diff" id="context"> }
}
$new_products_id_in_cart = $products_id;
</pre><pre class="diff" id="removed">- tep_session_register('new_products_id_in_cart');
</pre><pre class="diff" id="added">+ $osC_Session->set('new_products_id_in_cart', $new_products_id_in_cart);
</pre><pre class="diff" id="context"> }
$this->cleanup();
}
</pre><pre class="diff"><small id="info">@@ -134,7 +134,7 @@
</small></pre><pre class="diff" id="context"> }
}
</pre><pre class="diff" id="removed">- function count_contents() { // get total number of items in cart<span id="removedchars"> </span>
</pre><pre class="diff" id="added">+ function count_contents() { // get total number of items in cart
</pre><pre class="diff" id="context"> $total_items = 0;
if (is_array($this->contents)) {
reset($this->contents);
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><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/functions">functions</a><br /></span>
<div class="fileheader"><big><b>general.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.169&content-type=text/vnd.viewcvs-markup">1.169</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php.diff?r1=1.169&r2=1.170">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.170&content-type=text/vnd.viewcvs-markup">1.170</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.169 -r1.170
--- general.php 2004/10/26 20:19:58 1.169
+++ general.php 2004/10/28 12:59:54 1.170
@@ -60,22 +60,6 @@
</small></pre><pre class="diff" id="context"> return $customers_values['customers_firstname'] . ' ' . $customers_values['customers_lastname'];
}
</pre><pre class="diff" id="removed">- function tep_get_all_get_params($exclude_array = '') {
- if (PHP_VERSION < 4.1) {
- global $_GET;
- }
-
- if ($exclude_array == '') $exclude_array = array();
-
- $get_url = '';
-
- foreach ($_GET as $key => $value) {
- if (($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array))) $get_url .= $key . '=' . $value . '&';
- }
-
- return $get_url;
- }
-
</pre><pre class="diff" id="context"> function tep_date_long($raw_date) {
if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false;
</pre><pre class="diff"><small id="info">@@ -1117,15 +1101,15 @@
</small></pre><pre class="diff" id="context"> // Returns the tax rate for a zone / class
// TABLES: tax_rates, zones_to_geo_zones
function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) {
</pre><pre class="diff" id="removed">- global $customer_zone_id, $customer_country_id;
</pre><pre class="diff" id="added">+ global $customer_zone_id, $customer_country_id<span id="addedchars">, $osC_Session</span>;
</pre><pre class="diff" id="context">
if ( ($country_id == -1) && ($zone_id == -1) ) {
</pre><pre class="diff" id="removed">- if (!tep_session_is_registered('customer_id')) {
- $country_id = STORE_COUNTRY;
- $zone_id = STORE_ZONE;
- } else {
</pre><pre class="diff" id="added">+ if ($osC_Session->exists('customer_id')) {
</pre><pre class="diff" id="context"> $country_id = $customer_country_id;
$zone_id = $customer_zone_id;
</pre><pre class="diff" id="added">+ } else {
+ $country_id = STORE_COUNTRY;
+ $zone_id = STORE_ZONE;
</pre><pre class="diff" id="context"> }
}
</pre></div>
<hr /><a name="file5" /><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/functions">functions</a><br /></span>
<div class="fileheader" id="removed"><big><b>sessions.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/sessions.php?rev=1.9&content-type=text/vnd.viewcvs-markup">1.9</a></small></div>
<pre class="diff"><small id="info">diff -N sessions.php
--- /tmp/cvsAAARja4g0 Thu Oct 28 14:59:56 2004
+++ /dev/null Thu Oct 28 14:59:42 2004
@@ -1,115 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2003 osCommerce
-
- Released under the GNU General Public License
-*/
-
- if (STORE_SESSIONS == 'mysql') {
- if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
- $SESS_LIFE = 1440;
- }
-
- function _sess_open($save_path, $session_name) {
- return true;
- }
-
- function _sess_close() {
- return true;
- }
-
- function _sess_read($key) {
- $qid = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'");
-
- $value = tep_db_fetch_array($qid);
- if ($value['value']) {
- return $value['value'];
- }
-
- return false;
- }
-
- function _sess_write($key, $val) {
- global $SESS_LIFE;
-
- $expiry = time() + $SESS_LIFE;
- $value = $val;
-
- $qid = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
- $total = tep_db_fetch_array($qid);
-
- if ($total['total'] > 0) {
- return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'");
- } else {
- return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')");
- }
- }
-
- function _sess_destroy($key) {
- return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");
- }
-
- function _sess_gc($maxlifetime) {
- tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'");
-
- return true;
- }
-
- session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
- }
-
- function tep_session_start() {
- return session_start();
- }
-
- function tep_session_register($variable) {
- return session_register($variable);
- }
-
- function tep_session_is_registered($variable) {
- return session_is_registered($variable);
- }
-
- function tep_session_unregister($variable) {
- return session_unregister($variable);
- }
-
- function tep_session_id($sessid = '') {
- if ($sessid != '') {
- return session_id($sessid);
- } else {
- return session_id();
- }
- }
-
- function tep_session_name($name = '') {
- if ($name != '') {
- return session_name($name);
- } else {
- return session_name();
- }
- }
-
- function tep_session_close() {
- if (function_exists('session_close')) {
- return session_close();
- }
- }
-
- function tep_session_destroy() {
- return session_destroy();
- }
-
- function tep_session_save_path($path = '') {
- if ($path != '') {
- return session_save_path($path);
- } else {
- return session_save_path();
- }
- }
-?>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><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/templates">templates</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages">pages</a><br /></span>
<div class="fileheader"><big><b>whos_online.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php?rev=1.2&content-type=text/vnd.viewcvs-markup">1.2</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php.diff?r1=1.2&r2=1.3">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/whos_online.php?rev=1.3&content-type=text/vnd.viewcvs-markup">1.3</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.2 -r1.3
--- whos_online.php 2004/08/25 19:57:29 1.2
+++ whos_online.php 2004/10/28 12:59:56 1.3
@@ -65,8 +65,8 @@
</small></pre><pre class="diff" id="context">
$session_data = trim($Qsession->value('value'));
} else {
</pre><pre class="diff" id="removed">- if ( (file_exists(tep_session_save_path() . '/sess_' . $Qwho->value('session_id'))) && (filesize(tep_session_save_path() . '/sess_' . $Qwho->value('session_id')) > 0) ) {
- $session_data = trim(file_get_contents(tep_session_save_path() . '/sess_' . $Qwho->value('session_id')));
</pre><pre class="diff" id="added">+ if ( (file_exists($osC_Session->getSavePath() . '/sess_' . $Qwho->value('session_id'))) && (filesize($osC_Session->getSavePath() . '/sess_' . $Qwho->value('session_id')) > 0) ) {
+ $session_data = trim(file_get_contents($osC_Session->getSavePath() . '/sess_' . $Qwho->value('session_id')));
</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>
-------------------------------------------------------
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