Escape global namespaced get_app() calls

- Add deprecated status
This commit is contained in:
Hypolite Petovan 2018-12-27 19:22:35 -05:00
parent b8030313e5
commit 5e1ceb57de
52 changed files with 135 additions and 133 deletions

View file

@ -59,7 +59,7 @@ HELP;
throw new \RuntimeException('DocBlox isn\'t available.');
}
$dir = get_app()->getBasePath();
$dir = \get_app()->getBasePath();
//stack for dirs to search
$dirstack = [];

View file

@ -39,7 +39,7 @@ HELP;
protected function doExecute()
{
$a = get_app();
$a = \get_app();
if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__);

View file

@ -47,7 +47,7 @@ HELP;
protected function doExecute()
{
$a = get_app();
$a = \get_app();
if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__);

View file

@ -40,7 +40,7 @@ HELP;
protected function doExecute()
{
$a = get_app();
$a = \get_app();
if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__);

View file

@ -51,7 +51,7 @@ HELP;
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$a = get_app();
$a = \get_app();
$phpfile = realpath($this->getArgument(0));

View file

@ -47,7 +47,7 @@ HELP;
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$a = get_app();
$a = \get_app();
$pofile = realpath($this->getArgument(0));

View file

@ -41,7 +41,7 @@ HELP;
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$a = get_app();
$a = \get_app();
$php_path = $a->getConfigValue('config', 'php_path', 'php');

View file

@ -46,7 +46,7 @@ class Theme
return $info;
}
$a = get_app();
$a = \get_app();
$stamp1 = microtime(true);
$theme_file = file_get_contents("view/theme/$theme/theme.php");
$a->saveTimestamp($stamp1, "file");
@ -155,13 +155,13 @@ class Theme
if ($root !== '' && $root[strlen($root) - 1] !== '/') {
$root = $root . '/';
}
$theme_info = get_app()->theme_info;
$theme_info = \get_app()->theme_info;
if (is_array($theme_info) && array_key_exists('extends', $theme_info)) {
$parent = $theme_info['extends'];
} else {
$parent = 'NOPATH';
}
$theme = get_app()->getCurrentTheme();
$theme = \get_app()->getCurrentTheme();
$thname = $theme;
$ext = substr($file, strrpos($file, '.') + 1);
$paths = [
@ -191,7 +191,7 @@ class Theme
*/
public static function getStylesheetPath($theme)
{
$a = get_app();
$a = \get_app();
$opts = (($a->profile_uid) ? '?f=&puid=' . $a->profile_uid : '');
if (file_exists('view/theme/' . $theme . '/style.php')) {

View file

@ -35,7 +35,7 @@ class Worker
*/
public static function processQueue($run_cron = true)
{
$a = get_app();
$a = \get_app();
self::$up_start = microtime(true);
@ -206,7 +206,7 @@ class Worker
*/
public static function execute($queue)
{
$a = get_app();
$a = \get_app();
$mypid = getmypid();
@ -319,7 +319,7 @@ class Worker
*/
private static function execFunction($queue, $funcname, $argv, $method_call)
{
$a = get_app();
$a = \get_app();
$mypid = getmypid();