[TEP-COMMIT] CVS: catalog/catalog/includes/functions whos_online.php,1.11,1.12

Harald Ponce de Leon <[email protected]>
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /cvsroot/tep/catalog/catalog/includes/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv3157/functions

Modified Files:
	whos_online.php 
Log Message:
use the new customer and session class


Index: whos_online.php
===================================================================
RCS file: /cvsroot/tep/catalog/catalog/includes/functions/whos_online.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- whos_online.php	20 Jun 2003 00:12:59 -0000	1.11
+++ whos_online.php	17 Nov 2003 18:39:22 -0000	1.12
@@ -11,21 +11,17 @@
 */
 
   function tep_update_whos_online() {
-    global $customer_id;
-
-    if (tep_session_is_registered('customer_id')) {
-      $wo_customer_id = $customer_id;
-
-      $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
-      $customer = tep_db_fetch_array($customer_query);
+    global $osC_Session, $osC_Customer;
 
-      $wo_full_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];
+    if ($osC_Customer->isLoggedOn()) {
+      $wo_customer_id = $osC_Customer->id;
+      $wo_full_name = $osC_Customer->full_name;
     } else {
       $wo_customer_id = '';
       $wo_full_name = 'Guest';
     }
 
-    $wo_session_id = tep_session_id();
+    $wo_session_id = $osC_Session->id;
     $wo_ip_address = getenv('REMOTE_ADDR');
     $wo_last_page_url = getenv('REQUEST_URI');
 



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.