aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php47
1 files changed, 21 insertions, 26 deletions
diff --git a/include/network.php b/include/network.php
index c67c019ef..026f5ee0a 100644
--- a/include/network.php
+++ b/include/network.php
@@ -320,17 +320,18 @@ function xml_status($st, $message = '') {
killme();
}
+
+
/**
- * @brief Send HTTP status header and exit.
+ * @brief Send HTTP status header
*
* @param int $val
* integer HTTP status result value
* @param string $msg
* optional message
- * @returns (does not return, process is terminated)
+ * @returns nil
*/
-function http_status_exit($val, $msg = '') {
-
+function http_status($val, $msg = '') {
if ($val >= 400)
$msg = (($msg) ? $msg : 'Error');
if ($val >= 200 && $val < 300)
@@ -338,10 +339,26 @@ function http_status_exit($val, $msg = '') {
logger('http_status_exit ' . $val . ' ' . $msg);
header($_SERVER['SERVER_PROTOCOL'] . ' ' . $val . ' ' . $msg);
+}
+
+
+
+/**
+ * @brief Send HTTP status header and exit.
+ *
+ * @param int $val
+ * integer HTTP status result value
+ * @param string $msg
+ * optional message
+ * @returns (does not return, process is terminated)
+ */
+function http_status_exit($val, $msg = '') {
+ http_status($val, $msg);
killme();
}
+
// convert an XML document to a normalised, case-corrected array
// used by webfinger
@@ -526,28 +543,6 @@ function allowed_email($email) {
-function avatar_img($email) {
-
- $avatar = array();
- $a = get_app();
-
- $avatar['size'] = 300;
- $avatar['email'] = $email;
- $avatar['url'] = '';
- $avatar['success'] = false;
-
- call_hooks('avatar_lookup', $avatar);
-
- if (! $avatar['success'])
- $avatar['url'] = $a->get_baseurl() . '/' . get_default_profile_photo();
-
- logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);
-
- return $avatar['url'];
-}
-
-
-
function parse_xml_string($s,$strict = true) {
if($strict) {
if(! strstr($s,'<?xml'))