From 60ceb9d2a8afd789c6c479a63e2e4cf37c0b7aee Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 19 Mar 2018 19:05:19 +0100 Subject: [PATCH] [module.department] renamed 'getLinkedDepartments' (plural) --- build/api/module/departmentController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/api/module/departmentController.php b/build/api/module/departmentController.php index 513aa95..2c3035b 100644 --- a/build/api/module/departmentController.php +++ b/build/api/module/departmentController.php @@ -24,9 +24,9 @@ class departmentController /** @var professor $prof_repo */ $prof_repo = Repo::getRepo('professor'); - $deps = $prof_repo->getLinkedDepartment($_SESSION['CAS']['login']); + $deps = $prof_repo->getLinkedDepartments($_SESSION['CAS']['login']); - if(is_array($deps)){ + if( count($deps) > 0 ){ foreach ($deps as $dep){ if($dep["idDep"] == $department){ $_SESSION["AvailableDepartment"] = $deps;