From fb0ed18a430aff3fbffdaab43c3d15a7f3a822ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 20 Dec 2016 10:58:03 +0100 Subject: [PATCH] changed to this: --------------------- function bla (App &$a) { $a->bla = 'stuff'; } --------------------- MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- boot.php | 9 +++++---- include/acl_selectors.php | 2 +- include/api.php | 6 +++--- include/cron.php | 4 ++-- include/event.php | 2 +- include/identity.php | 4 ++-- include/nav.php | 2 +- include/text.php | 2 +- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/boot.php b/boot.php index c500468e5f..c80da23529 100644 --- a/boot.php +++ b/boot.php @@ -1537,7 +1537,7 @@ function check_db() { * Sets the base url for use in cmdline programs which don't have * $_SERVER variables */ -function check_url(&$a) { +function check_url(App &$a) { $url = get_config('system','url'); @@ -1559,7 +1559,7 @@ function check_url(&$a) { /** * @brief Automatic database updates */ -function update_db(&$a) { +function update_db(App &$a) { $build = get_config('system','build'); if(! x($build)) $build = set_config('system','build',DB_UPDATE_VERSION); @@ -1675,7 +1675,7 @@ function run_update_function($x) { * @param App $a * */ -function check_plugins(&$a) { +function check_plugins(App &$a) { $r = q("SELECT * FROM `addon` WHERE `installed` = 1"); if (dbm::is_result($r)) @@ -2410,7 +2410,8 @@ function get_temppath() { return(""); } -function set_template_engine(&$a, $engine = 'internal') { +/// @deprecated +function set_template_engine(App &$a, $engine = 'internal') { /// @note This function is no longer necessary, but keep it as a wrapper to the class method /// to avoid breaking themes again unnecessarily diff --git a/include/acl_selectors.php b/include/acl_selectors.php index ed9c634c23..cd68ffaa7d 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -678,7 +678,7 @@ function acl_lookup(&$a, $out_type = 'json') { * @param App $a * @return array with the search results */ -function navbar_complete(&$a) { +function navbar_complete(App &$a) { // logger('navbar_complete'); diff --git a/include/api.php b/include/api.php index df62abd8e6..a450f867a5 100644 --- a/include/api.php +++ b/include/api.php @@ -133,7 +133,7 @@ * @hook 'logged_in' * array $user logged user record */ - function api_login(&$a){ + function api_login(App &$a){ // login with oauth try{ $oauth = new FKOAuth1(); @@ -251,8 +251,8 @@ * @param App $a * @return string API call result */ - function api_call(&$a){ - GLOBAL $API, $called_api; + function api_call(App &$a){ + global $API, $called_api; $type="json"; if (strpos($a->query_string, ".xml")>0) $type="xml"; diff --git a/include/cron.php b/include/cron.php index 9530302d34..e98239b829 100644 --- a/include/cron.php +++ b/include/cron.php @@ -343,7 +343,7 @@ function cron_poll_contacts($argc, $argv) { * * @param App $a */ -function cron_clear_cache(&$a) { +function cron_clear_cache(App &$a) { $last = get_config('system','cache_last_cleared'); @@ -430,7 +430,7 @@ function cron_clear_cache(&$a) { * * @param App $a */ -function cron_repair_diaspora(&$a) { +function cron_repair_diaspora(App &$a) { $r = q("SELECT `id`, `url` FROM `contact` WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '') ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA)); diff --git a/include/event.php b/include/event.php index 4abe3ffef5..73e61f25cf 100644 --- a/include/event.php +++ b/include/event.php @@ -206,7 +206,7 @@ function bbtoevent($s) { } -function sort_by_date($a) { +function sort_by_date(App &$a) { usort($a,'ev_compare'); return $a; diff --git a/include/identity.php b/include/identity.php index 5439b2cc10..380560228a 100644 --- a/include/identity.php +++ b/include/identity.php @@ -599,7 +599,7 @@ function get_events() { )); } -function advanced_profile(&$a) { +function advanced_profile(App &$a) { $o = ''; $uid = $a->profile['uid']; @@ -807,7 +807,7 @@ function get_my_url() { return false; } -function zrl_init(&$a) { +function zrl_init(App &$a) { $tmp_str = get_my_url(); if(validate_url($tmp_str)) { diff --git a/include/nav.php b/include/nav.php index f71272f3b1..bd933929d3 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,6 +1,6 @@