]> git.mxchange.org Git - friendica.git/blobdiff - mod/proxy.php
Removed commented code
[friendica.git] / mod / proxy.php
index c6bf6530218c55085330211c252fbca9073feee4..a4fbdd24408183e3fc7eaa7794d58cdc2f612623 100644 (file)
@@ -135,7 +135,7 @@ function proxy_init() {
        $valid = true;
 
        if (!$direct_cache AND ($cachefile == "")) {
-               $r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' LIMIT 1", $urlhash);
+               $r = qu("SELECT * FROM `photo` WHERE `resource-id` = '%s' LIMIT 1", $urlhash);
                if (count($r)) {
                        $img_str = $r[0]['data'];
                        $mime = $r[0]["desc"];
@@ -238,6 +238,10 @@ function proxy_url($url, $writemode = false, $size = "") {
 
        $a = get_app();
 
+       if (substr($url, 0, strlen('http')) !== 'http') {
+               return($url);
+       }
+
        // Only continue if it isn't a local image and the isn't deactivated
        if (proxy_is_local_image($url)) {
                $url = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $url);