Move remaining functions

update remaining function calls
This commit is contained in:
Adam Magness 2018-01-27 08:25:54 -05:00
parent 1eb7c19c1e
commit ca76e49c23
19 changed files with 58 additions and 51 deletions

View file

@ -252,7 +252,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
return;
}
$xml = parse_xml_string($res);
$xml = Network::parseXmlString($res);
$status = (int) $xml->status;
$message = unxmlify($xml->message); // human readable text of what may have gone wrong.
switch ($status) {

View file

@ -123,7 +123,7 @@ function dfrn_notify_post(App $a) {
// if contact's ssl policy changed, update our links
fix_contact_ssl_policy($importer,$ssl_policy);
Network::fixContactSslPolicy($importer, $ssl_policy);
logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']);
logger('dfrn_notify: data: ' . $data, LOGGER_DATA);

View file

@ -104,7 +104,7 @@ function dfrn_poll_init(App $a)
logger("dfrn_poll: old profile returns " . $s, LOGGER_DATA);
if (strlen($s)) {
$xml = parse_xml_string($s);
$xml = Network::parseXmlString($s);
if ((int) $xml->status === 1) {
$_SESSION['authenticated'] = 1;
@ -521,7 +521,7 @@ function dfrn_poll_content(App $a)
logger("dfrn_poll: sec profile: " . $s, LOGGER_DATA);
if (strlen($s) && strstr($s, '<?xml')) {
$xml = parse_xml_string($s);
$xml = Network::parseXmlString($s);
logger('dfrn_poll: profile: parsed xml: ' . print_r($xml, true), LOGGER_DATA);

View file

@ -91,7 +91,7 @@ function hovercard_content()
return $o;
} else {
json_return_and_die($profile);
Network::jsonReturnAndDie($profile);
}
}

View file

@ -29,6 +29,7 @@ use Friendica\Network\Probe;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\Email;
use Friendica\Util\Emailer;
use Friendica\Util\Network;
require_once 'include/enotify.php';
require_once 'include/tags.php';
@ -519,7 +520,7 @@ function item_post(App $a) {
// Fold multi-line [code] sequences
$body = preg_replace('/\[\/code\]\s*\[code\]/ism', "\n", $body);
$body = scale_external_images($body, false);
$body = Network::scaleExternalImages($body, false);
// Setting the object type if not defined before
if (!$objecttype) {

View file

@ -10,8 +10,7 @@ use Friendica\Core\L10n;
use Friendica\Core\NotificationsManager;
use Friendica\Core\System;
use Friendica\Database\DBM;
require_once "include/network.php";
use Friendica\Util\Network;
function notifications_post(App $a) {
@ -139,8 +138,9 @@ function notifications_content(App $a) {
$notifs['page'] = $a->pager['page'];
// Json output
if(intval($json) === 1)
json_return_and_die($notifs);
if (intval($json) === 1) {
Network::jsonReturnAndDie($notifs);
}
$notif_tpl = get_markup_template('notifications.tpl');

View file

@ -1,10 +1,10 @@
<?php
/**
* @file mod/smilies.php
*/
use Friendica\App;
use Friendica\Content\Smilies;
use Friendica\Util\Network;
/**
* @param object $a App
@ -18,7 +18,7 @@ function smilies_content(App $a)
for ($i = 0; $i < count($tmp['texts']); $i++) {
$results[] = ['text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]];
}
json_return_and_die($results);
Network::jsonReturnAndDie($results);
} else {
return Smilies::replace('', true);
}