Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
a01ecbe4
Commit
a01ecbe4
authored
2 years ago
by
Elmar Ludwig
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use current+next semester as default for globalsearch, fixes #1348
Closes #1348 Merge request
studip/studip!829
parent
dee03e51
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/search/globalsearch.php
+4
-8
4 additions, 8 deletions
app/controllers/search/globalsearch.php
lib/classes/globalsearch/GlobalSearchModule.php
+0
-14
0 additions, 14 deletions
lib/classes/globalsearch/GlobalSearchModule.php
with
4 additions
and
22 deletions
app/controllers/search/globalsearch.php
+
4
−
8
View file @
a01ecbe4
...
...
@@ -79,7 +79,7 @@ class Search_GlobalsearchController extends AuthenticatedController
null
,
'semester'
,
$this
->
getSemesters
(),
(
int
)
$_SESSION
[
'global_search'
][
'selects'
][
'semester'
]
,
'future'
,
[
'id'
=>
'semester_select'
]
);
...
...
@@ -90,7 +90,7 @@ class Search_GlobalsearchController extends AuthenticatedController
null
,
'seminar_type'
,
$this
->
getSemClasses
(),
$_SESSION
[
'global_search'
][
'selects'
][
'seminar_type'
]
,
''
,
[
'id'
=>
'seminar_type_select'
]
);
...
...
@@ -101,7 +101,7 @@ class Search_GlobalsearchController extends AuthenticatedController
null
,
'institute'
,
$this
->
getInstitutes
(),
$_SESSION
[
'global_search'
][
'selects'
][
'institute'
]
,
''
,
[
'id'
=>
'institute_select'
]
);
}
...
...
@@ -115,12 +115,8 @@ class Search_GlobalsearchController extends AuthenticatedController
*/
private
function
getSemesters
()
{
// set the current semester as the initially selected semester
if
(
!
$_SESSION
[
'global_search'
][
'selects'
])
{
$current_sem
=
GlobalSearchModule
::
getCurrentSemester
();
$_SESSION
[
'global_search'
][
'selects'
][
'semester'
]
=
$current_sem
;
}
$semesters
=
[];
$semesters
[
'future'
]
=
_
(
'Aktuelles und nächstes Semester'
);
$semesters
[
''
]
=
_
(
'Alle Semester'
);
$sems
=
array_reverse
(
Semester
::
getAll
());
...
...
This diff is collapsed.
Click to expand it.
lib/classes/globalsearch/GlobalSearchModule.php
+
0
−
14
View file @
a01ecbe4
...
...
@@ -205,20 +205,6 @@ abstract class GlobalSearchModule
}
}
/**
* Get the current semester considering the given
* SEMESTER_TIME_SWITCH in the CONFIG
* (n weeks before the next semester)
*
* @return int The start time of the current semester.
*/
public
static
function
getCurrentSemester
()
{
$current_semester
=
Semester
::
findDefault
();
return
(
int
)
$current_semester
[
'beginn'
];
}
/**
* Returns a list of all active search modules
* @return array search_class => data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment