From 1454abfdb48b8ba452d897d90f6979bb4f23912c Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 9 Oct 2018 20:13:22 +0200 Subject: [PATCH] rename App Methods - rename get_baseurl() to getBaseURL() --- blockem/blockem.php | 4 +- blogger/blogger.php | 2 +- buffer/buffer.php | 10 +- catavatar/catavatar.php | 6 +- curweather/curweather.php | 2 +- diaspora/diaspora.php | 2 +- dwpost/dwpost.php | 2 +- fortunate/fortunate.php | 2 +- forumdirectory/forumdirectory.php | 4 +- fromapp/fromapp.php | 2 +- geonames/geonames.php | 2 +- gnot/gnot.php | 2 +- group_text/group_text.php | 2 +- ifttt/ifttt.php | 2 +- ijpost/ijpost.php | 2 +- impressum/impressum.php | 2 +- .../infiniteimprobabilitydrive.php | 6 +- irc/irc.php | 6 +- jappixmini/jappixmini.php | 22 +- js_upload/js_upload.php | 4 +- krynn/krynn.php | 2 +- langfilter/langfilter.php | 2 +- libertree/libertree.php | 2 +- ljpost/ljpost.php | 2 +- mahjongg/mahjongg.php | 2 +- mailstream/mailstream.php | 4 +- namethingy/namethingy.php | 2 +- newmemberwidget/newmemberwidget.php | 2 +- notimeline/notimeline.php | 2 +- nsfw/nsfw.php | 2 +- numfriends/numfriends.php | 2 +- openstreetmap/openstreetmap.php | 2 +- pageheader/pageheader.php | 4 +- piwik/piwik.php | 2 +- planets/planets.php | 2 +- pledgie/pledgie.php | 2 +- public_server/public_server.php | 6 +- pumpio/pumpio.php | 12 +- qcomment/qcomment.php | 2 +- randplace/randplace.php | 2 +- remote_permissions/remote_permissions.php | 4 +- showmore/showmore.php | 2 +- .../lang/smiley_pack_es/smiley_pack_es.php | 274 ++++++++--------- .../lang/smiley_pack_fr/smiley_pack_fr.php | 222 +++++++------- smiley_pack/smiley_pack.php | 276 +++++++++--------- smileybutton/smileybutton.php | 50 ++-- smilies_adult/smilies_adult.php | 12 +- sniper/sniper.php | 2 +- startpage/startpage.php | 2 +- statusnet/statusnet.php | 6 +- superblock/superblock.php | 2 +- testdrive/testdrive.php | 6 +- tumblr/tumblr.php | 8 +- twitter/twitter.php | 8 +- viewsrc/viewsrc.php | 4 +- widgets/widget_friendheader.php | 2 +- widgets/widget_friends.php | 2 +- widgets/widget_like.php | 2 +- widgets/widgets.php | 12 +- windowsphonepush/windowsphonepush.php | 2 +- wppost/wppost.php | 2 +- xmpp/xmpp.php | 2 +- 62 files changed, 523 insertions(+), 523 deletions(-) diff --git a/blockem/blockem.php b/blockem/blockem.php index c915cd6ce..2a5fd8b60 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -42,7 +42,7 @@ function blockem_addon_settings (App $a, &$s) } /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; $words = PConfig::get(local_user(), 'blockem', 'words'); @@ -147,7 +147,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data) function blockem_display_item(App $a, array &$b = null) { if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) { - $b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg"; + $b['output']['thumb'] = $a->getBaseURL() . "/images/person-80.jpg"; } } diff --git a/blogger/blogger.php b/blogger/blogger.php index 68837cd8e..e747c3a6b 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -62,7 +62,7 @@ function blogger_settings(App $a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/buffer/buffer.php b/buffer/buffer.php index 4fc45c857..048a27daf 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -105,7 +105,7 @@ function buffer_connect(App $a) $client_secret = Config::get('buffer','client_secret'); // The callback URL is the script that gets called after the user authenticates with buffer - $callback_url = $a->get_baseurl()."/buffer/connect"; + $callback_url = $a->getBaseURL()."/buffer/connect"; $buffer = new BufferApp($client_id, $client_secret, $callback_url); @@ -114,7 +114,7 @@ function buffer_connect(App $a) } else { logger("buffer_connect: authenticated"); $o .= L10n::t("You are now authenticated to buffer. "); - $o .= '
' . L10n::t("return to the connector page") . ''; + $o .= '
' . L10n::t("return to the connector page") . ''; PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token); } @@ -145,7 +145,7 @@ function buffer_settings(App $a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ @@ -174,7 +174,7 @@ function buffer_settings(App $a, &$s) if ($access_token == "") { $s .= '
'; - $s .= ''.L10n::t("Authenticate your Buffer connection").''; + $s .= ''.L10n::t("Authenticate your Buffer connection").''; $s .= '
'; } else { $s .= '
'; @@ -193,7 +193,7 @@ function buffer_settings(App $a, &$s) $s .= '
'; // The callback URL is the script that gets called after the user authenticates with buffer - $callback_url = $a->get_baseurl() . '/buffer/connect'; + $callback_url = $a->getBaseURL() . '/buffer/connect'; $buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token); diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php index 490c6394f..27e48b7af 100644 --- a/catavatar/catavatar.php +++ b/catavatar/catavatar.php @@ -82,7 +82,7 @@ function catavatar_addon_settings_post(App $a, &$s) $seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email'])))); if (!empty($_POST['catavatar-usecat'])) { - $url = $a->get_baseurl() . '/catavatar/' . local_user() . '?ts=' . time(); + $url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time(); $self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]); if (!DBA::isResult($self)) { @@ -109,7 +109,7 @@ function catavatar_addon_settings_post(App $a, &$s) Contact::updateSelfFromUserID(local_user(), true); // Update global directory in background - $url = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + $url = $a->getBaseURL() . '/profile/' . $a->user['nickname']; if ($url && strlen(Config::get('system', 'directory'))) { Worker::add(PRIORITY_LOW, 'Directory', $url); } @@ -138,7 +138,7 @@ function catavatar_addon_settings_post(App $a, &$s) function catavatar_lookup(App $a, &$b) { $user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]); - $url = $a->get_baseurl() . '/catavatar/' . $user['uid']; + $url = $a->getBaseURL() . '/catavatar/' . $user['uid']; switch($b['size']) { case 175: $url .= "/4"; break; diff --git a/curweather/curweather.php b/curweather/curweather.php index 044f5a154..c4cf3ab46 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -103,7 +103,7 @@ function curweather_network_mod_init(App $a, &$b) return; } - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // $rpt value is needed for location // $lang will be taken from the browser session to honour user settings diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php index a54725582..ed053c75f 100644 --- a/diaspora/diaspora.php +++ b/diaspora/diaspora.php @@ -136,7 +136,7 @@ function diaspora_settings(App $a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 0174bf105..f6f266347 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -60,7 +60,7 @@ function dwpost_settings(App $a, &$s) } /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ $enabled = PConfig::get(local_user(), 'dwpost', 'post'); diff --git a/fortunate/fortunate.php b/fortunate/fortunate.php index ebece4898..b92f6085f 100644 --- a/fortunate/fortunate.php +++ b/fortunate/fortunate.php @@ -30,7 +30,7 @@ function fortunate_uninstall() function fortunate_fetch(&$a, &$b) { $a->page['htmlhead'] .= '' . "\r\n"; + . $a->getBaseURL() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n"; if (FORTUNATE_SERVER != 'hostname.com') { $s = Network::fetchUrl('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand()); diff --git a/forumdirectory/forumdirectory.php b/forumdirectory/forumdirectory.php index 9f7dd8778..0c2aa2656 100644 --- a/forumdirectory/forumdirectory.php +++ b/forumdirectory/forumdirectory.php @@ -43,7 +43,7 @@ function forumdirectory_app_menu(App $a, array &$b) function forumdirectory_init(App $a) { - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; $a->set_pager_itemspage(60); @@ -130,7 +130,7 @@ function forumdirectory_content(App $a) } foreach ($r as $rr) { - $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $profile_link = $a->getBaseURL() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '
' : ''); diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index afdb087b3..6a33cd037 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -47,7 +47,7 @@ function fromapp_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/geonames/geonames.php b/geonames/geonames.php index 4cd1b27cb..dc6e116b7 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -178,7 +178,7 @@ function geonames_addon_admin(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/gnot/gnot.php b/gnot/gnot.php index c7678a218..2c4555ba3 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -67,7 +67,7 @@ function gnot_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/group_text/group_text.php b/group_text/group_text.php index 4c0cb14a9..3f91ff355 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -63,7 +63,7 @@ function group_text_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index ddd64394c..2e48319ab 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -64,7 +64,7 @@ function ifttt_settings(App $a, &$s) $s .= '
'; $s .= '

' . L10n::t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '

'; $s .= '

URL

'; - $s .= '

' . $a->get_baseurl() . '/ifttt/' . $a->user['nickname'] . '

'; + $s .= '

' . $a->getBaseURL() . '/ifttt/' . $a->user['nickname'] . '

'; $s .= '

Method

'; $s .= '

POST

'; $s .= '

Content Type

'; diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index b003742f7..5d24509e3 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -56,7 +56,7 @@ function ijpost_settings(&$a, &$s) /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/impressum/impressum.php b/impressum/impressum.php index b7cf64e40..74d871809 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -43,7 +43,7 @@ function impressum_footer($a, &$b) { $text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text'))); if (! $text == '') { - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; $b .= '
'; $b .= ''; } diff --git a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php index e92d34407..3106a2fe6 100644 --- a/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php +++ b/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php @@ -32,13 +32,13 @@ function infiniteimprobabilitydrive_module() function infiniteimprobabilitydrive_content(&$a) { - $baseurl = $a->get_baseurl() . '/addon/infiniteimprobabilitydrive'; + $baseurl = $a->getBaseURL() . '/addon/infiniteimprobabilitydrive'; $o = ''; - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; - $baseurl = $a->get_baseurl(); + $baseurl = $a->getBaseURL(); $o .= <<< EOT diff --git a/irc/irc.php b/irc/irc.php index 6aeacbe65..38ce5f24b 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -30,7 +30,7 @@ function irc_addon_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ -// $a->page['htmlhead'] .= '' . "\r\n"; +// $a->page['htmlhead'] .= '' . "\r\n"; /* setting popular channels, auto connect channels */ $sitechats = PConfig::get( local_user(), 'irc','sitechats'); /* popular channels */ @@ -74,7 +74,7 @@ function irc_module() { function irc_content(&$a) { - $baseurl = $a->get_baseurl() . '/addon/irc'; + $baseurl = $a->getBaseURL() . '/addon/irc'; $o = ''; /* set the list of popular channels */ @@ -93,7 +93,7 @@ function irc_content(&$a) { $a->page['aside'] .= '

' . L10n::t('Popular Channels') . '

'; diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index ad25b6f94..8111f9fd8 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -323,10 +323,10 @@ function jappixmini_settings(App $a, &$s) if (!$activate) { // load scripts if not yet activated so that password can be saved - $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; } $s .= ''; @@ -489,10 +489,10 @@ function jappixmini_script(App $a) return; } - $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; $username = PConfig::get(local_user(), 'jappixmini', 'username'); $username = str_replace("'", "\\'", $username); @@ -513,7 +513,7 @@ function jappixmini_script(App $a) // set proxy if necessary $use_proxy = Config::get('jappixmini', 'bosh_proxy'); if ($use_proxy) { - $proxy = $a->get_baseurl() . '/addon/jappixmini/proxy.php'; + $proxy = $a->getBaseURL() . '/addon/jappixmini/proxy.php'; } else { $proxy = ""; } @@ -568,10 +568,10 @@ function jappixmini_login(App $a, &$o) { // create client secret on login to be able to encrypt jabber passwords // for setDB and str_sha1, needed by jappixmini_addon_set_client_secret - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // for jappixmini_addon_set_client_secret - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; // save hash of password $o = str_replace("
get_baseurl() . '/addon/jappixmini/jappix/AUTHORS">Jappix authors and is distributed under the terms of the GNU Affero General Public License.

'; - $b .= '

You can download the source code of the addon. The rest of Friendica is distributed under compatible licenses and can be retrieved from https://github.com/friendica/friendica and https://github.com/friendica/friendica-addons

'; + $b .= '

This site uses the jappixmini addon, which includes Jappix Mini by the Jappix authors and is distributed under the terms of the GNU Affero General Public License.

'; + $b .= '

You can download the source code of the addon. The rest of Friendica is distributed under compatible licenses and can be retrieved from https://github.com/friendica/friendica and https://github.com/friendica/friendica-addons

'; } diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 28903f87e..adeba838c 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -38,8 +38,8 @@ function js_upload_form(&$a,&$b) { $b['default_upload'] = false; - $b['addon_text'] .= ''; - $b['addon_text'] .= ''; + $b['addon_text'] .= ''; + $b['addon_text'] .= ''; $upload_msg = L10n::t('Select files for upload'); $drop_msg = L10n::t('Drop files here to upload'); diff --git a/krynn/krynn.php b/krynn/krynn.php index 47372926d..4b6e1f7f7 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -141,7 +141,7 @@ function krynn_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variable */ diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index fe413d63e..6922ac823 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -121,7 +121,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data) // Never filter own messages // TODO: find a better way to extract this - $logged_user_profile = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + $logged_user_profile = $a->getBaseURL() . '/profile/' . $a->user['nickname']; if ($logged_user_profile == $hook_data['item']['author-link']) { return; } diff --git a/libertree/libertree.php b/libertree/libertree.php index 7fce4b4e8..c6e3f9f1e 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -51,7 +51,7 @@ function libertree_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 669788fd6..61c96b7db 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -54,7 +54,7 @@ function ljpost_settings(&$a,&$s) { /* Add our stylesheet to the page so we can make our settings look nice */ - $a->page['htmlhead'] .= '' . "\r\n"; + $a->page['htmlhead'] .= '' . "\r\n"; /* Get the current state of our config variables */ diff --git a/mahjongg/mahjongg.php b/mahjongg/mahjongg.php index 3567792b4..6d772a937 100644 --- a/mahjongg/mahjongg.php +++ b/mahjongg/mahjongg.php @@ -26,7 +26,7 @@ function mahjongg_module() {} function mahjongg_content(&$a) { -$baseurl = $a->get_baseurl() . '/addon/mahjongg'; +$baseurl = $a->getBaseURL() . '/addon/mahjongg'; $o .= <<< EOT

diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 7aad5861c..5d9153d43 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -152,7 +152,7 @@ function mailstream_do_images($a, &$item, &$attachments) { return; } $attachments = []; - $baseurl = $a->get_baseurl(); + $baseurl = $a->getBaseURL(); preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", $item["body"], $matches1); preg_match_all("/\[img\](.*?)\[\/img\]/ism", $item["body"], $matches2); foreach (array_merge($matches1[3], $matches2[1]) as $url) { @@ -289,7 +289,7 @@ function mailstream_send($a, $message_id, $item, $user) { $mail->CharSet = 'utf-8'; $template = get_markup_template('mail.tpl', 'addon/mailstream/'); $item['body'] = BBCode::convert($item['body']); - $item['url'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item['id']; + $item['url'] = $a->getBaseURL() . '/display/' . $user['nickname'] . '/' . $item['id']; $mail->Body = replace_macros($template, [ '$upstream' => L10n::t('Upstream'), '$local' => L10n::t('Local'), diff --git a/namethingy/namethingy.php b/namethingy/namethingy.php index c758fc08a..f6a717fc8 100644 --- a/namethingy/namethingy.php +++ b/namethingy/namethingy.php @@ -27,7 +27,7 @@ function namethingy_module() {} function namethingy_content(&$a) { -$baseurl = $a->get_baseurl() . '/addon/namethingy'; +$baseurl = $a->getBaseURL() . '/addon/namethingy'; $o .= <<< EOT