X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Foexchange.php;h=88edc9d60c17e097e16ba2141cfa0d5920476ffa;hb=f22fe7118d52251dbd0898279ef078b797885ec4;hp=1e7c9b23c9e412427fc225d8ce2bd29acabfb770;hpb=4d21671f75e35e7c2880467dddc0936e8c718d8c;p=friendica.git diff --git a/mod/oexchange.php b/mod/oexchange.php index 1e7c9b23c9..88edc9d60c 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -1,28 +1,27 @@ argc > 1) && ($a->argv[1] === 'xrd')) { +function oexchange_init(App $a) { + + if (($a->argc > 1) && ($a->argv[1] === 'xrd')) { $tpl = get_markup_template('oexchange_xrd.tpl'); - $o = replace_macros($tpl, array('$base' => $a->get_baseurl())); + $o = replace_macros($tpl, array('$base' => System::baseUrl())); echo $o; killme(); } - -} } -if(! function_exists('oexchange_content')) { -function oexchange_content(&$a) { +function oexchange_content(App $a) { - if(! local_user()) { + if (! local_user()) { $o = login(false); return $o; } - if(($a->argc > 1) && $a->argv[1] === 'done') { + if (($a->argc > 1) && $a->argv[1] === 'done') { info( t('Post successful.') . EOL); return; } @@ -36,10 +35,11 @@ function oexchange_content(&$a) { $tags = (((x($_REQUEST,'tags')) && strlen($_REQUEST['tags'])) ? '&tags=' . urlencode(notags(trim($_REQUEST['tags']))) : ''); - $s = fetch_url($a->get_baseurl() . '/parse_url?f=&url=' . $url . $title . $description . $tags); + $s = fetch_url(System::baseUrl() . '/parse_url?f=&url=' . $url . $title . $description . $tags); - if(! strlen($s)) + if (! strlen($s)) { return; + } require_once('include/html2bbcode.php'); @@ -54,4 +54,3 @@ function oexchange_content(&$a) { require_once('mod/item.php'); item_post($a); } -}