From a74f200a7140410a42ec83cd8c8d7240043494c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Tue, 20 Mar 2012 13:33:57 +0100 Subject: [PATCH] Restructuring for Mongoose Former-commit-id: ecd322f5c3c2dde20b3885e5cec1032a4f2e9a6e --- CoreVersions/Baikal_0.1/Bootstrap.php | 1 + CoreVersions/Baikal_0.1/Mongoose/mongoose.sh | 2 +- .../Baikal_0.1/WWWRoot/{ => admin}/admin.php | 8 ++-- .../{Web => WWWRoot/admin}/phpinfo.php | 0 .../{Web => WWWRoot}/classes/BaikalAdmin.php | 8 ++-- .../{Web => WWWRoot}/classes/BaikalTools.php | 0 CoreVersions/Baikal_0.1/WWWRoot/index-fe.php | 41 +++++++++++++++++++ CoreVersions/Baikal_0.1/WWWRoot/index.php | 40 +----------------- html/admin.php | 1 - html/baikal | 1 + html/cal.php | 2 +- html/card.php | 2 +- html/index.php | 2 +- 13 files changed, 56 insertions(+), 52 deletions(-) rename CoreVersions/Baikal_0.1/WWWRoot/{ => admin}/admin.php (83%) rename CoreVersions/Baikal_0.1/{Web => WWWRoot/admin}/phpinfo.php (100%) rename CoreVersions/Baikal_0.1/{Web => WWWRoot}/classes/BaikalAdmin.php (81%) rename CoreVersions/Baikal_0.1/{Web => WWWRoot}/classes/BaikalTools.php (100%) create mode 100755 CoreVersions/Baikal_0.1/WWWRoot/index-fe.php delete mode 120000 html/admin.php create mode 120000 html/baikal diff --git a/CoreVersions/Baikal_0.1/Bootstrap.php b/CoreVersions/Baikal_0.1/Bootstrap.php index c91ccdd..74c1e89 100644 --- a/CoreVersions/Baikal_0.1/Bootstrap.php +++ b/CoreVersions/Baikal_0.1/Bootstrap.php @@ -59,6 +59,7 @@ if(@file_exists($sTemp) && (@is_dir($sTemp . "Core") || @is_link($sTemp . "Core" define("BAIKAL_PATH_CORE", BAIKAL_PATH_ROOT . "Core/"); define("BAIKAL_PATH_SPECIFIC", BAIKAL_PATH_ROOT . "Specific/"); define("BAIKAL_PATH_FRAMEWORKS", BAIKAL_PATH_CORE . "Frameworks/"); +define("BAIKAL_PATH_WWWROOT", BAIKAL_PATH_CORE . "WWWRoot/"); require_once(BAIKAL_PATH_SPECIFIC . "config.php"); diff --git a/CoreVersions/Baikal_0.1/Mongoose/mongoose.sh b/CoreVersions/Baikal_0.1/Mongoose/mongoose.sh index 3dd4d69..17f9d06 100755 --- a/CoreVersions/Baikal_0.1/Mongoose/mongoose.sh +++ b/CoreVersions/Baikal_0.1/Mongoose/mongoose.sh @@ -9,7 +9,7 @@ elif [[ "$unamestr" == 'Darwin' ]]; then platform='osx' fi -PATH_docroot=`cd ../Web && pwd` +PATH_docroot=`cd ../WWWRoot && pwd` echo "Serving $PATH_docroot" PATH_this="`pwd`/" diff --git a/CoreVersions/Baikal_0.1/WWWRoot/admin.php b/CoreVersions/Baikal_0.1/WWWRoot/admin/admin.php similarity index 83% rename from CoreVersions/Baikal_0.1/WWWRoot/admin.php rename to CoreVersions/Baikal_0.1/WWWRoot/admin/admin.php index 5ee0268..b71c012 100644 --- a/CoreVersions/Baikal_0.1/WWWRoot/admin.php +++ b/CoreVersions/Baikal_0.1/WWWRoot/admin/admin.php @@ -28,12 +28,12 @@ ini_set("display_errors", 1); error_reporting(E_ALL); define("BAIKAL_CONTEXT", TRUE); define("BAIKAL_CONTEXT_ADMIN", TRUE); -require_once("../Core/Bootstrap.php"); -require_once(BAIKAL_PATH_CORE . "BaikalAdmin.php"); -require_once(BAIKAL_PATH_CORE . "BaikalTools.php"); +require_once("../../Bootstrap.php"); +require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalAdmin.php"); +require_once(BAIKAL_PATH_WWWROOT . "classes/BaikalTools.php"); BaikalAdmin::assertEnabled(); -echo "

Baïkal Admin

"; +echo "

Baïkal Admin

"; BaikalAdmin::displayUsers(); \ No newline at end of file diff --git a/CoreVersions/Baikal_0.1/Web/phpinfo.php b/CoreVersions/Baikal_0.1/WWWRoot/admin/phpinfo.php similarity index 100% rename from CoreVersions/Baikal_0.1/Web/phpinfo.php rename to CoreVersions/Baikal_0.1/WWWRoot/admin/phpinfo.php diff --git a/CoreVersions/Baikal_0.1/Web/classes/BaikalAdmin.php b/CoreVersions/Baikal_0.1/WWWRoot/classes/BaikalAdmin.php similarity index 81% rename from CoreVersions/Baikal_0.1/Web/classes/BaikalAdmin.php rename to CoreVersions/Baikal_0.1/WWWRoot/classes/BaikalAdmin.php index 09e433c..c5ec1c3 100644 --- a/CoreVersions/Baikal_0.1/Web/classes/BaikalAdmin.php +++ b/CoreVersions/Baikal_0.1/WWWRoot/classes/BaikalAdmin.php @@ -30,7 +30,7 @@ class BaikalAdmin { static function assertEnabled() { if(!defined("BAIKAL_ADMIN_ENABLED") || BAIKAL_ADMIN_ENABLED !== TRUE) { - die("

Baïkal Admin is disabled.

To enable it, set BAIKAL_ADMIN_ENABLED to TRUE in Specific/config.php"); + die("

Baïkal Admin is disabled.

To enable it, set BAIKAL_ADMIN_ENABLED to TRUE in Specific/config.php"); } $bLocked = TRUE; @@ -46,13 +46,13 @@ class BaikalAdmin { $bLocked = FALSE; } else { if(!@unlink($sEnableFile)) { - die("

Baïkal Admin is locked.

To unlock it, delete and re-create an empty file named ENABLE_ADMIN in Specific/config.php"); + die("

Baïkal Admin is locked.

To unlock it, delete and re-create an empty file named ENABLE_ADMIN in Specific/config.php"); } } } if($bLocked) { - die("

Baïkal Admin is locked.

To unlock it, create an empty file named ENABLE_ADMIN in Specific/config.php"); + die("

Baïkal Admin is locked.

To unlock it, create an empty file named ENABLE_ADMIN in Specific/"); } else { // update filemtime @touch($sEnableFile); @@ -68,7 +68,7 @@ class BaikalAdmin { $oTabulator->render($aUsers); } - function &makeColumn($sName, $sHeader = "", $sType = "text") { + static function &makeColumn($sName, $sHeader = "", $sType = "text") { $oColumn = new TabulatorColumnHtml($sName, $sHeader, $sType); return $oColumn; } diff --git a/CoreVersions/Baikal_0.1/Web/classes/BaikalTools.php b/CoreVersions/Baikal_0.1/WWWRoot/classes/BaikalTools.php similarity index 100% rename from CoreVersions/Baikal_0.1/Web/classes/BaikalTools.php rename to CoreVersions/Baikal_0.1/WWWRoot/classes/BaikalTools.php diff --git a/CoreVersions/Baikal_0.1/WWWRoot/index-fe.php b/CoreVersions/Baikal_0.1/WWWRoot/index-fe.php new file mode 100755 index 0000000..b89364b --- /dev/null +++ b/CoreVersions/Baikal_0.1/WWWRoot/index-fe.php @@ -0,0 +1,41 @@ + +* All rights reserved +* +* http://baikal.codr.fr +* +* This script is part of the Baïkal Server project. The Baïkal +* Server project is free software; you can redistribute it +* and/or modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 2 of the License, or (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ + + define("BAIKAL_CONTEXT", TRUE); + require_once("../Core/Bootstrap.php"); + +?> + + + <?= BAIKAL_BASEURI ?> + + + +

Baïkal on

+ + \ No newline at end of file diff --git a/CoreVersions/Baikal_0.1/WWWRoot/index.php b/CoreVersions/Baikal_0.1/WWWRoot/index.php index b89364b..e00b5b1 100755 --- a/CoreVersions/Baikal_0.1/WWWRoot/index.php +++ b/CoreVersions/Baikal_0.1/WWWRoot/index.php @@ -1,41 +1,3 @@ -* All rights reserved -* -* http://baikal.codr.fr -* -* This script is part of the Baïkal Server project. The Baïkal -* Server project is free software; you can redistribute it -* and/or modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 2 of the License, or (at your option) any later version. -* -* The GNU General Public License can be found at -* http://www.gnu.org/copyleft/gpl.html. -* -* This script is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* This copyright notice MUST APPEAR in all copies of the script! -***************************************************************/ - - define("BAIKAL_CONTEXT", TRUE); - require_once("../Core/Bootstrap.php"); - -?> - - - <?= BAIKAL_BASEURI ?> - - - -

Baïkal on

- - \ No newline at end of file +echo "

Baïkal Admin

"; diff --git a/html/admin.php b/html/admin.php deleted file mode 120000 index 66bc44e..0000000 --- a/html/admin.php +++ /dev/null @@ -1 +0,0 @@ -../Core/WWWRoot/admin.php \ No newline at end of file diff --git a/html/baikal b/html/baikal new file mode 120000 index 0000000..a5f9256 --- /dev/null +++ b/html/baikal @@ -0,0 +1 @@ +../Core/WWWRoot \ No newline at end of file diff --git a/html/cal.php b/html/cal.php index fb14e0f..6e7a2ae 120000 --- a/html/cal.php +++ b/html/cal.php @@ -1 +1 @@ -../Core/WWWRoot/cal.php \ No newline at end of file +./baikal/cal.php \ No newline at end of file diff --git a/html/card.php b/html/card.php index 3749e7d..4f6118f 120000 --- a/html/card.php +++ b/html/card.php @@ -1 +1 @@ -../Core/WWWRoot/card.php \ No newline at end of file +./baikal/card.php \ No newline at end of file diff --git a/html/index.php b/html/index.php index c9a4194..4caba67 120000 --- a/html/index.php +++ b/html/index.php @@ -1 +1 @@ -../Core/WWWRoot/index.php \ No newline at end of file +./baikal/index-fe.php \ No newline at end of file