Loading src/UnicaenKsup/Service/KsupService.php +7 −6 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class KsupService include_once(KPHPLIB_PATH_INCLUDE . "params.php"); define("SSO_URL_SERVER", $this->getConfig('sso_url_server')); define("SSO_HOST_SERVER", $this->getConfig('sso_host_server')); define("SSO_PORT_SERVER", $this->getConfig('sso_port_server')); define("SSO_URL_SERVER", $this->getModel()->getSsoUrlServer() ?: $this->getConfig('sso_url_server')); define("SSO_HOST_SERVER", $this->getModel()->getSsoHostServer() ?: $this->getConfig('sso_host_server')); define("SSO_PORT_SERVER", $this->getModel()->getSsoPortServer() ?: $this->getConfig('sso_port_server')); return $this; } Loading @@ -106,7 +106,6 @@ class KsupService $GLOBALS["objRequete"] = new \requete($this->getModel()->getRubrique(), $this->getModel()->getStructure()); if ($langue = $this->getConfig('langue')) $GLOBALS["objRequete"]->setLangue($langue); if ($secure = $this->getConfig('https')) $GLOBALS["objRequete"]->setSecure($secure); } return $GLOBALS["objRequete"]; Loading Loading @@ -186,7 +185,9 @@ class KsupService throw new \Exception('Pas de modèle transmis!!'); } $this->initVars(); $this->getRequete(); /* Contrôle de session! */ $bean = new \sso(); Loading @@ -201,8 +202,8 @@ class KsupService $haut = $this->lireTemplate('haut'); $bodyPos = strpos($haut, '<body'); $insert = $this->traiterDonneesSpecifiques() . '</head>'."\r\n"; $bodyPos = strpos($haut, '</head>'); $insert = $this->traiterDonneesSpecifiques() . "\r\n"; $haut = substr($haut, 0, $bodyPos) . $insert . substr($haut, $bodyPos); $bas = $this->lireTemplate('bas'); Loading src/UnicaenKsup/View/Model/KsupModel.php +88 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,21 @@ class KsupModel extends ViewModel */ protected $links; /** * @var string */ protected $ssoUrlServer; /** * @var string */ protected $ssoHostServer; /** * @var string */ protected $ssoPortServer; /** * Is this a standalone, or terminal, model? * Loading Loading @@ -160,4 +175,77 @@ class KsupModel extends ViewModel { return $this->links; } /** * @return string */ public function getSsoUrlServer() { return $this->ssoUrlServer; } /** * @param string $ssoUrlServer * * @return KsupModel */ public function setSsoUrlServer($ssoUrlServer) { $this->ssoUrlServer = $ssoUrlServer; return $this; } /** * @return string */ public function getSsoHostServer() { return $this->ssoHostServer; } /** * @param string $ssoHostServer * * @return KsupModel */ public function setSsoHostServer($ssoHostServer) { $this->ssoHostServer = $ssoHostServer; return $this; } /** * @return string */ public function getSsoPortServer() { return $this->ssoPortServer; } /** * @param string $ssoPortServer * * @return KsupModel */ public function setSsoPortServer($ssoPortServer) { $this->ssoPortServer = $ssoPortServer; return $this; } } No newline at end of file Loading
src/UnicaenKsup/Service/KsupService.php +7 −6 Original line number Diff line number Diff line Loading @@ -86,9 +86,9 @@ class KsupService include_once(KPHPLIB_PATH_INCLUDE . "params.php"); define("SSO_URL_SERVER", $this->getConfig('sso_url_server')); define("SSO_HOST_SERVER", $this->getConfig('sso_host_server')); define("SSO_PORT_SERVER", $this->getConfig('sso_port_server')); define("SSO_URL_SERVER", $this->getModel()->getSsoUrlServer() ?: $this->getConfig('sso_url_server')); define("SSO_HOST_SERVER", $this->getModel()->getSsoHostServer() ?: $this->getConfig('sso_host_server')); define("SSO_PORT_SERVER", $this->getModel()->getSsoPortServer() ?: $this->getConfig('sso_port_server')); return $this; } Loading @@ -106,7 +106,6 @@ class KsupService $GLOBALS["objRequete"] = new \requete($this->getModel()->getRubrique(), $this->getModel()->getStructure()); if ($langue = $this->getConfig('langue')) $GLOBALS["objRequete"]->setLangue($langue); if ($secure = $this->getConfig('https')) $GLOBALS["objRequete"]->setSecure($secure); } return $GLOBALS["objRequete"]; Loading Loading @@ -186,7 +185,9 @@ class KsupService throw new \Exception('Pas de modèle transmis!!'); } $this->initVars(); $this->getRequete(); /* Contrôle de session! */ $bean = new \sso(); Loading @@ -201,8 +202,8 @@ class KsupService $haut = $this->lireTemplate('haut'); $bodyPos = strpos($haut, '<body'); $insert = $this->traiterDonneesSpecifiques() . '</head>'."\r\n"; $bodyPos = strpos($haut, '</head>'); $insert = $this->traiterDonneesSpecifiques() . "\r\n"; $haut = substr($haut, 0, $bodyPos) . $insert . substr($haut, $bodyPos); $bas = $this->lireTemplate('bas'); Loading
src/UnicaenKsup/View/Model/KsupModel.php +88 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,21 @@ class KsupModel extends ViewModel */ protected $links; /** * @var string */ protected $ssoUrlServer; /** * @var string */ protected $ssoHostServer; /** * @var string */ protected $ssoPortServer; /** * Is this a standalone, or terminal, model? * Loading Loading @@ -160,4 +175,77 @@ class KsupModel extends ViewModel { return $this->links; } /** * @return string */ public function getSsoUrlServer() { return $this->ssoUrlServer; } /** * @param string $ssoUrlServer * * @return KsupModel */ public function setSsoUrlServer($ssoUrlServer) { $this->ssoUrlServer = $ssoUrlServer; return $this; } /** * @return string */ public function getSsoHostServer() { return $this->ssoHostServer; } /** * @param string $ssoHostServer * * @return KsupModel */ public function setSsoHostServer($ssoHostServer) { $this->ssoHostServer = $ssoHostServer; return $this; } /** * @return string */ public function getSsoPortServer() { return $this->ssoPortServer; } /** * @param string $ssoPortServer * * @return KsupModel */ public function setSsoPortServer($ssoPortServer) { $this->ssoPortServer = $ssoPortServer; return $this; } } No newline at end of file