Ensure BaseObject::setApp() whenever App is instantiated
This commit is contained in:
parent
87f2d18554
commit
354bec58c0
2
boot.php
2
boot.php
|
@ -20,6 +20,7 @@
|
||||||
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\BaseObject;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
@ -536,6 +537,7 @@ function get_app()
|
||||||
|
|
||||||
if (empty($a)) {
|
if (empty($a)) {
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
|
BaseObject::setApp($a);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $a;
|
return $a;
|
||||||
|
|
|
@ -24,9 +24,7 @@ use Friendica\Module\Login;
|
||||||
|
|
||||||
require_once 'boot.php';
|
require_once 'boot.php';
|
||||||
|
|
||||||
if (empty($a)) {
|
|
||||||
$a = new App(__DIR__);
|
$a = new App(__DIR__);
|
||||||
}
|
|
||||||
BaseObject::setApp($a);
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
// We assume that the index.php is called by a frontend process
|
// We assume that the index.php is called by a frontend process
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\BaseObject;
|
||||||
use Friendica\Util\ExAuth;
|
use Friendica\Util\ExAuth;
|
||||||
|
|
||||||
if (sizeof($_SERVER["argv"]) == 0) {
|
if (sizeof($_SERVER["argv"]) == 0) {
|
||||||
|
@ -53,6 +54,7 @@ require_once "boot.php";
|
||||||
require_once "include/dba.php";
|
require_once "include/dba.php";
|
||||||
|
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
@include ".htconfig.php";
|
@include ".htconfig.php";
|
||||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
|
|
@ -13,6 +13,7 @@ require_once "boot.php";
|
||||||
require_once "include/dba.php";
|
require_once "include/dba.php";
|
||||||
|
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
@include ".htconfig.php";
|
@include ".htconfig.php";
|
||||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\BaseObject;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
|
@ -26,6 +27,7 @@ require_once "boot.php";
|
||||||
require_once "include/dba.php";
|
require_once "include/dba.php";
|
||||||
|
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
require_once ".htconfig.php";
|
require_once ".htconfig.php";
|
||||||
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
dba::connect($db_host, $db_user, $db_pass, $db_data);
|
||||||
|
|
|
@ -2,16 +2,17 @@
|
||||||
/**
|
/**
|
||||||
* @file util/maintenance.php
|
* @file util/maintenance.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\BaseObject;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
|
||||||
require_once 'boot.php';
|
require_once 'boot.php';
|
||||||
require_once 'include/dba.php';
|
require_once 'include/dba.php';
|
||||||
|
|
||||||
if (empty($a)) {
|
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
}
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
@include(".htconfig.php");
|
@include(".htconfig.php");
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
// Run this from cmdline in basedir and quickly see if we've
|
// Run this from cmdline in basedir and quickly see if we've
|
||||||
// got any parse errors in our application files.
|
// got any parse errors in our application files.
|
||||||
|
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
use Friendica\BaseObject;
|
||||||
|
|
||||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||||
ini_set('display_errors', '1');
|
ini_set('display_errors', '1');
|
||||||
|
@ -13,9 +15,8 @@ ini_set('log_errors', '0');
|
||||||
|
|
||||||
include 'boot.php';
|
include 'boot.php';
|
||||||
|
|
||||||
if (empty($a)) {
|
|
||||||
$a = new App(dirname(__DIR__));
|
$a = new App(dirname(__DIR__));
|
||||||
}
|
BaseObject::setApp($a);
|
||||||
|
|
||||||
if (x($a->config, 'php_path')) {
|
if (x($a->config, 'php_path')) {
|
||||||
$phpath = $a->config['php_path'];
|
$phpath = $a->config['php_path'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user