Remove PROJECT_PACKAGE constant.
This constant is no longer needed because there will only be one package type in the future. In the past it only controlled the 'docroot'. If we do need a way to configure this again, we'll take a slightly different approach.
This commit is contained in:
parent
97c940c1eb
commit
62e228c992
5 changed files with 5 additions and 18 deletions
|
@ -26,4 +26,3 @@
|
|||
|
||||
define("BAIKAL_VERSION", "0.3.0");
|
||||
define("BAIKAL_HOMEPAGE", "http://baikal-server.com");
|
||||
define("PROJECT_PACKAGE", "regular");
|
||||
|
|
|
@ -37,17 +37,12 @@ class Distrib extends \Baikal\Model\Config {
|
|||
"type" => "string",
|
||||
"comment" => "The URL to the project homepage",
|
||||
),
|
||||
"PROJECT_PACKAGE" => array(
|
||||
"type" => "string",
|
||||
"comment" => "The type of the current package (one of 'flat', 'regular')"
|
||||
),
|
||||
);
|
||||
|
||||
# Default values
|
||||
protected $aData = array(
|
||||
"BAIKAL_VERSION" => "",
|
||||
"BAIKAL_HOMEPAGE" => "",
|
||||
"PROJECT_PACKAGE" => "",
|
||||
);
|
||||
|
||||
public function formMorphologyForThisModelInstance() {
|
||||
|
@ -58,4 +53,4 @@ class Distrib extends \Baikal\Model\Config {
|
|||
public function label() {
|
||||
return "Baïkal distribution info";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ class Dashboard extends \Flake\Core\Controller {
|
|||
public function render() {
|
||||
$oView = new \BaikalAdmin\View\Dashboard();
|
||||
$oView->setData("BAIKAL_VERSION", BAIKAL_VERSION);
|
||||
$oView->setData("PROJECT_PACKAGE", PROJECT_PACKAGE);
|
||||
|
||||
# Services status
|
||||
$oView->setData("BAIKAL_CAL_ENABLED", BAIKAL_CAL_ENABLED);
|
||||
|
@ -60,4 +59,4 @@ class Dashboard extends \Flake\Core\Controller {
|
|||
|
||||
return $oView->render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="span3">
|
||||
<h2>Version</h2>
|
||||
<p>This systems runs<br />
|
||||
Baïkal <span class="label label-info label-intext">{{ BAIKAL_VERSION }}</span>, <em>{{ PROJECT_PACKAGE }}</em> package<br />
|
||||
Baïkal <span class="label label-info label-intext">{{ BAIKAL_VERSION }}</span>
|
||||
<small><a href="{{ url }}">{{ url }}</a></small>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -111,4 +111,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endautoescape %}
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -154,13 +154,7 @@ class Framework extends \Flake\Core\Framework {
|
|||
|
||||
require_once(PROJECT_PATH_CORE . "Distrib.php");
|
||||
|
||||
if(PROJECT_PACKAGE === "regular") {
|
||||
define("PROJECT_PATH_DOCUMENTROOT", PROJECT_PATH_ROOT . "html/");
|
||||
} elseif(PROJECT_PACKAGE === "flat") {
|
||||
define("PROJECT_PATH_DOCUMENTROOT", PROJECT_PATH_ROOT);
|
||||
} else {
|
||||
throw new \Exception("Unrecognized PROJECT_PACKAGE value.");
|
||||
}
|
||||
define("PROJECT_PATH_DOCUMENTROOT", PROJECT_PATH_ROOT . "html/");
|
||||
|
||||
# Determine PROJECT_BASEURI
|
||||
$sScript = substr($_SERVER["SCRIPT_FILENAME"], strlen($_SERVER["DOCUMENT_ROOT"]));
|
||||
|
|
Loading…
Add table
Reference in a new issue