get_rpost_path() moved to a static class method and was still being referenced as a global

This commit is contained in:
zotlabs 2019-05-07 21:50:02 -07:00
parent ff686b354b
commit d747d9b7d3
2 changed files with 7 additions and 4 deletions

View file

@ -6,7 +6,7 @@ use App;
use Zotlabs\Web\Controller;
use Zotlabs\Access\AccessControl;
use Zotlabs\Lib\PermissionDescription;
use Zotlabs\Lib\Libzot;
require_once('include/acl_selectors.php');
require_once('include/items.php');
@ -46,7 +46,7 @@ class Rpost extends Controller {
// by the wretched beast called 'suhosin'. All the browsers now allow long GET requests, but suhosin
// blocks them.
$url = get_rpost_path(App::get_observer());
$url = Libzot::get_rpost_path(App::get_observer());
// make sure we're not looping to our own hub
if(($url) && (! stristr($url, App::get_hostname()))) {
foreach($_GET as $key => $arg) {

View file

@ -1,5 +1,8 @@
<?php
use Zotlabs\Lib\Libzot;
/**
* @file include/bbcode.php
* @brief BBCode related functions for parsing, etc.
@ -573,9 +576,9 @@ function bb_ShareAttributesSimple($match) {
function rpost_callback($match) {
if ($match[2]) {
return str_replace($match[0], get_rpost_path(App::get_observer()) . '&title=' . urlencode($match[2]) . '&body=' . urlencode($match[3]), $match[0]);
return str_replace($match[0], Libzot::get_rpost_path(App::get_observer()) . '&title=' . urlencode($match[2]) . '&body=' . urlencode($match[3]), $match[0]);
} else {
return str_replace($match[0], get_rpost_path(App::get_observer()) . '&body=' . urlencode($match[3]), $match[0]);
return str_replace($match[0], Libzot::get_rpost_path(App::get_observer()) . '&body=' . urlencode($match[3]), $match[0]);
}
}