router click intercepter does not resolve internally when only matched route was the Fallback matchAll route; cleanup routes.php & Stundenplan controller from viewData and verbose reroutes; overflow setting on years page;

This commit is contained in:
Johann Hoffmann
2025-02-20 11:22:30 +01:00
parent 714d74d9aa
commit 1d9ea5d091
4 changed files with 19 additions and 27 deletions
+1 -11
View File
@@ -61,17 +61,7 @@ $route['api/v1/organisation/[O|o]rganisationseinheit/(:any)'] = 'api/v1/organisa
$route['api/v1/ressource/[B|b]etriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
$route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
$route['Cis/Stundenplan'] = 'Cis/Stundenplan/index/null/null/null';
$route['Cis/Stundenplan/(:num)'] = 'Cis/Stundenplan/index/null/null/$1';
$route['Cis/Stundenplan/(:num)/(:any)'] = 'Cis/Stundenplan/index/null/$2/$1';
// Specific route (for mode: month|week|day, focusdate, lv_id optional)
$route['Cis/Stundenplan/([M|m]onth|[W|w]eek|[D|d]ay)'] = 'Cis/Stundenplan/index/$1';
$route['Cis/Stundenplan/([M|m]onth|[W|w]eek|[D|d]ay)(/(:any))?'] = 'Cis/Stundenplan/index/$1/$3';
$route['Cis/Stundenplan/([M|m]onth|[W|w]eek|[D|d]ay)(/(:any))?(/(:num))?'] = 'Cis/Stundenplan/index/$1/$3/$5';
$route['Cis/Stundenplan/.*'] = 'Cis/Stundenplan/index/$1';
// load routes from extensions
$subdir = 'application/config/extensions';
+1 -10
View File
@@ -23,19 +23,10 @@ class Stundenplan extends Auth_Controller
/**
* @return void
*/
public function index($mode = 'Week', $focus_date = null, $lv_id = null)
public function index()
{
// convert string "null" to actual null values -> ci3 reroute fix
$mode = ($mode === 'null') ? 'Week' : ucfirst(strtolower($mode));
$focus_date = ($focus_date === 'null') ? date('Y-m-d') : $focus_date;
$lv_id = ($lv_id === 'null') ? null : $lv_id;
if($mode) $mode = ucfirst(strtolower($mode));
$viewData = array(
'mode' => $mode,
'focus_date' => $focus_date,
'lv_id' => $lv_id,
'uid'=>getAuthUID(),
);