Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

298
 
299
 
299
 
category.php
_> 1414     var $_data = array();
  1515 
  1616     function osC_Category($id) {
<> 17 -      global $osC_Database;
   17+      global $osC_CategoryTree;
1818 
<> 19 -      $Qcategory = $osC_Database->query('select c.categories_id as id, c.parent_id, c.categories_image as image, cd.categories_name as name from :table_categories c, :table_categories_description cd where c.categories_id = :categories_id and c.categories_id = cd.categories_id and cd.language_id = :language_id');
  20 -      $Qcategory->bindTable(':table_categories', TABLE_CATEGORIES);
  21 -      $Qcategory->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
  22 -      $Qcategory->bindInt(':categories_id', $id);
  23 -      $Qcategory->bindInt(':language_id', $_SESSION['languages_id']);
  24 -      $Qcategory->execute();
  25 -
  26 -      if ($Qcategory->numberOfRows() === 1) {
  27 -        $this->_data = $Qcategory->toArray();
   19+      if ($osC_CategoryTree->exists($id)) {
   20+        $this->_data = $osC_CategoryTree->getData($id);
2821       }
  2922     }
  3023 
     
 !
3932     function getImage() {
  4033       return $this->_data['image'];
  4134     }
<>  35+
   36+    function hasParent() {
   37+      if ($this->_data['parent_id'] > 0) {
   38+        return true;
   39+      }
   40+
   41+      return false;
   42+    }
   43+
   44+    function getParent() {
   45+      return $this->_data['parent_id'];
   46+    }
   47+
   48+    function getPath() {
   49+      global $osC_CategoryTree;
   50+
   51+      return $osC_CategoryTree->buildBreadcrumb($this->_data['id']);
   52+    }
<_ 4253   }
  4354 ?>