------------------------------------------------------------
revno: 1210
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Wed 2012-07-04 21:40:10 +0200
message:
cleaning bootstrap
modified:
bootstrap.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'bootstrap.php'
--- bootstrap.php 2012-04-03 06:57:14 +0000
+++ bootstrap.php 2012-07-04 19:40:10 +0000
@@ -28,11 +28,10 @@
* @TODO: Need to integrat the bzr revno into this after the X.X.X.REVNO
* since bassel nuked it because he didn't understand it.
*/
-$_SERVER["SERVER_PORT"] = 80;
-
define('AIKI_VERSION','0.9.0.1');
+
/**
* Used to test for script access
*/
@@ -44,10 +43,7 @@
$AIKI_ROOT_DIR = realpath(dirname(__FILE__));
// append to the include path while preserving existing entries
-set_include_path(
- get_include_path() .
- PATH_SEPARATOR .
- "$AIKI_ROOT_DIR");
+set_include_path( get_include_path() . PATH_SEPARATOR . "$AIKI_ROOT_DIR");
/** @see AikiException.php */
require_once("$AIKI_ROOT_DIR/libs/AikiException.php");
@@ -76,8 +72,7 @@
if (file_exists("$AIKI_ROOT_DIR/config.php")) {
/** @see config.php */
require_once("$AIKI_ROOT_DIR/config.php");
-}
-else {
+} else {
/** @see assets/apps/installer/installer.php */
header("location:./assets/apps/installer/installer.php");
}
@@ -133,54 +128,33 @@
$config = $aiki->get_config($config);
// if HTTP port is not 80, insert port in URL.
-if ( isset($config["url"]) && $_SERVER["SERVER_PORT"]!=80 ){
- $config["url"] = preg_replace("#(http.?://[^/]*)(/)#",'$1:'. $_SERVER["SERVER_PORT"] . "/", $config["url"]);
+$port = (int) (isset($_SERVER["SERVER_PORT"]) ? $_SERVER["SERVER_PORT"] : 80);
+if ( isset($config["url"]) && $port!=80 ){
+ $config["url"] = preg_replace("#(http.?://[^/]*)(/)#",'$1:'. $port . "/", $config["url"]);
}
/*
* run time correction for site path
-*/
-if ($config['top_folder'] and $config['top_folder'] != $AIKI_ROOT_DIR){
+ */
+if ( isset($config['top_folder']) && $config['top_folder'] != $AIKI_ROOT_DIR){
$config['top_folder'] = $AIKI_ROOT_DIR;
}
-/*
- * Load some auxiliary classes
-*/
-
-$membership = $aiki->load("membership");
-
-$aiki->load("message");
-$aiki->load("dictionary");
-
/**
- * Load basic class: site, membership (permission), language, url(user requests)
* @global membership $membership
* @todo replace global membership by $aiki->membership
*/
+$membership = $aiki->load("membership");
+
+// Load basic classes (rest will be loaded by demand)
+$aiki->load('message');
+$aiki->load('dictionary');
$aiki->load('url');
$aiki->load('site');
$aiki->load('config');
-$aiki->load("languages");
-$aiki->load("input");
-
-// this class will be loaded by demand
-/*
- $aiki->load("text");
-$aiki->load("records");
-$aiki->load("input");
-$aiki->load("output");
-$aiki->load("forms");
-$aiki->load("AikiArray");
-$aiki->load("security");
-$aiki->load("parser");
-$aiki->load("php");
-$aiki->load("css_parser");
-$aiki->load("sql_markup");
-$aiki->load("view_parser");
-$aiki->load("image");
-$aiki->load("errors");*/
-
-$aiki->load("Plugins");
+$aiki->load('languages');
+$aiki->load('input');
+
+$aiki->load('Plugins');
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp