Better software update, experimental
This commit is contained in:
parent
acd7575fe6
commit
74c748d48a
1 changed files with 5 additions and 1 deletions
6
system/plugins/update.php
Normal file → Executable file
6
system/plugins/update.php
Normal file → Executable file
|
@ -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)");
|
||||
|
|
Loading…
Add table
Reference in a new issue