<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,7 +31,7 @@
   $osC_Language-&gt;load('account');
 
   if ($osC_Services-&gt;isStarted('breadcrumb')) {
-    $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_my_account'), osc_href_link(FILENAME_ACCOUNT, null, 'SSL'));
+    $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_my_account'), osc_href_link(FILENAME_ACCOUNT, null, 'SSL'));
   }
 
   $osC_Template = osC_Template::setup('account');</diff>
      <filename>account.php</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
   $osC_Language-&gt;load('checkout');
 
   if ($osC_Services-&gt;isStarted('breadcrumb')) {
-    $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout'), osc_href_link(FILENAME_CHECKOUT, null, 'SSL'));
+    $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout'), osc_href_link(FILENAME_CHECKOUT, null, 'SSL'));
   }
 
   $osC_Template = osC_Template::setup('cart');</diff>
      <filename>checkout.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,16 +5,27 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2005 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
+/**
+ * The osC_Account class manages customer accounts
+ */
+
   class osC_Account {
 
-    function &amp;getEntry() {
+/**
+ * Returns the account information for the current customer
+ *
+ * @access public
+ * @return object
+ */
+
+    public static function &amp;getEntry() {
       global $osC_Database, $osC_Customer;
 
       $Qaccount = $osC_Database-&gt;query('select customers_gender, customers_firstname, customers_lastname, date_format(customers_dob, &quot;%Y&quot;) as customers_dob_year, date_format(customers_dob, &quot;%m&quot;) as customers_dob_month, date_format(customers_dob, &quot;%d&quot;) as customers_dob_date, customers_email_address from :table_customers where customers_id = :customers_id');
@@ -25,7 +36,14 @@
       return $Qaccount;
     }
 
-    function getID($email_address) {
+/**
+ * Returns the customer ID from a given email address
+ *
+ * @param string $email_address The customers email address
+ * @access public
+ */
+
+    public static function getID($email_address) {
       global $osC_Database;
 
       $Quser = $osC_Database-&gt;query('select customers_id from :table_customers where customers_email_address = :customers_email_address limit 1');
@@ -33,14 +51,22 @@
       $Quser-&gt;bindValue(':customers_email_address', $email_address);
       $Quser-&gt;execute();
 
-      if ($Quser-&gt;numberOfRows() === 1) {
+      if ( $Quser-&gt;numberOfRows() === 1 ) {
         return $Quser-&gt;valueInt('customers_id');
       }
 
       return false;
     }
 
-    function createEntry($data) {
+/**
+ * Stores a new customer account entry in the database
+ *
+ * @param array $data An array containing the customers information
+ * @access public
+ * @return boolean
+ */
+
+    public static function createEntry($data) {
       global $osC_Database, $osC_Session, $osC_Language, $osC_ShoppingCart, $osC_Customer, $osC_NavigationHistory;
 
       $Qcustomer = $osC_Database-&gt;query('insert into :table_customers (customers_firstname, customers_lastname, customers_email_address, customers_newsletter, customers_status, customers_ip_address, customers_password, customers_gender, customers_dob, number_of_logons, date_account_created) values (:customers_firstname, :customers_lastname, :customers_email_address, :customers_newsletter, :customers_status, :customers_ip_address, :customers_password, :customers_gender, :customers_dob, :number_of_logons, :date_account_created)');
@@ -58,10 +84,10 @@
       $Qcustomer-&gt;bindRaw(':date_account_created', 'now()');
       $Qcustomer-&gt;execute();
 
-      if ($Qcustomer-&gt;affectedRows() === 1) {
+      if ( $Qcustomer-&gt;affectedRows() === 1 ) {
         $customer_id = $osC_Database-&gt;nextID();
 
-        if (SERVICE_SESSION_REGENERATE_ID == '1') {
+        if ( SERVICE_SESSION_REGENERATE_ID == '1' ) {
           $osC_Session-&gt;recreate();
         }
 
@@ -72,9 +98,9 @@
 
         $osC_NavigationHistory-&gt;removeCurrentPage();
 
-// build the message content
-        if ((ACCOUNT_GENDER &gt; -1) &amp;&amp; isset($data['gender'])) {
-           if ($data['gender'] == 'm') {
+// build the welcome email content
+        if ( (ACCOUNT_GENDER &gt; -1) &amp;&amp; isset($data['gender']) ) {
+           if ( $data['gender'] == 'm' ) {
              $email_text = sprintf($osC_Language-&gt;get('email_addressing_gender_male'), $osC_Customer-&gt;getLastName()) . &quot;\n\n&quot;;
            } else {
              $email_text = sprintf($osC_Language-&gt;get('email_addressing_gender_female'), $osC_Customer-&gt;getLastName()) . &quot;\n\n&quot;;
@@ -93,7 +119,15 @@
       return false;
     }
 
-    function saveEntry($data) {
+/**
+ * Update the current customer account record in the database
+ *
+ * @param array $data An array containing the customer account information
+ * @access public
+ * @return boolean
+ */
+
+    public static function saveEntry($data) {
       global $osC_Database, $osC_Customer;
 
       $Qcustomer = $osC_Database-&gt;query('update :table_customers set customers_gender = :customers_gender, customers_firstname = :customers_firstname, customers_lastname = :customers_lastname, customers_email_address = :customers_email_address, customers_dob = :customers_dob, date_account_last_modified = :date_account_last_modified where customers_id = :customers_id');
@@ -107,17 +141,22 @@
       $Qcustomer-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       $Qcustomer-&gt;execute();
 
-      if ($Qcustomer-&gt;affectedRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qcustomer-&gt;affectedRows() === 1 );
     }
 
-    function savePassword($password, $customer_id = null) {
+/**
+ * Updates the password in a customers account
+ *
+ * @param string $password The new password
+ * @param integer $customer_id The ID of the customer account to update
+ * @access public
+ * @return boolean
+ */
+
+    public static function savePassword($password, $customer_id = null) {
       global $osC_Database, $osC_Customer;
 
-      if (is_numeric($customer_id) === false) {
+      if ( !is_numeric($customer_id) ) {
         $customer_id = $osC_Customer-&gt;getID();
       }
 
@@ -128,14 +167,18 @@
       $Qcustomer-&gt;bindInt(':customers_id', $customer_id);
       $Qcustomer-&gt;execute();
 
-      if ($Qcustomer-&gt;affectedRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qcustomer-&gt;affectedRows() === 1 );
     }
 
-    function checkEntry($email_address) {
+/**
+ * Checks if a customer account record exists with the provided e-mail address
+ *
+ * @param string $email_address The e-mail address to check for
+ * @access public
+ * @return boolean
+ */
+
+    public static function checkEntry($email_address) {
       global $osC_Database;
 
       $Qcheck = $osC_Database-&gt;query('select customers_id from :table_customers where customers_email_address = :customers_email_address limit 1');
@@ -143,17 +186,22 @@
       $Qcheck-&gt;bindValue(':customers_email_address', $email_address);
       $Qcheck-&gt;execute();
 
-      if ($Qcheck-&gt;numberOfRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qcheck-&gt;numberOfRows() === 1 );
     }
 
-    function checkPassword($password, $email_address = null) {
+/**
+ * Checks if a password matches the current or provided customer account
+ *
+ * @param string $password The unencrypted password to confirm
+ * @param string $email_address The email address of the customer account to check against
+ * @access public
+ * @return boolean
+ */
+
+    public static function checkPassword($password, $email_address = null) {
       global $osC_Database, $osC_Customer;
 
-      if ($email_address === null) {
+      if ( empty($email_address) ) {
         $Qcheck = $osC_Database-&gt;query('select customers_password from :table_customers where customers_id = :customers_id');
         $Qcheck-&gt;bindTable(':table_customers', TABLE_CUSTOMERS);
         $Qcheck-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
@@ -165,14 +213,12 @@
         $Qcheck-&gt;execute();
       }
 
-      if ($Qcheck-&gt;numberOfRows() === 1) {
+      if ( $Qcheck-&gt;numberOfRows() === 1 ) {
         if ( (strlen($password) &gt; 0) &amp;&amp; (strlen($Qcheck-&gt;value('customers_password')) &gt; 0) ) {
           $stack = explode(':', $Qcheck-&gt;value('customers_password'));
 
-          if (sizeof($stack) === 2) {
-            if (md5($stack[1] . $password) == $stack[0]) {
-              return true;
-            }
+          if ( sizeof($stack) === 2 ) {
+            return ( md5($stack[1] . $password) == $stack[0] );
           }
         }
       }
@@ -180,7 +226,15 @@
       return false;
     }
 
-    function checkDuplicateEntry($email_address) {
+/**
+ * Checks if an e-mail address already exists in another customer account record
+ *
+ * @param string $email_address The e-mail address to check
+ * @access public
+ * @return boolean
+ */
+
+    public static function checkDuplicateEntry($email_address) {
       global $osC_Database, $osC_Customer;
 
       $Qcheck = $osC_Database-&gt;query('select customers_id from :table_customers where customers_email_address = :customers_email_address and customers_id != :customers_id limit 1');
@@ -189,11 +243,7 @@
       $Qcheck-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       $Qcheck-&gt;execute();
 
-      if ($Qcheck-&gt;numberOfRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qcheck-&gt;numberOfRows() === 1 );
     }
   }
 ?&gt;</diff>
      <filename>includes/classes/account.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,23 +5,33 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2006 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
+/**
+ * The osC_Actions class loads action modules to execute specific tasks
+ */
+
   class osC_Actions {
-    function parse() {
-      if (isset($_GET['action']) &amp;&amp; !empty($_GET['action'])) {
-        $_GET['action'] = basename($_GET['action']);
 
-        if (file_exists('includes/modules/actions/' . $_GET['action'] . '.php')) {
-          include('includes/modules/actions/' . $_GET['action'] . '.php');
+/**
+ * Loads the action module to execute
+ *
+ * @param string $module The name of the module to execute
+ * @access public
+ */
+
+    public static function parse($module) {
+      $module = basename($module);
+
+      if ( !empty($module) &amp;&amp; file_exists('includes/modules/actions/' . $module . '.php') ) {
+        include('includes/modules/actions/' . $module . '.php');
 
-          call_user_func(array('osC_Actions_' . $_GET['action'], 'execute'));
-        }
+        call_user_func(array('osC_Actions_' . $module, 'execute'));
       }
     }
   }</diff>
      <filename>includes/classes/actions.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,20 +5,34 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2006 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
+/**
+ * The osC_Address class handles address related functions such as the format and country and zone information
+ */
+
   class osC_Address {
-    function format($address, $new_line = &quot;\n&quot;) {
+
+/**
+ * Correctly format an address to the address format rule assigned to its country
+ *
+ * @param array $address An array (or address_book ID) containing the address information
+ * @param string $new_line The string to break new lines with
+ * @access public
+ * @return string
+ */
+
+    public static function format($address, $new_line = null) {
       global $osC_Database;
 
       $address_format = '';
 
-      if (is_numeric($address)) {
+      if ( is_numeric($address) ) {
         $Qaddress = $osC_Database-&gt;query('select ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.address_book_id = :address_book_id and ab.entry_country_id = c.countries_id');
         $Qaddress-&gt;bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
         $Qaddress-&gt;bindTable(':table_zones', TABLE_ZONES);
@@ -31,34 +45,34 @@
 
       $firstname = $lastname = '';
 
-      if (isset($address['firstname']) &amp;&amp; !empty($address['firstname'])) {
+      if ( isset($address['firstname']) &amp;&amp; !empty($address['firstname']) ) {
         $firstname = $address['firstname'];
         $lastname = $address['lastname'];
-      } elseif (isset($address['name']) &amp;&amp; !empty($address['name'])) {
+      } elseif ( isset($address['name']) &amp;&amp; !empty($address['name']) ) {
         $firstname = $address['name'];
       }
 
       $state = $address['state'];
       $state_code = $address['zone_code'];
 
-      if (isset($address['zone_id']) &amp;&amp; is_numeric($address['zone_id']) &amp;&amp; ($address['zone_id'] &gt; 0)) {
+      if ( isset($address['zone_id']) &amp;&amp; is_numeric($address['zone_id']) &amp;&amp; ($address['zone_id'] &gt; 0) ) {
         $state = osC_Address::getZoneName($address['zone_id']);
         $state_code = osC_Address::getZoneCode($address['zone_id']);
       }
 
       $country = $address['country_title'];
 
-      if (empty($country) &amp;&amp; isset($address['country_id']) &amp;&amp; is_numeric($address['country_id']) &amp;&amp; ($address['country_id'] &gt; 0)) {
+      if ( empty($country) &amp;&amp; isset($address['country_id']) &amp;&amp; is_numeric($address['country_id']) &amp;&amp; ($address['country_id'] &gt; 0) ) {
         $country = osC_Address::getCountryName($address['country_id']);
       }
 
-      if (isset($address['format'])) {
+      if ( isset($address['format']) ) {
         $address_format = $address['format'];
-      } elseif (isset($address['country_id']) &amp;&amp; is_numeric($address['country_id']) &amp;&amp; ($address['country_id'] &gt; 0)) {
+      } elseif ( isset($address['country_id']) &amp;&amp; is_numeric($address['country_id']) &amp;&amp; ($address['country_id'] &gt; 0) ) {
         $address_format = osC_Address::getFormat($address['country_id']);
       }
 
-      if (empty($address_format)) {
+      if ( empty($address_format) ) {
         $address_format = &quot;:name\n:street_address\n:postcode :city\n:country&quot;;
       }
 
@@ -83,45 +97,58 @@
       $formated = preg_replace($find_array, $replace_array, $address_format);
 
       if ( (ACCOUNT_COMPANY &gt; -1) &amp;&amp; !empty($address['company']) ) {
-        $company = osc_output_string_protected($address['company']);
-
-        $formated = $company . $new_line . $formated;
+        $formated = osc_output_string_protected($address['company']) . &quot;\n&quot; . $formated;
       }
 
-      if ($new_line != &quot;\n&quot;) {
+      if ( !empty($new_line) ) {
         $formated = str_replace(&quot;\n&quot;, $new_line, $formated);
       }
 
       return $formated;
     }
 
-    function getCountries() {
+/**
+ * Return all countries in an array
+ *
+ * @access public
+ * @return array
+ */
+
+    public static function getCountries() {
       global $osC_Database;
 
-      static $_countries;
+      static $countries;
 
-      if (!isset($_countries)) {
-        $_countries = array();
+      if ( !isset($countries) ) {
+        $countries = array();
 
         $Qcountries = $osC_Database-&gt;query('select * from :table_countries order by countries_name');
         $Qcountries-&gt;bindTable(':table_countries', TABLE_COUNTRIES);
         $Qcountries-&gt;execute();
 
-        while ($Qcountries-&gt;next()) {
-          $_countries[] = array('id' =&gt; $Qcountries-&gt;valueInt('countries_id'),
-                                'name' =&gt; $Qcountries-&gt;value('countries_name'),
-                                'iso_2' =&gt; $Qcountries-&gt;value('countries_iso_code_2'),
-                                'iso_3' =&gt; $Qcountries-&gt;value('countries_iso_code_3'),
-                                'format' =&gt; $Qcountries-&gt;value('address_format'));
+        while ( $Qcountries-&gt;next() ) {
+          $countries[] = array('id' =&gt; $Qcountries-&gt;valueInt('countries_id'),
+                               'name' =&gt; $Qcountries-&gt;value('countries_name'),
+                               'iso_2' =&gt; $Qcountries-&gt;value('countries_iso_code_2'),
+                               'iso_3' =&gt; $Qcountries-&gt;value('countries_iso_code_3'),
+                               'format' =&gt; $Qcountries-&gt;value('address_format'));
         }
 
         $Qcountries-&gt;freeResult();
       }
 
-      return $_countries;
+      return $countries;
     }
 
-    function getCountryName($id) {
+/**
+ * Return the country name
+ *
+ * @param int $id The ID of the country
+ * @access public
+ * @return string
+ */
+
+    public static function getCountryName($id) {
       global $osC_Database;
 
       $Qcountry = $osC_Database-&gt;query('select countries_name from :table_countries where countries_id = :countries_id');
@@ -132,7 +159,15 @@
       return $Qcountry-&gt;value('countries_name');
     }
 
-    function getCountryIsoCode2($id) {
+/**
+ * Return the country 2 character ISO code
+ *
+ * @param int $id The ID of the country
+ * @access public
+ * @return string
+ */
+
+    public static function getCountryIsoCode2($id) {
       global $osC_Database;
 
       $Qcountry = $osC_Database-&gt;query('select countries_iso_code_2 from :table_countries where countries_id = :countries_id');
@@ -143,7 +178,15 @@
       return $Qcountry-&gt;value('countries_iso_code_2');
     }
 
-    function getCountryIsoCode3($id) {
+/**
+ * Return the country 3 character ISO code
+ *
+ * @param int $id The ID of the country
+ * @access public
+ * @return string
+ */
+
+    public static function getCountryIsoCode3($id) {
       global $osC_Database;
 
       $Qcountry = $osC_Database-&gt;query('select countries_iso_code_3 from :table_countries where countries_id = :countries_id');
@@ -154,7 +197,15 @@
       return $Qcountry-&gt;value('countries_iso_code_3');
     }
 
-    function getFormat($id) {
+/**
+ * Return the address format rule for the country
+ *
+ * @param int $id The ID of the country
+ * @access public
+ * @return string
+ */
+
+    public static function getFormat($id) {
       global $osC_Database;
 
       $Qcountry = $osC_Database-&gt;query('select address_format from :table_countries where countries_id = :countries_id');
@@ -165,7 +216,15 @@
       return $Qcountry-&gt;value('address_format');
     }
 
-    function getZoneName($id) {
+/**
+ * Return the zone name
+ *
+ * @param int $id The ID of the zone
+ * @access public
+ * @return string
+ */
+
+    public static function getZoneName($id) {
       global $osC_Database;
 
       $Qzone = $osC_Database-&gt;query('select zone_name from :table_zones where zone_id = :zone_id');
@@ -176,7 +235,15 @@
       return $Qzone-&gt;value('zone_name');
     }
 
-    function getZoneCode($id) {
+/**
+ * Return the zone code
+ *
+ * @param int $id The ID of the zone
+ * @access public
+ * @return string
+ */
+
+    public static function getZoneCode($id) {
       global $osC_Database;
 
       $Qzone = $osC_Database-&gt;query('select zone_code from :table_zones where zone_id = :zone_id');
@@ -187,14 +254,22 @@
       return $Qzone-&gt;value('zone_code');
     }
 
-    function getZones($id = null) {
+/**
+ * Return the zones belonging to a country, or all zones
+ *
+ * @param int $id The ID of the country
+ * @access public
+ * @return array
+ */
+
+    public static function getZones($id = null) {
       global $osC_Database;
 
       $zones_array = array();
 
       $Qzones = $osC_Database-&gt;query('select z.zone_id, z.zone_country_id, z.zone_name, c.countries_name from :table_zones z, :table_countries c where');
 
-      if (!empty($id)) {
+      if ( !empty($id) ) {
         $Qzones-&gt;appendQuery('z.zone_country_id = :zone_country_id and');
         $Qzones-&gt;bindInt(':zone_country_id', $id);
       }
@@ -204,7 +279,7 @@
       $Qzones-&gt;bindTable(':table_zones', TABLE_ZONES);
       $Qzones-&gt;execute();
 
-      while ($Qzones-&gt;next()) {
+      while ( $Qzones-&gt;next() ) {
         $zones_array[] = array('id' =&gt; $Qzones-&gt;valueInt('zone_id'),
                                'name' =&gt; $Qzones-&gt;value('zone_name'),
                                'country_id' =&gt; $Qzones-&gt;valueInt('zone_country_id'),</diff>
      <filename>includes/classes/address.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,16 +5,27 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2005 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
+/**
+ * The osC_AddressBook class handles customer address book related functions
+ */
+
   class osC_AddressBook {
 
-    function &amp;getListing() {
+/**
+ * Returns the address book entries for the current customer
+ *
+ * @access public
+ * @return array
+ */
+
+    public static function &amp;getListing() {
       global $osC_Database, $osC_Customer;
 
       $Qaddresses = $osC_Database-&gt;query('select ab.address_book_id, ab.entry_firstname as firstname, ab.entry_lastname as lastname, ab.entry_company as company, ab.entry_street_address as street_address, ab.entry_suburb as suburb, ab.entry_city as city, ab.entry_postcode as postcode, ab.entry_state as state, ab.entry_zone_id as zone_id, ab.entry_country_id as country_id, z.zone_code as zone_code, c.countries_name as country_title from :table_address_book ab left join :table_zones z on (ab.entry_zone_id = z.zone_id), :table_countries c where ab.customers_id = :customers_id and ab.entry_country_id = c.countries_id order by ab.entry_firstname, ab.entry_lastname');
@@ -27,7 +38,15 @@
       return $Qaddresses;
     }
 
-    function &amp;getEntry($id) {
+/**
+ * Returns a specific address book entry for the current customer
+ *
+ * @param int $id The ID of the address book entry to return
+ * @access public
+ * @return array
+ */
+
+    public static function &amp;getEntry($id) {
       global $osC_Database, $osC_Customer;
 
       $Qentry = $osC_Database-&gt;query('select entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_zone_id, entry_country_id, entry_telephone, entry_fax from :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id');
@@ -39,7 +58,15 @@
       return $Qentry;
     }
 
-    function checkEntry($id) {
+/**
+ * Verify the address book entry belongs to the current customer
+ *
+ * @param int $id The ID of the address book entry to verify
+ * @access public
+ * @return boolean
+ */
+
+    public static function checkEntry($id) {
       global $osC_Database, $osC_Customer;
 
       $Qentry = $osC_Database-&gt;query('select address_book_id from :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id');
@@ -48,19 +75,22 @@
       $Qentry-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       $Qentry-&gt;execute();
 
-      if ($Qentry-&gt;numberOfRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qentry-&gt;numberOfRows() === 1 );
     }
 
-    function numberOfEntries() {
+/**
+ * Return the number of address book entries the current customer has
+ *
+ * @access public
+ * @return integer
+ */
+
+    public static function numberOfEntries() {
       global $osC_Database, $osC_Customer;
 
       static $total_entries;
 
-      if ( !is_numeric($total_entries) ) {
+      if ( !isset($total_entries) ) {
         $Qaddresses = $osC_Database-&gt;query('select count(*) as total from :table_address_book where customers_id = :customers_id');
         $Qaddresses-&gt;bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
         $Qaddresses-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
@@ -72,18 +102,28 @@
       return $total_entries;
     }
 
-    function saveEntry($data, $id = '') {
+/**
+ * Save an address book entry
+ *
+ * @param array $data An array containing the address book information
+ * @param int $id The ID of the address book entry to update (if this is not provided, a new address book entry is created)
+ * @access public
+ * @return boolean
+ */
+
+    public static function saveEntry($data, $id = '') {
       global $osC_Database, $osC_Customer;
 
       $updated_record = false;
 
-      if (is_numeric($id)) {
+      if ( is_numeric($id) ) {
         $Qab = $osC_Database-&gt;query('update :table_address_book set customers_id = :customers_id, entry_gender = :entry_gender, entry_company = :entry_company, entry_firstname = :entry_firstname, entry_lastname = :entry_lastname, entry_street_address = :entry_street_address, entry_suburb = :entry_suburb, entry_postcode = :entry_postcode, entry_city = :entry_city, entry_state = :entry_state, entry_country_id = :entry_country_id, entry_zone_id = :entry_zone_id, entry_telephone = :entry_telephone, entry_fax = :entry_fax where address_book_id = :address_book_id and customers_id = :customers_id');
         $Qab-&gt;bindInt(':address_book_id', $id);
         $Qab-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       } else {
         $Qab = $osC_Database-&gt;query('insert into :table_address_book (customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id, entry_telephone, entry_fax) values (:customers_id, :entry_gender, :entry_company, :entry_firstname, :entry_lastname, :entry_street_address, :entry_suburb, :entry_postcode, :entry_city, :entry_state, :entry_country_id, :entry_zone_id, :entry_telephone, :entry_fax)');
       }
+
       $Qab-&gt;bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
       $Qab-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       $Qab-&gt;bindValue(':entry_gender', ((ACCOUNT_GENDER &gt; -1) &amp;&amp; isset($data['gender']) &amp;&amp; (($data['gender'] == 'm') || ($data['gender'] == 'f'))) ? $data['gender'] : '');
@@ -101,52 +141,66 @@
       $Qab-&gt;bindValue(':entry_fax', (ACCOUNT_FAX &gt; -1) ? $data['fax'] : '');
       $Qab-&gt;execute();
 
-      if ($Qab-&gt;affectedRows() === 1) {
+      if ( $Qab-&gt;affectedRows() === 1 ) {
         $updated_record = true;
       }
 
-      if (isset($data['primary']) &amp;&amp; ($data['primary'] === true)) {
-        if (is_numeric($id) === false) {
+      if ( isset($data['primary']) &amp;&amp; ($data['primary'] === true) ) {
+        if ( !is_numeric($id) ) {
           $id = $osC_Database-&gt;nextID();
         }
 
-        if (osC_AddressBook::setPrimaryAddress($id)) {
+        if ( osC_AddressBook::setPrimaryAddress($id) ) {
           $osC_Customer-&gt;setCountryID($data['country']);
           $osC_Customer-&gt;setZoneID(($data['zone_id'] &gt; 0) ? (int)$data['zone_id'] : '0');
           $osC_Customer-&gt;setDefaultAddressID($id);
 
-          if ($updated_record === false) {
+          if ( $updated_record === false ) {
             $updated_record = true;
           }
         }
       }
 
-      if ($updated_record === true) {
+      if ( $updated_record === true ) {
         return true;
       }
 
       return false;
     }
 
-    function setPrimaryAddress($id) {
+/**
+ * Set the address book entry as the primary address for the current customer
+ *
+ * @param int $id The ID of the address book entry
+ * @access public
+ * @return boolean
+ */
+
+    public static function setPrimaryAddress($id) {
       global $osC_Database, $osC_Customer;
 
-      if (is_numeric($id) &amp;&amp; ($id &gt; 0)) {
+      if ( is_numeric($id) &amp;&amp; ($id &gt; 0) ) {
         $Qupdate = $osC_Database-&gt;query('update :table_customers set customers_default_address_id = :customers_default_address_id where customers_id = :customers_id');
         $Qupdate-&gt;bindTable(':table_customers', TABLE_CUSTOMERS);
         $Qupdate-&gt;bindInt(':customers_default_address_id', $id);
         $Qupdate-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
         $Qupdate-&gt;execute();
 
-        if ($Qupdate-&gt;affectedRows() === 1) {
-          return true;
-        }
+        return ( $Qupdate-&gt;affectedRows() === 1 );
       }
 
       return false;
     }
 
-    function deleteEntry($id) {
+/**
+ * Delete an address book entry
+ *
+ * @param int $id The ID of the address book entry to delete
+ * @access public
+ * @return boolean
+ */
+
+    public static function deleteEntry($id) {
       global $osC_Database, $osC_Customer;
 
       $Qdelete = $osC_Database-&gt;query('delete from :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id');
@@ -155,11 +209,7 @@
       $Qdelete-&gt;bindInt(':customers_id', $osC_Customer-&gt;getID());
       $Qdelete-&gt;execute();
 
-      if ($Qdelete-&gt;affectedRows() === 1) {
-        return true;
-      }
-
-      return false;
+      return ( $Qdelete-&gt;affectedRows() === 1 );
     }
   }
 ?&gt;</diff>
      <filename>includes/classes/address_book.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,59 +5,109 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2004 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
-  class osC_Banner {
-
-/* Public variables */
-    var $show_duplicates_in_group = false;
+/**
+ * The osC_Banner class manages the banners shown throughout the online store
+ */
 
-/* Private variables */
-    var $_exists_id,
-        $_shown_ids = array();
-
-/* Class constructor */
+  class osC_Banner {
 
-    function osC_Banner() {
-      if (SERVICE_BANNER_SHOW_DUPLICATE == 'True') {
-        $this-&gt;show_duplicates_in_group = true;
+/**
+ * Controls whether banners should be shown multiple times on the page
+ *
+ * @var boolean
+ * @access private
+ */
+
+    private $_show_duplicates_in_group = false;
+
+/**
+ * A placeholder that keeps the banner ID in memory when checking if a banner exists before showing it
+ *
+ * @var id
+ * @access private
+ */
+
+    private $_exists_id;
+
+/**
+ * An array containing the banner IDs already shown on the page
+ *
+ * @var array
+ * @access private
+ */
+
+    private $_shown_ids = array();
+
+/**
+ * Constructor
+ *
+ * @access public
+ */
+
+    public function __construct() {
+      if ( SERVICE_BANNER_SHOW_DUPLICATE == 'True' ) {
+        $this-&gt;_show_duplicates_in_group = true;
       }
     }
 
-/* Public methods */
+/**
+ * Activate a banner that has been on schedule
+ *
+ * @param int $id The ID of the banner to activate
+ * @access public
+ * @return boolean
+ */
 
-    function activate($id) {
-      $this-&gt;_setStatus($id, true);
+    public function activate($id) {
+      return $this-&gt;_setStatus($id, true);
     }
 
-    function activateAll() {
+/**
+ * Activate all banners on schedule
+ *
+ * @access public
+ */
+
+    public function activateAll() {
       global $osC_Database;
 
       $Qbanner = $osC_Database-&gt;query('select banners_id, date_scheduled from :table_banners where date_scheduled != &quot;&quot;');
       $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
       $Qbanner-&gt;execute();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
-        while ($Qbanner-&gt;next()) {
-          if (osC_DateTime::getNow() &gt;= $Qbanner-&gt;value('date_scheduled')) {
-            $this-&gt;activate($Qbanner-&gt;valueInt('banners_id'));
-          }
+      while ( $Qbanner-&gt;next() ) {
+        if ( osC_DateTime::getNow() &gt;= $Qbanner-&gt;value('date_scheduled') ) {
+          $this-&gt;activate($Qbanner-&gt;valueInt('banners_id'));
         }
       }
-
-      $Qbanner-&gt;freeResult();
     }
 
-    function expire($id) {
-      $this-&gt;_setStatus($id, false);
+/**
+ * Deactivate a banner
+ *
+ * @param int $id The ID of the banner to deactivate
+ * @access public
+ * @return boolean
+ */
+
+    public function expire($id) {
+      return $this-&gt;_setStatus($id, false);
     }
 
-    function expireAll() {
+/**
+ * Deactivate all banners that have passed their schedule
+ *
+ * @access public
+ */
+
+    public function expireAll() {
       global $osC_Database;
 
       $Qbanner = $osC_Database-&gt;query('select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from :table_banners b, :table_banners_history bh where b.status = 1 and b.banners_id = bh.banners_id group by b.banners_id');
@@ -65,44 +115,52 @@
       $Qbanner-&gt;bindTable(':table_banners_history', TABLE_BANNERS_HISTORY);
       $Qbanner-&gt;execute();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
-        while ($Qbanner-&gt;next()) {
-          if (!osc_empty($Qbanner-&gt;value('expires_date'))) {
-            if (osC_DateTime::getNow() &gt;= $Qbanner-&gt;value('expires_date')) {
-              $this-&gt;expire($Qbanner-&gt;valueInt('banners_id'));
-            }
-          } elseif (!osc_empty($Qbanner-&gt;valueInt('expires_impressions'))) {
-            if ( ($Qbanner-&gt;valueInt('expires_impressions') &gt; 0) &amp;&amp; ($Qbanner-&gt;valueInt('banners_shown') &gt;= $Qbanner-&gt;valueInt('expires_impressions')) ) {
-              $this-&gt;expire($Qbanner-&gt;valueInt('banners_id'));
-            }
+      while ( $Qbanner-&gt;next() ) {
+        if ( !osc_empty($Qbanner-&gt;value('expires_date')) ) {
+          if ( osC_DateTime::getNow() &gt;= $Qbanner-&gt;value('expires_date') ) {
+            $this-&gt;expire($Qbanner-&gt;valueInt('banners_id'));
+          }
+        } elseif ( !osc_empty($Qbanner-&gt;valueInt('expires_impressions')) ) {
+          if ( ($Qbanner-&gt;valueInt('expires_impressions') &gt; 0) &amp;&amp; ($Qbanner-&gt;valueInt('banners_shown') &gt;= $Qbanner-&gt;valueInt('expires_impressions')) ) {
+            $this-&gt;expire($Qbanner-&gt;valueInt('banners_id'));
           }
         }
       }
-
-      $Qbanner-&gt;freeResult();
     }
 
-    function isActive($id) {
+/**
+ * Check if an existing banner is active
+ *
+ * @param int $id The ID of the banner to check
+ * @access public
+ * @return boolean
+ */
+
+    public function isActive($id) {
       global $osC_Database;
 
-      $Qbanner = $osC_Database-&gt;query('select banners_id from :table_banners where status = 1 and banners_id = :banners_id');
+      $Qbanner = $osC_Database-&gt;query('select status from :table_banners where banners_id = :banners_id');
       $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
       $Qbanner-&gt;bindInt(':banners_id', $id);
       $Qbanner-&gt;execute();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
-        return true;
-      }
-
-      return false;
+      return ( $Qbanner-&gt;valueInt('status') === 1 );
     }
 
-    function exists($group) {
+/**
+ * Check if banners exist in a group. If banners exists, select a random entry and assign its ID to $_exists_id.
+ *
+ * @param string $group The group to check in
+ * @access public
+ * @return boolean
+ */
+
+    public function exists($group) {
       global $osC_Database;
 
       $Qbanner = $osC_Database-&gt;query('select banners_id from :table_banners where status = 1 and banners_group = :banners_group');
 
-      if ( ($this-&gt;show_duplicates_in_group === false) &amp;&amp; (sizeof($this-&gt;_shown_ids) &gt; 0) ) {
+      if ( ($this-&gt;_show_duplicates_in_group === false) &amp;&amp; (sizeof($this-&gt;_shown_ids) &gt; 0) ) {
         $Qbanner-&gt;appendQuery('and banners_id not in (:banner_ids)');
         $Qbanner-&gt;bindRaw(':banner_ids', implode(',', $this-&gt;_shown_ids));
       }
@@ -111,7 +169,7 @@
       $Qbanner-&gt;bindValue(':banners_group', $group);
       $Qbanner-&gt;executeRandom();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
+      if ( $Qbanner-&gt;numberOfRows() &gt; 0 ) {
         $this-&gt;_exists_id = $Qbanner-&gt;valueInt('banners_id');
 
         return true;
@@ -120,12 +178,20 @@
       return false;
     }
 
-    function display($id = '') {
+/**
+ * Display a banner. If no ID is passed, the value defined in $_exists_id is used.
+ *
+ * @param int $id The ID of the banner to show
+ * @access public
+ * @return string
+ */
+
+    public function display($id = null) {
       global $osC_Database;
 
-      $banner_string = false;
+      $banner_string = '';
 
-      if (empty($id) &amp;&amp; isset($this-&gt;_exists_id) &amp;&amp; is_numeric($this-&gt;_exists_id)) {
+      if ( empty($id) &amp;&amp; isset($this-&gt;_exists_id) &amp;&amp; is_numeric($this-&gt;_exists_id) ) {
         $id = $this-&gt;_exists_id;
 
         unset($this-&gt;_exists_id);
@@ -136,8 +202,8 @@
       $Qbanner-&gt;bindInt(':banners_id', $id);
       $Qbanner-&gt;execute();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
-        if (!osc_empty($Qbanner-&gt;value('banners_html_text'))) {
+      if ( $Qbanner-&gt;numberOfRows() &gt; 0 ) {
+        if ( !osc_empty($Qbanner-&gt;value('banners_html_text')) ) {
           $banner_string = $Qbanner-&gt;value('banners_html_text');
         } else {
           $banner_string = osc_link_object(osc_href_link(FILENAME_REDIRECT, 'action=banner&amp;goto=' . $Qbanner-&gt;valueInt('banners_id')), osc_image(DIR_WS_IMAGES . $Qbanner-&gt;value('banners_image'), $Qbanner-&gt;value('banners_title')), 'target=&quot;_blank&quot;');
@@ -145,60 +211,77 @@
 
         $this-&gt;_updateDisplayCount($Qbanner-&gt;valueInt('banners_id'));
 
-        if ($this-&gt;show_duplicates_in_group === false) {
+        if ( $this-&gt;_show_duplicates_in_group === false ) {
           $this-&gt;_shown_ids[] = $Qbanner-&gt;valueInt('banners_id');
         }
       }
 
-      $Qbanner-&gt;freeResult();
-
       return $banner_string;
     }
 
-    function getURL($id, $increment_click = false) {
+/**
+ * Return the URL assigned to the banner
+ *
+ * @param int $id The ID of the banner
+ * @param boolean $increment_click_flag A flag to state if the banner click count should be incremented
+ * @access public
+ * @return string
+ */
+
+    public function getURL($id, $increment_click_flag = false) {
       global $osC_Database;
 
-      $url = false;
+      $url = '';
 
       $Qbanner = $osC_Database-&gt;query('select banners_url from :table_banners where banners_id = :banners_id and status = 1');
       $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
       $Qbanner-&gt;bindInt(':banners_id', $id);
       $Qbanner-&gt;execute();
 
-      if ($Qbanner-&gt;numberOfRows() &gt; 0) {
+      if ( $Qbanner-&gt;numberOfRows() &gt; 0 ) {
         $url = $Qbanner-&gt;value('banners_url');
 
-        if ($increment_click === true) {
+        if ( $increment_click_flag === true ) {
           $this-&gt;_updateClickCount($id);
         }
       }
 
-      $Qbanner-&gt;freeResult();
-
       return $url;
     }
 
-/* Private methods */
+/**
+ * Sets the status of a banner
+ *
+ * @param int $id The ID of the banner to set the status to
+ * @param boolean $active_flag A flag that enables or disables the banner
+ * @access private
+ * @return boolean
+ */
 
-    function _setStatus($id, $active) {
+    private function _setStatus($id, $active_flag) {
       global $osC_Database;
 
-      if ($active === true) {
+      if ( $active_flag === true ) {
         $Qbanner = $osC_Database-&gt;query('update :table_banners set status = 1, date_status_change = now(), date_scheduled = NULL where banners_id = :banners_id');
-        $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
-        $Qbanner-&gt;bindInt(':banners_id', $id);
-        $Qbanner-&gt;execute();
       } else {
         $Qbanner = $osC_Database-&gt;query('update :table_banners set status = 0, date_status_change = now() where banners_id = :banners_id');
-        $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
-        $Qbanner-&gt;bindInt(':banners_id', $id);
-        $Qbanner-&gt;execute();
       }
 
-      $Qbanner-&gt;freeResult();
+      $Qbanner-&gt;bindTable(':table_banners', TABLE_BANNERS);
+      $Qbanner-&gt;bindInt(':banners_id', $id);
+      $Qbanner-&gt;execute();
+
+      return ( $Qbanner-&gt;affectedRows() === 1 );
     }
 
-    function _updateDisplayCount($id) {
+/**
+ * Increment the display count of the banner
+ *
+ * @param int $id The ID of the banner
+ * @access private
+ */
+
+    private function _updateDisplayCount($id) {
       global $osC_Database;
 
       $Qcheck = $osC_Database-&gt;query('select count(*) as count from :table_banners_history where banners_id = :banners_id and date_format(banners_history_date, &quot;%Y%m%d&quot;) = date_format(now(), &quot;%Y%m%d&quot;)');
@@ -206,20 +289,25 @@
       $Qcheck-&gt;bindInt(':banners_id', $id);
       $Qcheck-&gt;execute();
 
-      if ($Qcheck-&gt;valueInt('count') &gt; 0) {
+      if ( $Qcheck-&gt;valueInt('count') &gt; 0 ) {
         $Qbanner = $osC_Database-&gt;query('update :table_banners_history set banners_shown = banners_shown + 1 where banners_id = :banners_id and date_format(banners_history_date, &quot;%Y%m%d&quot;) = date_format(now(), &quot;%Y%m%d&quot;)');
       } else {
         $Qbanner = $osC_Database-&gt;query('insert into :table_banners_history (banners_id, banners_shown, banners_history_date) values (:banners_id, 1, now())');
       }
+
       $Qbanner-&gt;bindTable(':table_banners_history', TABLE_BANNERS_HISTORY);
       $Qbanner-&gt;bindInt(':banners_id', $id);
       $Qbanner-&gt;execute();
-
-      $Qcheck-&gt;freeResult();
-      $Qbanner-&gt;freeResult();
     }
 
-    function _updateClickCount($id) {
+/**
+ * Increment the click count of the banner
+ *
+ * @param int $id The ID of the banner
+ * @access private
+ */
+
+    private function _updateClickCount($id) {
       global $osC_Database;
 
       $Qcheck = $osC_Database-&gt;query('select count(*) as count from :table_banners_history where banners_id = :banners_id and date_format(banners_history_date, &quot;%Y%m%d&quot;) = date_format(now(), &quot;%Y%m%d&quot;)');
@@ -227,17 +315,15 @@
       $Qcheck-&gt;bindInt(':banners_id', $id);
       $Qcheck-&gt;execute();
 
-      if ($Qcheck-&gt;valueInt('count') &gt; 0) {
+      if ( $Qcheck-&gt;valueInt('count') &gt; 0 ) {
         $Qbanner = $osC_Database-&gt;query('update :table_banners_history set banners_clicked = banners_clicked + 1 where banners_id = :banners_id and date_format(banners_history_date, &quot;%Y%m%d&quot;) = date_format(now(), &quot;%Y%m%d&quot;)');
       } else {
         $Qbanner = $osC_Database-&gt;query('insert into :table_banners_history (banners_id, banners_clicked, banners_history_date) values (:banners_id, 1, now())');
       }
+
       $Qbanner-&gt;bindTable(':table_banners_history', TABLE_BANNERS_HISTORY);
       $Qbanner-&gt;bindInt(':banners_id', $id);
       $Qbanner-&gt;execute();
-
-      $Qcheck-&gt;freeResult();
-      $Qbanner-&gt;freeResult();
     }
   }
 ?&gt;</diff>
      <filename>includes/classes/banner.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,42 +5,91 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2006 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
 */
 
-  class breadcrumb {
-    var $_trail;
+/**
+ * The osC_Breadcrumb class handles the breadcrumb navigation path
+ */
 
-    function breadcrumb() {
-      $this-&gt;reset();
-    }
+  class osC_Breadcrumb {
+
+/**
+ * An array containing the breadcrumb navigation path
+ *
+ * @var array
+ * @access private
+ */
+
+    private $_path = array();
 
-    function reset() {
-      $this-&gt;_trail = array();
+/**
+ * Resets the breadcrumb navigation path
+ *
+ * @access public
+ */
+
+    public function reset() {
+      $this-&gt;_path = array();
     }
 
-    function add($title, $link = '') {
-      $this-&gt;_trail[] = array('title' =&gt; $title, 'link' =&gt; $link);
+/**
+ * Adds an entry to the breadcrumb navigation path
+ *
+ * @param string $title The title of the breadcrumb navigation entry
+ * @param string $link The link of the breadcrumb navigation entry
+ * @access public
+ */
+
+    public function add($title, $link = null) {
+      $this-&gt;_path[] = array('title' =&gt; $title,
+                             'link' =&gt; $link);
     }
 
-    function trail($separator = ' - ') {
+/**
+ * Returns the breadcrumb navigation path with the entries separated by $separator
+ *
+ * @param string $separator The string value to separate the breadcrumb navigation path entries with
+ * @access public
+ * @return string
+ */
+
+    public function getPath($separator = ' - ') {
       $trail_string = '';
 
-      for ($i=0, $n=sizeof($this-&gt;_trail); $i&lt;$n; $i++) {
-        if (isset($this-&gt;_trail[$i]['link']) &amp;&amp; !empty($this-&gt;_trail[$i]['link'])) {
-          $trail_string .= osc_link_object($this-&gt;_trail[$i]['link'], $this-&gt;_trail[$i]['title']);
+      $trail_size = sizeof($this-&gt;_path);
+      $counter = 0;
+
+      foreach ( $this-&gt;_path as $entry ) {
+        $counter++;
+
+        if ( !empty($entry['link']) ) {
+          $trail_string .= osc_link_object($entry['link'], $entry['title']);
         } else {
-          $trail_string .= $this-&gt;_trail[$i]['title'];
+          $trail_string .= $entry['title'];
         }
 
-        if (($i+1) &lt; $n) $trail_string .= $separator;
+        if ( $counter &lt; $trail_size ) {
+          $trail_string .= $separator;
+        }
       }
 
       return $trail_string;
     }
+
+/**
+ * Returns the breadcrumb navigation path array
+ *
+ * @access public
+ * @return array
+ */
+
+    public function getArray() {
+      return $this-&gt;_path;
+    }
   }
 ?&gt;</diff>
      <filename>includes/classes/breadcrumb.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,103 +5,129 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2004 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
   as published by the Free Software Foundation.
-
-  Class usage examples:
-
-  - Caching HTML:
-    if ($osC_Cache-&gt;read('key', 60) === false) {
-      $osC_Cache-&gt;startBuffer();
-      ------ PHP/HTML LOGIC HERE ------
-      $osC_Cache-&gt;stopBuffer();
-    }
-
-    echo $osC_Cache-&gt;getCache();
-
-  - Caching data (in memory):
-    if ($osC_Cache-&gt;read('key', 60) {
-      $variable = $osC_Cache-&gt;getCache();
-    } else {
-      $variable = array('some', 'data');
-
-      $osC_Cache-&gt;writeBuffer($variable);
-    }
 */
 
-  class osC_Cache {
-    var $cached_data,
-        $cache_key;
-
-    function write($key, &amp;$data) {
-      $filename = DIR_FS_WORK . $key . '.cache';
+/**
+ * The osC_Cache class handles the caching of dynamically generated data
+ */
 
-      if ($fp = @fopen($filename, 'w')) {
-        flock($fp, 2); // LOCK_EX
-        fputs($fp, serialize($data));
-        flock($fp, 3); // LOCK_UN
-        fclose($fp);
+  class osC_Cache {
 
-        return true;
+/**
+ * The cached data
+ *
+ * @var mixed
+ * @access private
+ */
+
+    private $_data;
+
+/**
+ * The key ID for the cached data
+ *
+ * @var string
+ * @access private
+ */
+
+    private $_key;
+
+/**
+ * Write the data to a cache file
+ *
+ * @param string mixed $data The data to cache
+ * @param string $key The key ID to save the cached data with
+ * @access public
+ */
+
+    public function write($data, $key = null) {
+      if ( empty($key) ) {
+        $key = $this-&gt;_key;
       }
 
-      return false;
+      return ( file_put_contents(DIR_FS_WORK . $key . '.cache', serialize($data), LOCK_EX) !== false );
     }
 
-    function read($key, $expire = 0) {
-      $this-&gt;cache_key = $key;
+/**
+ * Read data from a cache file if it has not yet expired
+ *
+ * @param string $key The key ID to read the data from the cached file
+ * @param int $expire The amount of minutes the cached data is active for
+ * @access public
+ * @return boolean
+ */
+
+    public function read($key, $expire = null) {
+      $this-&gt;_key = $key;
 
       $filename = DIR_FS_WORK . $key . '.cache';
 
-      if (file_exists($filename)) {
+      if ( file_exists($filename) ) {
         $difference = floor((time() - filemtime($filename)) / 60);
 
-        if ( ($expire == '0') || ($difference &lt; $expire) ) {
-          if ($fp = @fopen($filename, 'r')) {
-            $this-&gt;cached_data = unserialize(fread($fp, filesize($filename)));
+        if ( empty($expire) || ( is_numeric($expire) &amp;&amp; ($difference &lt; $expire)) ) {
+          $this-&gt;_data = unserialize(file_get_contents($filename));
 
-            fclose($fp);
-
-            return true;
-          }
+          return true;
         }
       }
 
       return false;
     }
 
-    function &amp;getCache() {
-      return $this-&gt;cached_data;
+/**
+ * Return the cached data
+ *
+ * @access public
+ * @return mixed
+ */
+
+    public function getCache() {
+      return $this-&gt;_data;
     }
 
-    function startBuffer() {
+/**
+ * Start the buffer to cache its contents
+ *
+ * @access public
+ */
+
+    public function startBuffer() {
       ob_start();
     }
 
-    function stopBuffer() {
-      $this-&gt;cached_data = ob_get_contents();
+/**
+ * Stop the buffer and cache its contents
+ *
+ * @access public
+ */
+
+    public function stopBuffer() {
+      $this-&gt;_data = ob_get_contents();
 
       ob_end_clean();
 
-      $this-&gt;write($this-&gt;cache_key, $this-&gt;cached_data);
+      $this-&gt;write($this-&gt;_data);
     }
 
-    function writeBuffer(&amp;$data) {
-      $this-&gt;cached_data = $data;
-
-      $this-&gt;write($this-&gt;cache_key, $this-&gt;cached_data);
-    }
+/**
+ * Delete cached files by their key ID
+ *
+ * @param string $key The key ID of the cached files to delete
+ * @access public
+ */
 
-    function clear($key) {
+    public static function clear($key) {
       $key_length = strlen($key);
 
       $d = dir(DIR_FS_WORK);
 
-      while ($entry = $d-&gt;read()) {
-        if ((strlen($entry) &gt;= $key_length) &amp;&amp; (substr($entry, 0, $key_length) == $key)) {
+      while ( ($entry = $d-&gt;read()) !== false ) {
+        if ( (strlen($entry) &gt;= $key_length) &amp;&amp; (substr($entry, 0, $key_length) == $key) ) {
           @unlink(DIR_FS_WORK . $entry);
         }
       }</diff>
      <filename>includes/classes/cache.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2004 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
@@ -36,7 +36,7 @@
         $category_product_count_start_string = '&amp;nbsp;(',
         $category_product_count_end_string = ')';
 
-    function osC_CategoryTree($load_from_database = true) {
+    function __construct($load_from_database = true) {
       global $osC_Database, $osC_Cache, $osC_Language;
 
       if (SERVICES_CATEGORY_PATH_CALCULATE_PRODUCT_COUNT == '1') {
@@ -65,7 +65,7 @@
             $this-&gt;calculateCategoryProductCount();
           }
 
-          $osC_Cache-&gt;writeBuffer($this-&gt;data);
+          $osC_Cache-&gt;write($this-&gt;data);
         }
       }
     }</diff>
      <filename>includes/classes/category_tree.php</filename>
    </modified>
    <modified>
      <diff>@@ -302,7 +302,7 @@
         $logging_fields = array(),
         $logging_changed = array();
 
-    function osC_Database_Result(&amp;$db_class) {
+    function __construct(&amp;$db_class) {
       $this-&gt;db_class =&amp; $db_class;
     }
 
@@ -445,7 +445,7 @@
         }
 
         if (isset($this-&gt;cache_key)) {
-          $osC_Cache-&gt;write($this-&gt;cache_key, $this-&gt;cache_data);
+          $osC_Cache-&gt;write($this-&gt;cache_data, $this-&gt;cache_key);
         }
       }
 
@@ -485,7 +485,7 @@
 
       if (isset($this-&gt;cache_key)) {
         if ($osC_Cache-&gt;read($this-&gt;cache_key, $this-&gt;cache_expire)) {
-          $this-&gt;cache_data = $osC_Cache-&gt;cached_data;
+          $this-&gt;cache_data = $osC_Cache-&gt;getCache();
 
           $this-&gt;cache_read = true;
         }</diff>
      <filename>includes/classes/database.php</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com
 
-  Copyright (c) 2005 osCommerce
+  Copyright (c) 2007 osCommerce
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License v2 (1991)
@@ -23,7 +23,7 @@
         $_keys,
         $_group;
 
-    function osC_Modules($group) {
+    function __construct($group) {
       global $osC_Database, $osC_Template, $osC_Cache;
 
       $this-&gt;_group = $group;
@@ -86,7 +86,7 @@
           }
         }
 
-        $osC_Cache-&gt;writeBuffer($data);
+        $osC_Cache-&gt;write($data);
       }
 
       $this-&gt;_modules = $data;</diff>
      <filename>includes/classes/modules.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,12 +27,12 @@
 /* Class constructor */
 
     function osC_Account_Address_book() {
-      global $osC_Language, $osC_Services, $breadcrumb, $osC_Customer, $messageStack;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb, $osC_Customer, $messageStack;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('address_book_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
       if ($osC_Customer-&gt;hasDefaultAddress() === false) {
@@ -42,7 +42,7 @@
         $this-&gt;addJavascriptPhpFilename('includes/form_check.js.php');
       } elseif (isset($_GET['new'])) {
         if ($osC_Services-&gt;isStarted('breadcrumb')) {
-          $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_add_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '&amp;new', 'SSL'));
+          $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_add_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '&amp;new', 'SSL'));
         }
 
         $this-&gt;_page_title = $osC_Language-&gt;get('address_book_add_entry_heading');
@@ -56,7 +56,7 @@
 
         if ($messageStack-&gt;size('address_book') == 0) {
           if ($osC_Services-&gt;isStarted('breadcrumb')) {
-            $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_edit_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module] . '&amp;edit', 'SSL'));
+            $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_edit_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module] . '&amp;edit', 'SSL'));
           }
 
           $this-&gt;_page_title = $osC_Language-&gt;get('address_book_edit_entry_heading');
@@ -75,7 +75,7 @@
 
         if ($messageStack-&gt;size('address_book') == 0) {
           if ($osC_Services-&gt;isStarted('breadcrumb')) {
-            $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_delete_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module] . '&amp;delete', 'SSL'));
+            $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_address_book_delete_entry'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module] . '&amp;delete', 'SSL'));
           }
 
           $this-&gt;_page_title = $osC_Language-&gt;get('address_book_delete_entry_heading');</diff>
      <filename>includes/content/account/address_book.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,20 +27,20 @@
 /* Class constructor */
 
     function osC_Account_Create() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('create_account_heading');
 
       if ($_GET[$this-&gt;_module] == 'success') {
         if ($osC_Services-&gt;isStarted('breadcrumb')) {
-          $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_create_account'));
+          $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_create_account'));
         }
 
         $this-&gt;_page_title = $osC_Language-&gt;get('create_account_success_heading');
         $this-&gt;_page_contents = 'create_success.php';
       } else {
         if ($osC_Services-&gt;isStarted('breadcrumb')) {
-          $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_create_account'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+          $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_create_account'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
         }
 
         $this-&gt;addJavascriptPhpFilename('includes/form_check.js.php');</diff>
      <filename>includes/content/account/create.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,14 +27,14 @@
 /* Class constructor */
 
     function osC_Account_Edit() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('account_edit_heading');
 
       $this-&gt;addJavascriptPhpFilename('includes/form_check.js.php');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_edit_account'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_edit_account'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'save') {</diff>
      <filename>includes/content/account/edit.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Account_Login() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
 // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
       if (osc_empty(session_id())) {
@@ -37,7 +37,7 @@
       $this-&gt;_page_title = $osC_Language-&gt;get('sign_in_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sign_in'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sign_in'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'process') {</diff>
      <filename>includes/content/account/login.php</filename>
    </modified>
    <modified>
      <diff>@@ -24,12 +24,12 @@
 /* Class constructor */
 
     function osC_Account_Logoff() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('sign_out_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sign_out'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sign_out'));
       }
 
       $this-&gt;_process();</diff>
      <filename>includes/content/account/logoff.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Account_Newsletters() {
-      global $osC_Language, $osC_Services, $breadcrumb, $osC_Database, $osC_Customer, $Qnewsletter;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb, $osC_Database, $osC_Customer, $Qnewsletter;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('newsletters_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_newsletters'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_newsletters'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
 /////////////////////// HPDL /////// Should be moved to the customers class!</diff>
      <filename>includes/content/account/newsletters.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Account_Notifications() {
-      global $osC_Language, $osC_Services, $breadcrumb, $osC_Database, $osC_Customer, $Qglobal;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb, $osC_Database, $osC_Customer, $Qglobal;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('notifications_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_notifications'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_notifications'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
 /////////////////////// HPDL /////// Should be moved to the customers class!</diff>
      <filename>includes/content/account/notifications.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,17 +27,17 @@
 /* Class constructor */
 
     function osC_Account_Orders() {
-      global $osC_Services, $osC_Language, $osC_Customer, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Customer, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('orders_heading');
 
       $osC_Language-&gt;load('order');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_my_orders'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_my_orders'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
 
         if (is_numeric($_GET[$this-&gt;_module])) {
-          $breadcrumb-&gt;add(sprintf($osC_Language-&gt;get('breadcrumb_order_information'), $_GET[$this-&gt;_module]), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module], 'SSL'));
+          $osC_Breadcrumb-&gt;add(sprintf($osC_Language-&gt;get('breadcrumb_order_information'), $_GET[$this-&gt;_module]), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module], 'SSL'));
         }
       }
 </diff>
      <filename>includes/content/account/orders.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,14 +27,14 @@
 /* Class constructor */
 
     function osC_Account_Password() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('account_password_heading');
 
       $this-&gt;addJavascriptPhpFilename('includes/form_check.js.php');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_edit_password'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_edit_password'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'save') {</diff>
      <filename>includes/content/account/password.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,14 +27,14 @@
 /* Class constructor */
 
     function osC_Account_Password_forgotten() {
-      global $osC_Language, $osC_Services, $breadcrumb;
+      global $osC_Language, $osC_Services, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('password_forgotten_heading');
 
       $this-&gt;addJavascriptPhpFilename('includes/form_check.js.php');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_password_forgotten'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_password_forgotten'), osc_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'process') {</diff>
      <filename>includes/content/account/password_forgotten.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Checkout_Cart() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('shopping_cart_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shopping_cart'), osc_href_link(FILENAME_CHECKOUT, null, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shopping_cart'), osc_href_link(FILENAME_CHECKOUT, null, 'SSL'));
       }
 
 //      if ($_GET[$this-&gt;_module] == 'update') {</diff>
      <filename>includes/content/checkout/cart.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Checkout_Confirmation() {
-      global $osC_Session, $osC_Services, $osC_Language, $osC_ShoppingCart, $osC_Customer, $messageStack, $osC_NavigationHistory, $breadcrumb, $osC_Payment;
+      global $osC_Session, $osC_Services, $osC_Language, $osC_ShoppingCart, $osC_Customer, $messageStack, $osC_NavigationHistory, $osC_Breadcrumb, $osC_Payment;
 
       if ($osC_Customer-&gt;isLoggedOn() === false) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -49,7 +49,7 @@
       $osC_Language-&gt;load('order');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_confirmation'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_confirmation'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
       if ( (isset($_POST['comments'])) &amp;&amp; (isset($_SESSION['comments'])) &amp;&amp; (empty($_POST['comments'])) ) {</diff>
      <filename>includes/content/checkout/confirmation.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Checkout_Payment() {
-      global $osC_Database, $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $breadcrumb, $osC_Payment;
+      global $osC_Database, $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $osC_Breadcrumb, $osC_Payment;
 
       if ($osC_Customer-&gt;isLoggedOn() === false) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -57,7 +57,7 @@
       $this-&gt;_page_title = $osC_Language-&gt;get('payment_method_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
 // redirect to the billing address page when no default address exists</diff>
      <filename>includes/content/checkout/payment.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Checkout_Payment_address() {
-      global $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $breadcrumb;
+      global $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $osC_Breadcrumb;
 
       if ($osC_Customer-&gt;isLoggedOn() === false) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -50,8 +50,8 @@
       }
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment'), osc_href_link(FILENAME_CHECKOUT, 'payment', 'SSL'));
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment_address'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment'), osc_href_link(FILENAME_CHECKOUT, 'payment', 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_payment_address'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'process') {</diff>
      <filename>includes/content/checkout/payment_address.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Checkout_Shipping() {
-      global $osC_Database, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $breadcrumb, $osC_Shipping;
+      global $osC_Database, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $osC_Breadcrumb, $osC_Shipping;
 
       if ($osC_Customer-&gt;isLoggedOn() === false) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -48,7 +48,7 @@
       $this-&gt;_page_title = $osC_Language-&gt;get('shipping_method_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
       if ($osC_Customer-&gt;hasDefaultAddress() === false) {</diff>
      <filename>includes/content/checkout/shipping.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Checkout_Shipping_address() {
-      global $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $breadcrumb;
+      global $osC_Session, $osC_ShoppingCart, $osC_Customer, $osC_Services, $osC_Language, $osC_NavigationHistory, $osC_Breadcrumb;
 
       if ($osC_Customer-&gt;isLoggedOn() === false) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -59,8 +59,8 @@
       }
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping'), osc_href_link(FILENAME_CHECKOUT, 'shipping', 'SSL'));
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping_address'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping'), osc_href_link(FILENAME_CHECKOUT, 'shipping', 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_shipping_address'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
       if (($_GET[$this-&gt;_module] == 'process')) {</diff>
      <filename>includes/content/checkout/shipping_address.php</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
 /* Class constructor */
 
     function osC_Checkout_Success() {
-      global $osC_Services, $osC_Language, $osC_Customer, $osC_NavigationHistory, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Customer, $osC_NavigationHistory, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('success_heading');
 
@@ -35,7 +35,7 @@
       }
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_success'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_checkout_success'), osc_href_link(FILENAME_CHECKOUT, $this-&gt;_module, 'SSL'));
       }
 
       if ($_GET[$this-&gt;_module] == 'update') {</diff>
      <filename>includes/content/checkout/success.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Index_Index() {
-      global $osC_Database, $osC_Services, $osC_Language, $breadcrumb, $cPath, $cPath_array, $current_category_id, $osC_Category;
+      global $osC_Database, $osC_Services, $osC_Language, $osC_Breadcrumb, $cPath, $cPath_array, $current_category_id, $osC_Category;
 
       $this-&gt;_page_title = sprintf($osC_Language-&gt;get('index_heading'), STORE_NAME);
 
@@ -45,7 +45,7 @@
           $Qcategories-&gt;freeResult();
 
           for ($i=0, $n=sizeof($cPath_array); $i&lt;$n; $i++) {
-            $breadcrumb-&gt;add($categories[$cPath_array[$i]], osc_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
+            $osC_Breadcrumb-&gt;add($categories[$cPath_array[$i]], osc_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
           }
         }
 </diff>
      <filename>includes/content/index/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Index_Manufacturers() {
-      global $osC_Services, $osC_Language, $breadcrumb, $osC_Manufacturer;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb, $osC_Manufacturer;
 
       $this-&gt;_page_title = sprintf($osC_Language-&gt;get('index_heading'), STORE_NAME);
 
@@ -34,7 +34,7 @@
         $osC_Manufacturer = new osC_Manufacturer($_GET[$this-&gt;_module]);
 
         if ($osC_Services-&gt;isStarted('breadcrumb')) {
-          $breadcrumb-&gt;add($osC_Manufacturer-&gt;getTitle(), osc_href_link(FILENAME_DEFAULT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module]));
+          $osC_Breadcrumb-&gt;add($osC_Manufacturer-&gt;getTitle(), osc_href_link(FILENAME_DEFAULT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module]));
         }
 
         $this-&gt;_page_title = $osC_Manufacturer-&gt;getTitle();</diff>
      <filename>includes/content/index/manufacturers.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Conditions() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_conditions_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_conditions'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_conditions'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/conditions.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Contact() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_contact_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_contact'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_contact'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
 
       if ($_GET[$this-&gt;_module] == 'process') {</diff>
      <filename>includes/content/info/contact.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Cookie() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_cookie_usage_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_cookie_usage'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_cookie_usage'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/cookie.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Privacy() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_privacy_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_privacy'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_privacy'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/privacy.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Shipping() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_shipping_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_shipping'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_shipping'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/shipping.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Sitemap() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_sitemap_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sitemap'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_sitemap'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/sitemap.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Info_Ssl_check() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('info_ssl_check_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_ssl_check'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_ssl_check'), osc_href_link(FILENAME_INFO, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/info/ssl_check.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Products_New() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('new_products_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_new_products'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_new_products'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/products/new.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Products_Products() {
-      global $osC_Database, $osC_Services, $osC_Session, $osC_Language, $breadcrumb, $osC_Product;
+      global $osC_Database, $osC_Services, $osC_Session, $osC_Language, $osC_Breadcrumb, $osC_Product;
 
       if (empty($_GET) === false) {
         $id = false;
@@ -53,7 +53,7 @@
           osC_Services_category_path::process($osC_Product-&gt;getCategoryID());
 
           if ($osC_Services-&gt;isStarted('breadcrumb')) {
-            $breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product-&gt;getKeyword()));
+            $osC_Breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product-&gt;getKeyword()));
           }
 
           $this-&gt;_page_title = $osC_Product-&gt;getTitle();</diff>
      <filename>includes/content/products/products.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Products_Reviews() {
-      global $osC_Services, $osC_Session, $osC_Language, $breadcrumb, $osC_Product, $osC_Customer, $osC_NavigationHistory;
+      global $osC_Services, $osC_Session, $osC_Language, $osC_Breadcrumb, $osC_Product, $osC_Customer, $osC_NavigationHistory;
 
       if ($osC_Services-&gt;isStarted('reviews') === false) {
         osc_redirect(osc_href_link(FILENAME_DEFAULT));
@@ -34,7 +34,7 @@
       $this-&gt;_page_title = $osC_Language-&gt;get('reviews_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_reviews'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_reviews'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
       }
 
       if (is_numeric($_GET[$this-&gt;_module])) {
@@ -45,7 +45,7 @@
           $this-&gt;_page_contents = 'reviews_info.php';
 
           if ($osC_Services-&gt;isStarted('breadcrumb')) {
-            $breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '=' . $_GET[$this-&gt;_module]));
+            $osC_Breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '=' . $_GET[$this-&gt;_module]));
           }
         } else {
           $this-&gt;_page_contents = 'reviews_not_found.php';
@@ -76,8 +76,8 @@
               $this-&gt;addJavascriptPhpFilename('templates/' . $this-&gt;getCode() . '/javascript/products/reviews_new.php');
 
               if ($osC_Services-&gt;isStarted('breadcrumb')) {
-                $breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
-                $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_reviews_new'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '=new&amp;' . $osC_Product-&gt;getKeyword()));
+                $osC_Breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
+                $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_reviews_new'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '=new&amp;' . $osC_Product-&gt;getKeyword()));
               }
 
               if (isset($_GET['action']) &amp;&amp; ($_GET['action'] == 'process')) {
@@ -90,7 +90,7 @@
               $this-&gt;_page_contents = 'product_reviews.php';
 
               if ($osC_Services-&gt;isStarted('breadcrumb')) {
-                $breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
+                $osC_Breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
               }
             }
           }</diff>
      <filename>includes/content/products/reviews.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 /* Class constructor */
 
     function osC_Products_Specials() {
-      global $osC_Services, $osC_Language, $breadcrumb;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('specials_heading');
 
       if ($osC_Services-&gt;isStarted('breadcrumb')) {
-        $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_specials'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
+        $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_specials'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module));
       }
     }
   }</diff>
      <filename>includes/content/products/specials.php</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@
 /* Class constructor */
 
     function osC_Products_Tell_a_friend() {
-      global $osC_Services, $osC_Session, $osC_Language, $breadcrumb, $osC_Customer, $osC_NavigationHistory, $osC_Product;
+      global $osC_Services, $osC_Session, $osC_Language, $osC_Breadcrumb, $osC_Customer, $osC_NavigationHistory, $osC_Product;
 
       if ((ALLOW_GUEST_TO_TELL_A_FRIEND == '-1') &amp;&amp; ($osC_Customer-&gt;isLoggedOn() === false)) {
         $osC_NavigationHistory-&gt;setSnapshot();
@@ -51,8 +51,8 @@
             $this-&gt;_page_title = $osC_Product-&gt;getTitle();
 
             if ($osC_Services-&gt;isStarted('breadcrumb')) {
-              $breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product-&gt;getKeyword()));
-              $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_tell_a_friend'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
+              $osC_Breadcrumb-&gt;add($osC_Product-&gt;getTitle(), osc_href_link(FILENAME_PRODUCTS, $osC_Product-&gt;getKeyword()));
+              $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_tell_a_friend'), osc_href_link(FILENAME_PRODUCTS, $this-&gt;_module . '&amp;' . $osC_Product-&gt;getKeyword()));
             }
 
             if (isset($_GET['action']) &amp;&amp; ($_GET['action'] == 'process')) {</diff>
      <filename>includes/content/products/tell_a_friend.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
 /* Class constructor */
 
     function osC_Search_Search() {
-      global $osC_Services, $osC_Language, $breadcrumb, $osC_Search;
+      global $osC_Services, $osC_Language, $osC_Breadcrumb, $osC_Search;
 
       $this-&gt;_page_title = $osC_Language-&gt;get('search_heading');
 
@@ -38,7 +38,7 @@
         $this-&gt;_page_contents = 'results.php';
 
         if ($osC_Services-&gt;isStarted('breadcrumb')) {
-          $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_search_results'), osc_href_link(FILENAME_SEARCH, osc_get_all_get_params()));
+          $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_search_results'), osc_href_link(FILENAME_SEARCH, osc_get_all_get_params()));
         }
 
         $this-&gt;_process();</diff>
      <filename>includes/content/search/search.php</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@
             $Qreview-&gt;freeResult();
           }
 
-          $osC_Cache-&gt;writeBuffer($data);
+          $osC_Cache-&gt;write($data);
         }
 
         $this-&gt;_content = '';</diff>
      <filename>includes/modules/boxes/reviews.php</filename>
    </modified>
    <modified>
      <diff>@@ -51,7 +51,7 @@
 
             $data['products_price'] = '&lt;s&gt;' . $osC_Currencies-&gt;displayPrice($Qspecials-&gt;valueDecimal('products_price'), $Qspecials-&gt;valueInt('products_tax_class_id')) . '&lt;/s&gt;&amp;nbsp;&lt;span class=&quot;productSpecialPrice&quot;&gt;' . $osC_Currencies-&gt;displayPrice($Qspecials-&gt;valueDecimal('specials_new_products_price'), $Qspecials-&gt;valueInt('products_tax_class_id')) . '&lt;/span&gt;';
 
-            $osC_Cache-&gt;writeBuffer($data);
+            $osC_Cache-&gt;write($data);
           }
         }
 </diff>
      <filename>includes/modules/boxes/specials.php</filename>
    </modified>
    <modified>
      <diff>@@ -56,7 +56,7 @@
           $data['products_price'] = $products_price;
         }
 
-        $osC_Cache-&gt;writeBuffer($data);
+        $osC_Cache-&gt;write($data);
       }
 
       if (empty($data) === false) {</diff>
      <filename>includes/modules/boxes/whats_new.php</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@
     function start() {
       global $osC_Banner;
 
-      require('includes/classes/banner.php');
+      include('includes/classes/banner.php');
       $osC_Banner = new osC_Banner();
 
       $osC_Banner-&gt;activateAll();</diff>
      <filename>includes/modules/services/banner.php</filename>
    </modified>
    <modified>
      <diff>@@ -14,13 +14,13 @@
 
   class osC_Services_breadcrumb {
     function start() {
-      global $breadcrumb, $osC_Database, $osC_Language, $cPath, $cPath_array;
+      global $osC_Breadcrumb, $osC_Language;
 
       include('includes/classes/breadcrumb.php');
-      $breadcrumb = new breadcrumb;
+      $osC_Breadcrumb = new osC_Breadcrumb();
 
-      $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_top'), HTTP_SERVER);
-      $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_shop'), osc_href_link(FILENAME_DEFAULT));
+      $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_top'), HTTP_SERVER);
+      $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_shop'), osc_href_link(FILENAME_DEFAULT));
 
       return true;
     }</diff>
      <filename>includes/modules/services/breadcrumb.php</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
   $osC_Language-&gt;load('info');
 
   if ($osC_Services-&gt;isStarted('breadcrumb')) {
-    $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_information'), osc_href_link(FILENAME_INFO));
+    $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_information'), osc_href_link(FILENAME_INFO));
   }
 
   $osC_Template = osC_Template::setup('info');</diff>
      <filename>info.php</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
   $osC_Language-&gt;load('search');
 
   if ($osC_Services-&gt;isStarted('breadcrumb')) {
-    $breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_search'), osc_href_link(FILENAME_SEARCH));
+    $osC_Breadcrumb-&gt;add($osC_Language-&gt;get('breadcrumb_search'), osc_href_link(FILENAME_SEARCH));
   }
 
   $osC_Template = osC_Template::setup('search');</diff>
      <filename>search.php</filename>
    </modified>
    <modified>
      <diff>@@ -281,7 +281,7 @@
     &lt;div id=&quot;breadcrumbPath&quot;&gt;
 
 &lt;?php
-      echo $breadcrumb-&gt;trail(' &amp;raquo; ');
+      echo $osC_Breadcrumb-&gt;getPath(' &amp;raquo; ');
 ?&gt;
 
     &lt;/div&gt;</diff>
      <filename>templates/default.php</filename>
    </modified>
    <modified>
      <diff>@@ -70,7 +70,7 @@
 
 &lt;?php
     if ($osC_Services-&gt;isStarted('breadcrumb')) {
-      echo $breadcrumb-&gt;trail(' &amp;raquo; ');
+      echo $osC_Breadcrumb-&gt;getPath(' &amp;raquo; ');
     }
 ?&gt;
 </diff>
      <filename>templates/table_based.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4ecbbfdd8d396c20bd09c7138a9aa577b7703d67</id>
    </parent>
  </parents>
  <author>
    <name>Harald Ponce de Leon</name>
    <email>hpdl@oscommerce.com</email>
  </author>
  <url>http://github.com/osCommerce/oscommerce/commit/d664fe89ee648c2788564bce4fff14c601b07988</url>
  <id>d664fe89ee648c2788564bce4fff14c601b07988</id>
  <committed-date>2009-03-06T15:25:01-08:00</committed-date>
  <authored-date>2009-03-06T15:25:01-08:00</authored-date>
  <message>merge from hpdl r1669-r1670, r1672
PHP 5 Optimizations</message>
  <tree>bb56ed284b90d6d885ce8f060e65f5cced1b3bbb</tree>
  <committer>
    <name>Harald Ponce de Leon</name>
    <email>hpdl@oscommerce.com</email>
  </committer>
</commit>
