Sfoglia il codice sorgente

locaiton work again

causefx 8 anni fa
parent
commit
14e49ac48b
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      api/functions/update-functions.php

+ 2 - 2
api/functions/update-functions.php

@@ -4,7 +4,7 @@
 // Upgrade the installation
 // Upgrade the installation
 function upgradeInstall($branch = 'v2-master', $stage) {
 function upgradeInstall($branch = 'v2-master', $stage) {
     $url = 'https://github.com/causefx/Organizr/archive/'.$branch.'.zip';
     $url = 'https://github.com/causefx/Organizr/archive/'.$branch.'.zip';
-    $file = dirname(__DIR__,2).DIRECTORY_SEPARATOR."upgrade.zip";
+    $file = "upgrade.zip";
     $source = dirname(__DIR__,2).DIRECTORY_SEPARATOR.'upgrade'.DIRECTORY_SEPARATOR.'Organizr-'.str_replace('v2','2',$branch).DIRECTORY_SEPARATOR;
     $source = dirname(__DIR__,2).DIRECTORY_SEPARATOR.'upgrade'.DIRECTORY_SEPARATOR.'Organizr-'.str_replace('v2','2',$branch).DIRECTORY_SEPARATOR;
     $cleanup = dirname(__DIR__,2) .DIRECTORY_SEPARATOR."upgrade".DIRECTORY_SEPARATOR;
     $cleanup = dirname(__DIR__,2) .DIRECTORY_SEPARATOR."upgrade".DIRECTORY_SEPARATOR;
     $destination = dirname(__DIR__,2).DIRECTORY_SEPARATOR;
     $destination = dirname(__DIR__,2).DIRECTORY_SEPARATOR;
@@ -55,7 +55,7 @@ function upgradeInstall($branch = 'v2-master', $stage) {
 }
 }
 function downloadFile($url, $path){
 function downloadFile($url, $path){
 	ini_set('max_execution_time',0);
 	ini_set('max_execution_time',0);
-	$folderPath = "upgrade".DIRECTORY_SEPARATOR;
+	$folderPath = dirname(__DIR__,2).DIRECTORY_SEPARATOR."upgrade".DIRECTORY_SEPARATOR;
 	if(!mkdir($folderPath)){
 	if(!mkdir($folderPath)){
 		//writeLog("error", "organizr could not create upgrade folder");
 		//writeLog("error", "organizr could not create upgrade folder");
 	}
 	}