Selaa lähdekoodia

Better software update, experimental

markseu 7 vuotta sitten
vanhempi
commit
74c748d48a
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      system/plugins/update.php

+ 5 - 1
system/plugins/update.php

@@ -5,7 +5,7 @@
 
 class YellowUpdate
 {
-	const VERSION = "0.7.13";
+	const VERSION = "0.7.14";
 	var $yellow;					//access to API
 	var $updates;					//number of updates
 	
@@ -802,6 +802,10 @@ class YellowUpdate
 		{
 			$urlRequest = "https://raw.githubusercontent.com/".$matches[1]."/".$matches[2];
 		}
+		if(preg_match("#^https://github.com/(.+)/archive/master.zip$#", $url, $matches))
+		{
+			$urlRequest = "https://codeload.github.com/".$matches[1]."/zip/master";
+		}
 		$curlHandle = curl_init();
 		curl_setopt($curlHandle, CURLOPT_URL, $urlRequest);
 		curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; DatenstromYellow/".YellowCore::VERSION."; SoftwareUpdater)");