Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
ksup
Commits
15073b04
Commit
15073b04
authored
Feb 20, 2017
by
Laurent Lécluse
Browse files
Possibilité de définir une rubrique par défaut
parent
f2ce3da9
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/unicaen-ksup.global.php.dist
View file @
15073b04
...
...
@@ -2,15 +2,17 @@
namespace
UnicaenKsup
;
$config
=
[
'sso_url_server'
=>
'http://www.unicaen.fr'
,
'sso_host_server'
=>
'www.unicaen.fr'
,
'sso_port_server'
=>
'80'
,
'langue'
=>
'fr'
,
'https'
=>
false
,
'remplacement'
=>
[
'sso_url_server'
=>
'http://www.unicaen.fr'
,
'sso_host_server'
=>
'www.unicaen.fr'
,
'sso_port_server'
=>
'80'
,
'langue'
=>
'fr'
,
'https'
=>
false
,
'default-structure'
=>
null
,
'default-rubrique'
=>
null
,
'remplacement'
=>
[
// sert à remplacer un texte par un autre dans le code KSUP de la page
// format ancien texte => nouveau texte
'"/images/'
=>
'"http://www.unicaen.fr/images/'
'"/images/'
=>
'"http://www.unicaen.fr/images/'
],
'scripts'
=>
[
// placez ici les URL de vos scripts JS souhaités
...
...
src/UnicaenKsup/Service/KsupService.php
View file @
15073b04
...
...
@@ -103,7 +103,13 @@ class KsupService
global
$GLOBALS
;
if
(
!
isset
(
$GLOBALS
[
"objRequete"
]))
{
$GLOBALS
[
"objRequete"
]
=
new
\
requete
(
$this
->
getModel
()
->
getRubrique
(),
$this
->
getModel
()
->
getStructure
());
$rubrique
=
$this
->
getModel
()
->
getRubrique
();
if
(
!
$rubrique
)
$rubrique
=
$this
->
getConfig
(
'default-rubrique'
);
$structure
=
$this
->
getModel
()
->
getStructure
();
if
(
!
$structure
)
$structure
=
$this
->
getConfig
(
'default-structure'
);
$GLOBALS
[
"objRequete"
]
=
new
\
requete
(
$rubrique
,
$structure
);
if
(
$langue
=
$this
->
getConfig
(
'langue'
))
$GLOBALS
[
"objRequete"
]
->
setLangue
(
$langue
);
if
(
$secure
=
$this
->
getConfig
(
'https'
))
$GLOBALS
[
"objRequete"
]
->
setSecure
(
$secure
);
}
...
...
@@ -137,7 +143,7 @@ class KsupService
$scripts
=
$this
->
getConfig
(
'scripts'
);
if
(
$scripts
)
foreach
(
$scripts
as
$script
){
$dsCode
.
=
'<script type="text/javascript" src="'
.
$this
->
makeAbsUrl
(
$script
)
.
'">'
.
"
\r\n
"
;
$dsCode
.
=
'<script type="text/javascript" src="'
.
$this
->
makeAbsUrl
(
$script
)
.
'">
</script>
'
.
"
\r\n
"
;
}
$dsCode
.
=
trim
(
$this
->
getModel
()
->
getScripts
()
->
toString
(
4
));
// if ($dsCode) {
...
...
Write
Preview
Supports
Markdown
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