*/
function get_app() {
global $a;
+
+ if (empty($a)) {
+ $a = new App(dirname(__DIR__));
+ }
+
return $a;
}
global $a;
-if (is_null($a)) {
+if (empty($a)) {
$a = new App(dirname(__DIR__));
}
function cli_startup() {
global $a;
- if (is_null($a)) {
+ if (empty($a)) {
$a = new App(dirname(__DIR__));
}
function dbstructure_run(&$argv, &$argc) {
global $a;
- if (is_null($a)) {
+ if (empty($a)) {
$a = new App(dirname(__DIR__));
}
$poller_up_start = microtime(true);
- $a = new App(dirname(__DIR__));
+ if (empty($a)) {
+ $a = new App(dirname(__DIR__));
+ }
require_once ".htconfig.php";
require_once "include/dba.php";
function shadowupdate_run(&$argv, &$argc){
global $a;
- if (is_null($a)) {
+ if (empty($a)) {
$a = new App(dirname(__DIR__));
}
require_once 'boot.php';
require_once 'object/BaseObject.php';
-$a = new App(__DIR__);
+if (empty($a)) {
+ $a = new App(__DIR__);
+}
BaseObject::set_app($a);
// We assume that the index.php is called by a frontend process
*/
require_once("boot.php");
-$a = new App(dirname(__DIR__));
+if (empty($a)) {
+ $a = new App(dirname(__DIR__));
+}
@include(".htconfig.php");
$lang = get_browser_language();
require_once("boot.php");
-$a = new App(dirname(__DIR__));
+if (empty($a)) {
+ $a = new App(dirname(__DIR__));
+}
+
@include(".htconfig.php");
$lang = get_browser_language();
include 'boot.php';
-$a = new App(dirname(__DIR__));
+if (empty($a)) {
+ $a = new App(dirname(__DIR__));
+}
if (x($a->config, 'php_path')) {
$phpath = $a->config['php_path'];