Skip to content

Commit

Permalink
hide deleted categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Neuhaus committed Jan 4, 2016
1 parent 04c5906 commit 4bfea82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Controller/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ public function indexAction() {
$categories = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'*',
'sys_category',
$where . BackendUtility::BEenableFields('sys_category'),
$where . ' AND deleted = 0' . BackendUtility::BEenableFields('sys_category'),
'',
'sorting'
);
var_dump($where . BackendUtility::BEenableFields('sys_category'));
exit();
$categories = $this->createNestedSet($categories);
$this->view->assign('categories', $categories);
$this->view->assign('token', $_GET['moduleToken']);
Expand All @@ -59,7 +61,6 @@ public function indexAction() {
public function createNestedSet($rows, $parent = array('uid' => 0)) {
$children = array();
foreach ($rows as $key => $row) {
// var_dump($row);
if ($row['parent'] == $parent['uid']) {
$row['children'] = $this->createNestedSet($rows, $row);
$children[] = $row;
Expand Down

0 comments on commit 4bfea82

Please sign in to comment.