aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-28 16:02:47 -0700
committerMario Vavti <mario@mariovavti.com>2017-03-31 10:30:17 +0200
commitc20aa6062c38d81d19d53bad3a65f78e95b126c9 (patch)
tree352ed5b86c4167d1a64bb8c834005c94b450b456
parentb2a51db14e61e3f742b4a0e11bcb22e5c6e12800 (diff)
downloadvolse-hubzilla-c20aa6062c38d81d19d53bad3a65f78e95b126c9.tar.gz
volse-hubzilla-c20aa6062c38d81d19d53bad3a65f78e95b126c9.tar.bz2
volse-hubzilla-c20aa6062c38d81d19d53bad3a65f78e95b126c9.zip
get rid of get_app()
-rw-r--r--Zotlabs/Module/Setup.php2
-rw-r--r--Zotlabs/Storage/Browser.php5
-rwxr-xr-xboot.php12
-rw-r--r--doc/dev-function-overview.md4
-rw-r--r--include/message.php2
-rw-r--r--tests/unit/template_test.php6
-rwxr-xr-xutil/fresh2
7 files changed, 3 insertions, 30 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index 9c688af01..593ba643f 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -624,7 +624,6 @@ class Setup extends \Zotlabs\Web\Controller {
* @param[out] array &$checks
*/
function check_htaccess(&$checks) {
- $a = get_app();
$status = true;
$help = '';
$ssl_error = false;
@@ -718,7 +717,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);
diff --git a/boot.php b/boot.php
index da5d571b2..e0546d049 100755
--- a/boot.php
+++ b/boot.php
@@ -1260,18 +1260,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;