diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-28 16:02:47 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-03-28 16:02:47 -0700 |
commit | c5828fecc1fadb4db705bbf94edfa7ff873b491a (patch) | |
tree | ec4048698d2c263189fc9044d0a63d004417305a | |
parent | d12b360e926c5df8da1639a5935fcd3e9236e4e3 (diff) | |
download | volse-hubzilla-c5828fecc1fadb4db705bbf94edfa7ff873b491a.tar.gz volse-hubzilla-c5828fecc1fadb4db705bbf94edfa7ff873b491a.tar.bz2 volse-hubzilla-c5828fecc1fadb4db705bbf94edfa7ff873b491a.zip |
get rid of get_app()
-rw-r--r-- | Zotlabs/Module/Setup.php | 2 | ||||
-rw-r--r-- | Zotlabs/Storage/Browser.php | 5 | ||||
-rwxr-xr-x | boot.php | 12 | ||||
-rw-r--r-- | doc/dev-function-overview.md | 4 | ||||
-rw-r--r-- | include/message.php | 2 | ||||
-rw-r--r-- | tests/unit/template_test.php | 6 | ||||
-rwxr-xr-x | util/fresh | 2 |
7 files changed, 3 insertions, 30 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index e114dfc0b..d6d7eeb05 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -617,7 +617,6 @@ class Setup extends \Zotlabs\Web\Controller { * @param[out] array &$checks */ function check_htaccess(&$checks) { - $a = get_app(); $status = true; $help = ''; $ssl_error = false; @@ -711,7 +710,6 @@ class Setup extends \Zotlabs\Web\Controller { * @return string with parsed HTML */ function what_next() { - $a = get_app(); // install the standard theme set_config('system', 'allowed_themes', 'redbasic'); diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 3fdc8e9d4..c501379d8 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -84,7 +84,6 @@ class Browser extends DAV\Browser\Plugin { require_once('include/conversation.php'); require_once('include/text.php'); if ($this->auth->owner_nick) { - //$html = profile_tabs(get_app(), (($is_owner) ? true : false), $this->auth->owner_nick); $html = ''; } @@ -241,7 +240,9 @@ class Browser extends DAV\Browser\Plugin { '$nick' => $this->auth->getCurrentUser() )); - $a = get_app(); + + $a = false; + \App::$page['content'] = $html; load_pdl($a); @@ -1224,18 +1224,6 @@ class App { /** - * @brief Retrieve the App structure. - * - * Useful in functions which require it but don't get it passed to them - * - * @return App - */ -function get_app() { - return $a; -} - - -/** * @brief Multi-purpose function to check variable state. * * Usage: x($var) or $x($array, 'key') diff --git a/doc/dev-function-overview.md b/doc/dev-function-overview.md index fa8a98ff3..cd2526ead 100644 --- a/doc/dev-function-overview.md +++ b/doc/dev-function-overview.md @@ -15,10 +15,6 @@ Returns authenticated numeric channel_id if authenticated and connected to a cha Returns authenticated string hash of Red global identifier, if authenticated via remote auth, or an empty string. -* get_app() - -Returns the global app structure ($a). No longer used as App is a static class - * App::get_observer() returns an xchan structure representing the current viewer if authenticated (locally or remotely). diff --git a/include/message.php b/include/message.php index bde07afd8..da3514184 100644 --- a/include/message.php +++ b/include/message.php @@ -13,10 +13,8 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep $ret = array('success' => false); $is_reply = false; - $a = get_app(); $observer_hash = get_observer_hash(); - if($uid) { $r = q("select * from channel where channel_id = %d limit 1", intval($uid) diff --git a/tests/unit/template_test.php b/tests/unit/template_test.php index 1f9f80531..dfaecb4a1 100644 --- a/tests/unit/template_test.php +++ b/tests/unit/template_test.php @@ -25,12 +25,6 @@ function x($s,$k = NULL) { } } -if(!function_exists('get_app')) { -function get_app() { - return new TemplateMockApp(); -} -} - /**
* TestCase for the template engine
*
diff --git a/util/fresh b/util/fresh index 7f57931aa..0482d1215 100755 --- a/util/fresh +++ b/util/fresh @@ -44,8 +44,6 @@ fresh_main($argc,$argv); function process_command($line) { - $a = get_app(); - // split args App::$cmd = $line; |