Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
open-source
MetaGer
Commits
7be4985b
Commit
7be4985b
authored
Oct 11, 2019
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
not using constant for quicktip url anymore
parent
6d1a8419
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/Models/Quicktips/Quicktips.php
app/Models/Quicktips/Quicktips.php
+4
-4
No files found.
app/Models/Quicktips/Quicktips.php
View file @
7be4985b
...
...
@@ -11,7 +11,7 @@ class Quicktips
{
use
DispatchesJobs
;
private
$
QUICKTIP_URL
=
"/1.1/quicktips.xml"
;
private
$
quicktipUrl
=
"/1.1/quicktips.xml"
;
const
QUICKTIP_NAME
=
"quicktips"
;
const
CACHE_DURATION
=
60
;
...
...
@@ -20,16 +20,16 @@ class Quicktips
public
function
__construct
(
$search
,
$locale
,
$max_time
)
{
if
(
env
(
"APP_ENV"
)
===
"production"
)
{
$this
->
QUICKTIP_URL
=
"https://quicktips.metager.de"
.
$this
->
QUICKTIP_URL
;
$this
->
quicktipUrl
=
"https://quicktips.metager.de"
.
$this
->
quicktipUrl
;
}
else
{
$this
->
QUICKTIP_URL
=
"https://dev.quicktips.metager.de"
.
$this
->
QUICKTIP_URL
;
$this
->
quicktipUrl
=
"https://dev.quicktips.metager.de"
.
$this
->
quicktipUrl
;
}
$this
->
startSearch
(
$search
,
$locale
,
$max_time
);
}
public
function
startSearch
(
$search
,
$locale
,
$max_time
)
{
$url
=
self
::
QUICKTIP_URL
.
"?search="
.
$this
->
normalize_search
(
$search
)
.
"&locale="
.
$locale
;
$url
=
$this
->
quicktipUrl
.
"?search="
.
$this
->
normalize_search
(
$search
)
.
"&locale="
.
$locale
;
# TODO anders weitergeben
$this
->
hash
=
md5
(
$url
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment