mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Merge branch 'development' of https://gitlab.telaaedifex.com/xevidos/codiad into development
This commit is contained in:
commit
cb044a00ce
@ -41,7 +41,7 @@ class Update {
|
||||
$this->archive = "https://gitlab.telaaedifex.com/xevidos/codiad/-/archive/master/codiad-master.zip";
|
||||
$this->commits = "https://gitlab.telaaedifex.com/api/v4/projects/3/repository/commits/";
|
||||
$this->tags = "https://gitlab.telaaedifex.com/api/v4/projects/3/repository/tags/";
|
||||
//$this->protocol = $this->CheckProtocol();
|
||||
$this->protocol = $this->CheckProtocol();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@ -127,11 +127,28 @@ class Update {
|
||||
|
||||
|
||||
|
||||
|
||||
//echo var_dump( $response );
|
||||
//return "[".formatJSEND("success", array("currentversion"=>$local[0]['version'],"remoteversion"=>$latest,"message"=>$message,"archive"=>$archive,"nightly"=>$nightly,"name"=>$local[0]['name']))."]";
|
||||
return "[".formatJSEND("success", array("currentversion"=>$current_version,"remoteversion"=>$response["name"],"message"=>$response["message"],"archive"=>$archive,"nightly"=>$nightly,"name"=>$response["author_name"]))."]";
|
||||
}
|
||||
|
||||
function CheckProtocol() {
|
||||
|
||||
if( extension_loaded( 'curl' ) ) {
|
||||
|
||||
//Curl is loaded
|
||||
return "curl";
|
||||
} elseif( ini_get('allow_url_fopen') ) {
|
||||
|
||||
//Remote get file is enabled
|
||||
return "fopen";
|
||||
} else {
|
||||
|
||||
//None are enabled exit.
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Get Local Version
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@ -187,6 +204,6 @@ class Update {
|
||||
break;
|
||||
}
|
||||
|
||||
return json_decode(file_get_contents($remoteurl), true);
|
||||
//return( json_decode( file_get_contents( $remoteurl ), true ) );
|
||||
}
|
||||
}
|
||||
}
|
@ -12,9 +12,10 @@
|
||||
// Verify Session or Key
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
require_once('../../common.php');
|
||||
checkSession();
|
||||
|
||||
switch($_GET['action']){
|
||||
switch($_GET['action']){
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Update
|
||||
@ -32,7 +33,7 @@ checkSession();
|
||||
|
||||
} else {
|
||||
|
||||
require_once('class.update.php');
|
||||
require_once('./class.update.php');
|
||||
$update = new Update();
|
||||
$vars = json_decode($update->Check(), true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user