aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/module
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /app/controllers/module
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'app/controllers/module')
-rw-r--r--app/controllers/module/module.php14
-rw-r--r--app/controllers/module/mvv_controller.php6
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);
}
}