diff --git a/classes/Utils.php b/classes/Utils.php index 17c3641819614bdd0f779b3b8e7a5c2937c00e35..3d7b890f8cf9b54d74c8a8f19e53cd7ee6b1b0d2 100644 --- a/classes/Utils.php +++ b/classes/Utils.php @@ -1,46 +1,7 @@ <? class Utils{ -<<<<<<< HEAD - public static function send303($uri, $ext){ - header("HTTP/1.0 303 See Other"); - header("Location: ".$uri); - header("Content-type: ".$ext); - echo $uri."\n\n"; - exit(0); - } - - public static function send401($msg){ - header("HTTP/1.0 404 Not Found"); - echo $msg; - exit(0); - } - - public static function send404($uri){ - header("HTTP/1.0 404 Not Found"); - echo "LODSPeaKr could not find ".$uri." or information about it.\nNo URIs in the triple store, or services configured with that URI\n"; - exit(0); - } - - public static function send406($uri){ - header("HTTP/1.0 406 Not Acceptable"); - echo "LODSPeaKr can't find a representation suitable for the content type you accept\n\n"; - exit(0); - } - - public static function send500($msg = null){ - header("HTTP/1.0 500 Internal Server Error"); - echo "An internal error ocurred. Please try later\n\n"; - if($msg != null){ - echo $msg; - } - exit(0); - } - -======= - ->>>>>>> 190d4897be9d90712085169270a6e105600063f5 public static function uri2curie($uri){ global $conf; $ns = $conf['ns']; diff --git a/classes/modules/sessionModule.php b/classes/modules/sessionModule.php index bf2367e6e908c2b3552a15de546c0ff62b80aa7e..1d8e52eba82dec5a80fb14cc3b5485b0e652fedd 100644 --- a/classes/modules/sessionModule.php +++ b/classes/modules/sessionModule.php @@ -22,9 +22,10 @@ class SessionModule extends abstractModule{ if($this->validateAuthentication($_POST)){ session_start(); $_SESSION['lodspk'] = 1; - Utils::send303($conf['basedir'], ''); + HTTPStatus::send303($conf['basedir'], ''); + return false; }else{ - Utils::send401("Authentication not valid."); + HTTPStatus::send401("Authentication not valid."); return true; } } @@ -33,7 +34,7 @@ class SessionModule extends abstractModule{ if(isset($_SESSION['lodspk'])){ return false; }else{ - Utils::send303($conf['basedir'].$this->sessionUri, ''); + HTTPStatus::send303($conf['basedir'].$this->sessionUri, ''); return true; } } diff --git a/doc/examples/originalComponents/services/instances/html.queries/main.query b/doc/examples/originalComponents/services/instances/queries/main.query similarity index 100% rename from doc/examples/originalComponents/services/instances/html.queries/main.query rename to doc/examples/originalComponents/services/instances/queries/main.query