Move remaining functions
update remaining function calls
This commit is contained in:
parent
1eb7c19c1e
commit
ca76e49c23
19 changed files with 58 additions and 51 deletions
|
@ -5,6 +5,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Network;
|
||||
use League\HTMLToMarkdown\HtmlConverter;
|
||||
|
||||
require_once 'include/event.php';
|
||||
|
@ -82,7 +83,7 @@ function diaspora2bb($s) {
|
|||
$s = preg_replace('/(\[code\])+(.*?)(\[\/code\])+/ism', '[code]$2[/code]', $s);
|
||||
|
||||
// Don't show link to full picture (until it is fixed)
|
||||
$s = scale_external_images($s, false);
|
||||
$s = Network::scaleExternalImages($s, false);
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Profile;
|
||||
use Friendica\Object\Thread;
|
||||
use Friendica\Object\Post;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
require_once "include/bbcode.php";
|
||||
require_once "include/acl_selectors.php";
|
||||
|
@ -184,8 +185,8 @@ function localize_item(&$item) {
|
|||
|
||||
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
|
||||
|
||||
$obj = parse_xml_string($xmlhead.$item['object']);
|
||||
$links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
|
||||
$obj = Network::parseXmlString($xmlhead.$item['object']);
|
||||
$links = Network::parseXmlString($xmlhead."<links>".unxmlify($obj->link)."</links>");
|
||||
|
||||
$Bname = $obj->title;
|
||||
$Blink = ""; $Bphoto = "";
|
||||
|
@ -220,8 +221,8 @@ function localize_item(&$item) {
|
|||
|
||||
$xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
|
||||
|
||||
$obj = parse_xml_string($xmlhead.$item['object']);
|
||||
$links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
|
||||
$obj = Network::parseXmlString($xmlhead.$item['object']);
|
||||
$links = Network::parseXmlString($xmlhead."<links>".unxmlify($obj->link)."</links>");
|
||||
|
||||
$Bname = $obj->title;
|
||||
$Blink = "";
|
||||
|
@ -295,7 +296,7 @@ function localize_item(&$item) {
|
|||
}
|
||||
$plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
|
||||
|
||||
$parsedobj = parse_xml_string($xmlhead.$item['object']);
|
||||
$parsedobj = Network::parseXmlString($xmlhead.$item['object']);
|
||||
|
||||
$tag = sprintf('#[url=%s]%s[/url]', $parsedobj->id, $parsedobj->content);
|
||||
$item['body'] = L10n::t('%1$s tagged %2$s\'s %3$s with %4$s', $author, $objauthor, $plink, $tag );
|
||||
|
@ -312,7 +313,7 @@ function localize_item(&$item) {
|
|||
|
||||
$xmlhead = "<" . "?xml version='1.0' encoding='UTF-8' ?" . ">";
|
||||
|
||||
$obj = parse_xml_string($xmlhead.$item['object']);
|
||||
$obj = Network::parseXmlString($xmlhead.$item['object']);
|
||||
if (strlen($obj->id)) {
|
||||
$r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($obj->id),
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb)
|
||||
|
@ -362,7 +363,7 @@ function addHostnameSub($matches, $basepath)
|
|||
$url = $matches[1];
|
||||
|
||||
$parts = array_merge($base, parse_url($url));
|
||||
$url2 = unParseUrl($parts);
|
||||
$url2 = Network::unParseURL($parts);
|
||||
|
||||
return str_replace($url, $url2, $link);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue