소스 검색

Better software update, experimental

markseu 7 년 전
부모
커밋
74c748d48a
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      system/plugins/update.php

+ 5 - 1
system/plugins/update.php

@@ -5,7 +5,7 @@
 
 
 class YellowUpdate
 class YellowUpdate
 {
 {
-	const VERSION = "0.7.13";
+	const VERSION = "0.7.14";
 	var $yellow;					//access to API
 	var $yellow;					//access to API
 	var $updates;					//number of updates
 	var $updates;					//number of updates
 	
 	
@@ -802,6 +802,10 @@ class YellowUpdate
 		{
 		{
 			$urlRequest = "https://raw.githubusercontent.com/".$matches[1]."/".$matches[2];
 			$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();
 		$curlHandle = curl_init();
 		curl_setopt($curlHandle, CURLOPT_URL, $urlRequest);
 		curl_setopt($curlHandle, CURLOPT_URL, $urlRequest);
 		curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; DatenstromYellow/".YellowCore::VERSION."; SoftwareUpdater)");
 		curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; DatenstromYellow/".YellowCore::VERSION."; SoftwareUpdater)");