summaryrefslogtreecommitdiff
path: root/inc/fetch.functions.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-07-21 18:52:40 +0100
committerAnika Henke <anika@selfthinker.org>2013-07-21 18:52:40 +0100
commit8c7670b52dc523860f442a628ae7d226988e96d7 (patch)
treed99053d878efb0829f99a35bb77cb02c1ae3c524 /inc/fetch.functions.php
parent20beef63b4694afdc3d6c434c3d27c982b6a986b (diff)
parentfbd8067eeeb9f424981aad8b283e17f734c738c3 (diff)
downloadrpg-8c7670b52dc523860f442a628ae7d226988e96d7.tar.gz
rpg-8c7670b52dc523860f442a628ae7d226988e96d7.tar.bz2
Merge remote-tracking branch 'origin/master' into loggedin-class
Diffstat (limited to 'inc/fetch.functions.php')
-rw-r--r--inc/fetch.functions.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index ea524a37a..53ade3555 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -89,15 +89,18 @@ function sendFile($file, $mime, $dl, $cache, $public = false) {
* WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE )
*
* @author Gerry Weissbach <gerry.w@gammaproduction.de>
- * @param $media reference to the media id
- * @param $file reference to the file variable
- * @returns array(STATUS, STATUSMESSAGE)
+ * @param string $media reference to the media id
+ * @param string $file reference to the file variable
+ * @param string $rev
+ * @param int $width
+ * @param int $height
+ * @return array(STATUS, STATUSMESSAGE)
*/
function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
global $MIME, $EXT, $CACHE, $INPUT;
//media to local file
- if(preg_match('#^(https?)://#i', $media)) {
+ if(media_isexternal($media)) {
//check hash
if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) {
return array(412, 'Precondition Failed');