Move functions to system

move some functions to system
This commit is contained in:
Adam Magness 2018-01-27 11:59:10 -05:00
commit 9b8599b619
21 changed files with 169 additions and 169 deletions

View file

@ -49,7 +49,7 @@ function dfrn_poll_init(App $a)
if (($dfrn_id === '') && (!x($_POST, 'dfrn_id'))) {
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
Network::httpStatusExit(403);
System::httpExit(403);
}
$user = '';
@ -58,7 +58,7 @@ function dfrn_poll_init(App $a)
dbesc($a->argv[1])
);
if (!$r) {
Network::httpStatusExit(404);
System::httpExit(404);
}
$hidewall = ($r[0]['hidewall'] && !local_user());
@ -145,7 +145,7 @@ function dfrn_poll_init(App $a)
dbesc($sec)
);
if (!DBM::is_result($r)) {
Network::xmlExit(3, 'No ticket');
System::xmlExit(3, 'No ticket');
// NOTREACHED
}
@ -158,7 +158,7 @@ function dfrn_poll_init(App $a)
intval($r[0]['cid'])
);
if (!DBM::is_result($c)) {
Network::xmlExit(3, 'No profile');
System::xmlExit(3, 'No profile');
}
$contact = $c[0];
@ -185,7 +185,7 @@ function dfrn_poll_init(App $a)
if ($final_dfrn_id != $orig_id) {
logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
// did not decode properly - cannot trust this site
Network::xmlExit(3, 'Bad decryption');
System::xmlExit(3, 'Bad decryption');
}
header("Content-type: text/xml");
@ -209,10 +209,10 @@ function dfrn_poll_init(App $a)
$r = q("SELECT * FROM `profile_check` WHERE `dfrn_id` = '%s' ORDER BY `expire` DESC",
dbesc($dfrn_id));
if (DBM::is_result($r)) {
Network::xmlExit(1);
System::xmlExit(1);
return; // NOTREACHED
}
Network::xmlExit(0);
System::xmlExit(0);
return; // NOTREACHED
}
}
@ -237,7 +237,7 @@ function dfrn_poll_post(App $a)
dbesc($sec)
);
if (!DBM::is_result($r)) {
Network::xmlExit(3, 'No ticket');
System::xmlExit(3, 'No ticket');
// NOTREACHED
}
@ -250,7 +250,7 @@ function dfrn_poll_post(App $a)
intval($r[0]['cid'])
);
if (!DBM::is_result($c)) {
Network::xmlExit(3, 'No profile');
System::xmlExit(3, 'No profile');
}
$contact = $c[0];
@ -277,7 +277,7 @@ function dfrn_poll_post(App $a)
if ($final_dfrn_id != $orig_id) {
logger('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
// did not decode properly - cannot trust this site
Network::xmlExit(3, 'Bad decryption');
System::xmlExit(3, 'Bad decryption');
}
header("Content-type: text/xml");