Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1034
 
1102
 
1102
 
template.php
_> 11 <?php
  22 /*
<> 3 -  $Id: template.php 1034 2006-10-21 18:02:38Z hpdl $
   3+  $Id: template.php 1102 2006-11-03 21:56:48Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
478478 /**
  479479  * Sets the template to use
  480480  *
<>  481+ * @param string $code The code of the template to use
481482  * @access public
  482483  */
  483484 
<> 484 -    function set() {
  485 -      global $osC_Database;
   485+    function set($code = null) {
   486+      if ( (isset($_SESSION['template']) === false) || !empty($code) || (isset($_GET['template']) && !empty($_GET['template'])) ) {
   487+        if ( !empty( $code ) ) {
   488+          $set_template = $code;
   489+        } else {
   490+          $set_template = (isset($_GET['template']) && !empty($_GET['template'])) ? $_GET['template'] : DEFAULT_TEMPLATE;
   491+        }
486492 
<> 487 -      if ( (isset($_SESSION['template']) === false) || (isset($_GET['template']) && !empty($_GET['template'])) ) {
  488 -        $set_template = (isset($_GET['template']) && !empty($_GET['template'])) ? $_GET['template'] : DEFAULT_TEMPLATE;
  489 -
<_ 490493         $data = array();
  491494         $data_default = array();
  492495