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 / Register
Toggle navigation
Open sidebar
Karaoke Mugen
sites
portal
Commits
223334b1
Commit
223334b1
authored
Sep 27, 2018
by
Mathieu Delestre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix (3)
Hé Gérard ! encore un pour la route ?
parent
7c5ad468
Pipeline
#4630
passed with stage
in 1 minute and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
_helpers.php
_helpers.php
+1
-1
bootstrap.php
bootstrap.php
+2
-6
No files found.
_helpers.php
View file @
223334b1
...
...
@@ -3,7 +3,7 @@ function route_url($code,$language=null)
{
$code
=
$code
?
$code
:
ENV_ROUTE
;
$language
=
$language
?
$language
:
ENV_LNG
;
return
ENV_BASEPATH
.
$language
.
'/'
.
(
$code
!=
'index'
?
$code
:
''
);
return
ENV_BASEPATH
.
'/'
.
$language
.
'/'
.
(
$code
!=
'index'
?
$code
:
''
);
}
// # # ##
...
...
bootstrap.php
View file @
223334b1
...
...
@@ -13,12 +13,8 @@ use Gettext\Translator;
define
(
'BOOTSTRAP_LOADED'
,
true
);
define
(
'ENV_ROOTPATH'
,
realpath
(
__DIR__
));
$temp
=
str_replace
(
'/bootstrap.php'
,
''
,
getField
(
$_SERVER
,
'SCRIPT_NAME'
,
getField
(
$_SERVER
,
'PHP_SELF'
)));
if
(
$temp
)
define
(
'ENV_BASEPATH'
,
$temp
.
'/'
);
else
define
(
'ENV_BASEPATH'
,
'/'
);
define
(
'ENV_REQUEST'
,
str_replace
(
ENV_BASEPATH
,
''
,
getField
(
$_SERVER
,
'REQUEST_URI'
)));
define
(
'ENV_BASEPATH'
,
str_replace
(
'/bootstrap.php'
,
''
,
getField
(
$_SERVER
,
'SCRIPT_NAME'
,
getField
(
$_SERVER
,
'PHP_SELF'
))));
define
(
'ENV_REQUEST'
,
preg_replace
(
'/\/$/'
,
''
,
preg_replace
(
'/^\//'
,
''
,
str_replace
(
ENV_BASEPATH
,
''
,
getField
(
explode
(
'?'
,
getField
(
$_SERVER
,
'REQUEST_URI'
)),
0
)))));
define
(
'ENV_ROUTE'
,
preg_replace
(
'/^[a-z]{2}\/?/'
,
''
,
ENV_REQUEST
)
?
preg_replace
(
'/^[a-z]{2}\/?/'
,
''
,
ENV_REQUEST
)
:
'index'
);
// extraction de la langue courante
...
...
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