From 4bfea82499475068216cd5b80faa8d60b6626c4c Mon Sep 17 00:00:00 2001 From: Marc Neuhaus Date: Mon, 4 Jan 2016 11:06:12 +0100 Subject: [PATCH] hide deleted categories --- Classes/Controller/CategoryController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/CategoryController.php b/Classes/Controller/CategoryController.php index aba97e6..e01a5a1 100644 --- a/Classes/Controller/CategoryController.php +++ b/Classes/Controller/CategoryController.php @@ -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']); @@ -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;