4
0
Эх сурвалжийг харах

Update local function to take force variable

CauseFX 6 жил өмнө
parent
commit
61fcc269e0

+ 4 - 1
api/functions/normal-functions.php

@@ -408,8 +408,11 @@ function download($url, $path)
 	return (filesize($path) > 0) ? true : false;
 }
 
-function localURL($url)
+function localURL($url, $force = false)
 {
+	if($force){
+		return true;
+	}
 	if (strpos($url, 'https') !== false) {
 		preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/", $url, $result);
 		$result = (!empty($result) ? true : false);