diff options
Diffstat (limited to 'app/controllers/module')
| -rw-r--r-- | app/controllers/module/module.php | 14 | ||||
| -rw-r--r-- | app/controllers/module/mvv_controller.php | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/module/module.php b/app/controllers/module/module.php index 2f6ba4c..854b045 100644 --- a/app/controllers/module/module.php +++ b/app/controllers/module/module.php @@ -53,7 +53,7 @@ class Module_ModuleController extends MVVController if (count($search_result) > 0) { $module_ids = $search_result; } else { - if ($_SESSION['mvv_filter_module_fach_id']) { + if (!empty($_SESSION['mvv_filter_module_fach_id'])) { $module_ids = $this->findModuleIdsByFach($_SESSION['mvv_filter_module_fach_id']); } if (!empty($_SESSION['mvv_filter_module_abschluss_id'])) { @@ -395,17 +395,17 @@ class Module_ModuleController extends MVVController * Deletes a descriptor from module * * @param type $deskriptor_id - * @throws Trails_Exception + * @throws Trails\Exception */ public function delete_modul_deskriptor_action($deskriptor_id, $language) { $deskriptor = ModulDeskriptor::find($deskriptor_id); if (is_null($deskriptor)) { - throw new Trails_Exception(404, _('Unbekannter Deskriptor')); + throw new Trails\Exception(404, _('Unbekannter Deskriptor')); } $def_lang = $deskriptor->modul->getDefaultLanguage(); if ($language === $def_lang) { - throw new Trails_Exception(403, _('Ein Deskriptor in der Original-Sprache kann nicht gelöscht werden.')); + throw new Trails\Exception(403, _('Ein Deskriptor in der Original-Sprache kann nicht gelöscht werden.')); } if (Request::submitted('delete')) { CSRFProtection::verifyUnsafeRequest(); @@ -819,17 +819,17 @@ class Module_ModuleController extends MVVController * Deletes a descriptor from Modulteil * * @param type $deskriptor_id - * @throws Trails_Exception + * @throws Trails\Exception */ public function delete_modulteil_deskriptor_action($deskriptor_id, $language) { $deskriptor = ModulteilDeskriptor::find($deskriptor_id); if (is_null($deskriptor)) { - throw new Trails_Exception(404, _('Unbekannter Deskriptor')); + throw new Trails\Exception(404, _('Unbekannter Deskriptor')); } $def_lang = $deskriptor->modulteil->getDefaultLanguage(); if ($language === $def_lang) { - throw new Trails_Exception(403, _('Ein Deskriptor in der Original-Sprache kann nicht gelöscht werden.')); + throw new Trails\Exception(403, _('Ein Deskriptor in der Original-Sprache kann nicht gelöscht werden.')); } if (Request::submitted('delete')) { CSRFProtection::verifyUnsafeRequest(); diff --git a/app/controllers/module/mvv_controller.php b/app/controllers/module/mvv_controller.php index e84b37c..b70ddef 100644 --- a/app/controllers/module/mvv_controller.php +++ b/app/controllers/module/mvv_controller.php @@ -77,7 +77,7 @@ abstract class MVVController extends AuthenticatedController PageLayout::setTitle(_('Module')); // Setup flash instance - $this->flash = Trails_Flash::instance(); + $this->flash = Trails\Flash::instance(); $this->me = 'mvv'; self::$items_per_page = Config::get()->getValue('ENTRIES_PER_PAGE'); @@ -218,7 +218,7 @@ abstract class MVVController extends AuthenticatedController * This action is used to show a select box instead of an input field * if the user has clicked on the magnifier icon of a quicksearch. * - * @throws Trails_Exception + * @throws Trails\Exception */ public function qs_result_action() { @@ -228,7 +228,7 @@ abstract class MVVController extends AuthenticatedController Request::get('qs_term') )); } else { - throw new Trails_Exception(404); + throw new Trails\Exception(404); } } |
