Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
open-source
MetaGer
Commits
7081ea3f
Commit
7081ea3f
authored
6 years ago
by
Karl Hasselbring
Browse files
Options
Downloads
Patches
Plain Diff
Der Eigene Suchfokus funktioniert jetzt auch über mehrere Suchen
parent
9bb8f040
No related branches found
No related tags found
1 merge request
!1365
Resolve "Filter Options for MetaGer"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/Http/Controllers/StartpageController.php
+11
-11
11 additions, 11 deletions
app/Http/Controllers/StartpageController.php
app/MetaGer.php
+2
-2
2 additions, 2 deletions
app/MetaGer.php
resources/views/parts/searchbar.blade.php
+0
-1
0 additions, 1 deletion
resources/views/parts/searchbar.blade.php
with
13 additions
and
14 deletions
app/Http/Controllers/StartpageController.php
+
11
−
11
View file @
7081ea3f
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
App
;
use
App
;
use
DB
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
Jenssegers\Agent\Agent
;
use
Jenssegers\Agent\Agent
;
use
LaravelLocalization
;
use
LaravelLocalization
;
use
Response
;
use
DB
;
use
Log
;
use
Log
;
use
Response
;
class
StartpageController
extends
Controller
class
StartpageController
extends
Controller
{
{
...
@@ -22,9 +22,9 @@ class StartpageController extends Controller
...
@@ -22,9 +22,9 @@ class StartpageController extends Controller
public
function
loadStartPage
(
Request
$request
)
public
function
loadStartPage
(
Request
$request
)
{
{
$focusPages
=
[];
$focusPages
=
[];
$theme
=
"default"
;
$theme
=
"default"
;
$optionParams
=
[
'param_sprueche'
,
'param_newtab'
,
'param_maps'
,
'param_autocomplete'
,
'param_lang'
,
'param_key'
];
$optionParams
=
[
'param_sprueche'
,
'param_newtab'
,
'param_maps'
,
'param_autocomplete'
,
'param_lang'
,
'param_key'
];
$option_values
=
[];
$option_values
=
[];
foreach
(
$optionParams
as
$param
)
{
foreach
(
$optionParams
as
$param
)
{
...
@@ -43,12 +43,12 @@ class StartpageController extends Controller
...
@@ -43,12 +43,12 @@ class StartpageController extends Controller
if
(
$lang
===
'de'
||
$lang
===
"en"
)
{
if
(
$lang
===
'de'
||
$lang
===
"en"
)
{
$lang
=
'all'
;
$lang
=
'all'
;
}
}
# Sponsorenlinks
# Sponsorenlinks
$sponsors
=
[];
$sponsors
=
[];
try
{
try
{
$sponsors
=
DB
::
table
(
'sponsorenlinks'
)
->
where
(
'langcode'
,
'de'
)
->
orderByRaw
(
'LENGTH(linktext)'
,
'ASC'
)
->
get
();
$sponsors
=
DB
::
table
(
'sponsorenlinks'
)
->
where
(
'langcode'
,
'de'
)
->
orderByRaw
(
'LENGTH(linktext)'
,
'ASC'
)
->
get
();
}
catch
(
\Illuminate\Database\QueryException
$e
){
}
catch
(
\Illuminate\Database\QueryException
$e
)
{
Log
::
info
(
$e
);
Log
::
info
(
$e
);
}
}
...
@@ -89,9 +89,9 @@ class StartpageController extends Controller
...
@@ -89,9 +89,9 @@ class StartpageController extends Controller
public
function
loadPlugin
(
$params
,
$locale
=
"de"
)
public
function
loadPlugin
(
$params
,
$locale
=
"de"
)
{
{
$params
=
unserialize
(
base64_decode
(
$params
));
$params
=
unserialize
(
base64_decode
(
$params
));
$requests
=
$params
;
$requests
=
$params
;
$params
=
[];
$params
=
[];
foreach
(
$requests
as
$key
=>
$value
)
{
foreach
(
$requests
as
$key
=>
$value
)
{
if
(
strpos
(
$key
,
"param_"
)
===
0
)
{
if
(
strpos
(
$key
,
"param_"
)
===
0
)
{
$key
=
substr
(
$key
,
strpos
(
$key
,
"param_"
)
+
6
);
$key
=
substr
(
$key
,
strpos
(
$key
,
"param_"
)
+
6
);
...
@@ -146,12 +146,12 @@ class StartpageController extends Controller
...
@@ -146,12 +146,12 @@ class StartpageController extends Controller
public
function
berlin
(
Request
$request
)
public
function
berlin
(
Request
$request
)
{
{
$link
=
""
;
$link
=
""
;
$password
=
""
;
$password
=
""
;
if
(
$request
->
filled
(
'eingabe'
))
{
if
(
$request
->
filled
(
'eingabe'
))
{
$password
=
getenv
(
'berlin'
);
$password
=
getenv
(
'berlin'
);
$password
=
md5
(
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de"
.
$password
);
$password
=
md5
(
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de"
.
$password
);
$link
=
"/meta/meta.ger3?eingabe="
.
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de&focus=web&password="
.
$password
.
"&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style"
;
$link
=
"/meta/meta.ger3?eingabe="
.
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de&focus=web&password="
.
$password
.
"&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style"
;
}
}
return
view
(
'berlin'
)
return
view
(
'berlin'
)
->
with
(
'title'
,
'Testseite für die FU-Berlin'
)
->
with
(
'title'
,
'Testseite für die FU-Berlin'
)
...
...
This diff is collapsed.
Click to expand it.
app/MetaGer.php
+
2
−
2
View file @
7081ea3f
...
@@ -98,8 +98,8 @@ class MetaGer
...
@@ -98,8 +98,8 @@ class MetaGer
$focusPages
=
[];
$focusPages
=
[];
foreach
(
$this
->
request
->
all
()
as
$key
=>
$value
)
{
foreach
(
$this
->
request
->
all
()
as
$key
=>
$value
)
{
if
(
$value
===
'on'
)
{
if
(
starts_with
(
$key
,
'engine_'
)
&&
$value
===
'on'
)
{
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
str_replace
(
'engine_'
,
''
,
$key
))
;
$focusPages
[]
=
$key
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/views/parts/searchbar.blade.php
+
0
−
1
View file @
7081ea3f
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
<
input
type
=
"hidden"
name
=
"time"
value
=
{{
$time
}}
>
<
input
type
=
"hidden"
name
=
"time"
value
=
{{
$time
}}
>
@
endif
@
endif
@
if
(
isset
(
$focusPages
)
&&
!
empty
(
$focusPages
))
@
if
(
isset
(
$focusPages
)
&&
!
empty
(
$focusPages
))
<
input
type
=
"hidden"
name
=
"focus"
value
=
"focus_custom"
>
@
foreach
(
$focusPages
as
$fp
)
@
foreach
(
$focusPages
as
$fp
)
<
input
type
=
"hidden"
name
=
{{
$fp
}}
value
=
"on"
>
<
input
type
=
"hidden"
name
=
{{
$fp
}}
value
=
"on"
>
@
endforeach
@
endforeach
...
...
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