Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

593
 
629
 
629
 
template.php
_> 11 <?php
  22 /*
<> 3 -  $Id: template.php 593 2006-07-03 09:07:11Z hpdl $
   3+  $Id: template.php 629 2006-07-18 14:45:08Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
219219  * @return string
  220220  */
  221221 
<> 222 -    function getCode() {
   222+    function getCode($id = null) {
223223       if (isset($this->_template) === false) {
  224224         $this->set();
  225225       }
  226226 
<> 227 -      return $this->_template;
   227+      if (is_numeric($id)) {
   228+        foreach ($this->getTemplates() as $template) {
   229+          if ($template['id'] == $id) {
   230+            return $template['code'];
   231+          }
   232+        }
   233+      } else {
   234+        return $this->_template;
   235+      }
228236     }
  229237 
  230238 /**
     
 !
368376       $Qtemplates->execute();
  369377 
  370378       while ($Qtemplates->next()) {
<> 371 -        $templates [] = $Qtemplates->toArray();
   379+        $templates[] = $Qtemplates->toArray();
<_ 372380       }
  373381 
  374382       $Qtemplates->freeResult();