fixed bug. inactive navigation items were not showing in admin center
This commit is contained in:
parent
1462348fdf
commit
b9e04c6ca3
2 changed files with 5 additions and 3 deletions
|
@ -10,7 +10,7 @@ class AdminNavigationController extends Katharsis_Controller_Abstract
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->_view->list = $this->_navi->getAllItems();
|
||||
$this->_view->list = $this->_navi->getAllItems(false);
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
|
|
|
@ -5,10 +5,12 @@ class Navigation extends Katharsis_Model_Abstract
|
|||
{
|
||||
}
|
||||
|
||||
public function getAllItems()
|
||||
public function getAllItems($onlyActive = true)
|
||||
{
|
||||
$tidyResult = array();
|
||||
$result = $this->_con->fetchAll("SELECT * FROM navigation WHERE parent_id IS NULL AND active = 1 ORDER BY sorting");
|
||||
$activityStatement = $onlyActive ? "AND active = 1" : "";
|
||||
|
||||
$result = $this->_con->fetchAll("SELECT * FROM navigation WHERE parent_id IS NULL " . $activityStatement . " ORDER BY sorting");
|
||||
foreach($result as $item)
|
||||
{
|
||||
$subSet = array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue