Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

439
 
620
 
620
 
order_total.php
_> 11 <?php
  22 /*
<> 3 -  $Id: order_total.php 439 2006-02-19 16:33:18Z hpdl $
   3+  $Id: order_total.php 620 2006-07-13 10:48:54Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
5858       return $this->_description;
  5959     }
  6060 
<> 61 -    function getStatus() {
   61+    function isEnabled() {
6262       return $this->_status;
  6363     }
  6464 
     
 !
7474       foreach ($this->_modules as $module) {
  7575         $module = 'osC_OrderTotal_' . $module;
  7676 
<> 77 -        if ($GLOBALS[$module]->getStatus() === true) {
   77+        if ($GLOBALS[$module]->isEnabled() === true) {
7878           $GLOBALS[$module]->process();
  7979 
  8080           foreach ($GLOBALS[$module]->output as $output) {
     
 !
9999         $has_active = false;
  100100 
  101101         foreach ($this->_modules as $module) {
<> 102 -          if ($GLOBALS['osC_OrderTotal_' . $module]->getStatus() === true) {
   102+          if ($GLOBALS['osC_OrderTotal_' . $module]->isEnabled() === true) {
103103             $has_active = true;
  104104             break;
  105105           }
     
 !
109109       return $has_active;
  110110     }
  111111 
<> 112 -    function hasKeys() {
  113 -      static $has_keys;
  114 -
  115 -      if (isset($has_keys) === false) {
  116 -        $has_keys = (sizeof($this->getKeys()) > 0) ? true : false;
  117 -      }
  118 -
  119 -      return $has_keys;
  120 -    }
  121 -
  122 -    function install() {
  123 -      global $osC_Database, $osC_Language;
  124 -
  125 -      $Qinstall = $osC_Database->query('insert into :table_templates_boxes (title, code, author_name, author_www, modules_group) values (:title, :code, :author_name, :author_www, :modules_group)');
  126 -      $Qinstall->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);
  127 -      $Qinstall->bindValue(':title', $this->_title);
  128 -      $Qinstall->bindValue(':code', $this->_code);
  129 -      $Qinstall->bindValue(':author_name', $this->_author_name);
  130 -      $Qinstall->bindValue(':author_www', $this->_author_www);
  131 -      $Qinstall->bindValue(':modules_group', $this->_group);
  132 -      $Qinstall->execute();
  133 -
  134 -      foreach ($osC_Language->getAll() as $key => $value) {
  135 -        if (file_exists(dirname(__FILE__) . '/../languages/' . $key . '/modules/' . $this->_group . '/' . $this->_code . '.xml')) {
  136 -          foreach ($osC_Language->extractDefinitions($key . '/modules/' . $this->_group . '/' . $this->_code . '.xml') as $def) {
  137 -            $Qcheck = $osC_Database->query('select id from :table_languages_definitions where definition_key = :definition_key and content_group = :content_group and languages_id = :languages_id limit 1');
  138 -            $Qcheck->bindTable(':table_languages_definitions', TABLE_LANGUAGES_DEFINITIONS);
  139 -            $Qcheck->bindValue(':definition_key', $def['key']);
  140 -            $Qcheck->bindValue(':content_group', $def['group']);
  141 -            $Qcheck->bindInt(':languages_id', $value['id']);
  142 -            $Qcheck->execute();
  143 -
  144 -            if ($Qcheck->numberOfRows() === 1) {
  145 -              $Qdef = $osC_Database->query('update :table_languages_definitions set definition_value = :definition_value where definition_key = :definition_key and content_group = :content_group and languages_id = :languages_id');
  146 -            } else {
  147 -              $Qdef = $osC_Database->query('insert into :table_languages_definitions (languages_id, content_group, definition_key, definition_value) values (:languages_id, :content_group, :definition_key, :definition_value)');
  148 -            }
  149 -            $Qdef->bindTable(':table_languages_definitions', TABLE_LANGUAGES_DEFINITIONS);
  150 -            $Qdef->bindInt(':languages_id', $value['id']);
  151 -            $Qdef->bindValue(':content_group', $def['group']);
  152 -            $Qdef->bindValue(':definition_key', $def['key']);
  153 -            $Qdef->bindValue(':definition_value', $def['value']);
  154 -            $Qdef->execute();
  155 -          }
  156 -        }
  157 -      }
  158 -
  159 -      osC_Cache::clear('languages');
  160 -    }
  161 -
  162 -    function remove() {
  163 -      global $osC_Database, $osC_Language;
  164 -
  165 -      $Qdel = $osC_Database->query('delete from :table_templates_boxes where code = :code and modules_group = :modules_group');
  166 -      $Qdel->bindTable(':table_templates_boxes', TABLE_TEMPLATES_BOXES);
  167 -      $Qdel->bindValue(':code', $this->_code);
  168 -      $Qdel->bindValue(':modules_group', $this->_group);
  169 -      $Qdel->execute();
  170 -
  171 -      if ($this->hasKeys()) {
  172 -        $Qdel = $osC_Database->query('delete from :table_configuration where configuration_key in (":configuration_key")');
  173 -        $Qdel->bindTable(':table_configuration', TABLE_CONFIGURATION);
  174 -        $Qdel->bindRaw(':configuration_key', implode('", "', $this->getKeys()));
  175 -        $Qdel->execute();
  176 -      }
  177 -
  178 -      if (file_exists(dirname(__FILE__) . '/../languages/' . $osC_Language->getCode() . '/modules/' . $this->_group . '/' . $this->_code . '.xml')) {
  179 -        foreach ($osC_Language->extractDefinitions($osC_Language->getCode() . '/modules/' . $this->_group . '/' . $this->_code . '.xml') as $def) {
  180 -          $Qdel = $osC_Database->query('delete from :table_languages_definitions where definition_key = :definition_key and content_group = :content_group');
  181 -          $Qdel->bindTable(':table_languages_definitions', TABLE_LANGUAGES_DEFINITIONS);
  182 -          $Qdel->bindValue(':definition_key', $def['key']);
  183 -          $Qdel->bindValue(':content_group', $def['group']);
  184 -          $Qdel->execute();
  185 -        }
  186 -
  187 -        osC_Cache::clear('languages');
  188 -      }
  189 -    }
  190 -
<_ 191112     function _usortModules($a, $b) {
  192113       if ($GLOBALS['osC_OrderTotal_' . $a]->getSortOrder() == $GLOBALS['osC_OrderTotal_' . $b]->getSortOrder()) {
  193114         return strnatcasecmp($GLOBALS['osC_OrderTotal_' . $a]->getTitle(), $GLOBALS['osC_OrderTotal_' . $a]->getTitle());