Procházet zdrojové kódy

System update (better installation)

markseu před 9 roky
rodič
revize
42e9e96321

+ 0 - 0
system/plugins/installation-blog.zip.download → system/plugins/update-blog.zip.download


+ 0 - 0
system/plugins/installation-wiki.zip.download → system/plugins/update-wiki.zip.download


+ 9 - 4
system/plugins/update.php

@@ -249,8 +249,13 @@ class YellowUpdate
 			if(preg_match("/$feature/i", basename($entry)))
 			{
 				if($this->updateSoftwareArchive($entry)!=200) $ok = false;
-			} else {
-				if(!$this->yellow->toolbox->deleteFile($entry)) $ok = false;
+			}
+		}
+		if($ok)
+		{
+			foreach($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false) as $entry)
+			{
+				$this->yellow->toolbox->deleteFile($entry);
 			}
 		}
 		return $ok;
@@ -411,9 +416,9 @@ class YellowUpdate
 		$regex = "/^.*\\".$this->yellow->config->get("downloadExtension")."$/";
 		foreach($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false, false) as $entry)
 		{
-			if(preg_match("/^installation-(.*?)\\./", $entry, $matches))
+			if(preg_match("/^(.*?)-(.*?)\./", $entry, $matches))
 			{
-				array_push($data, $matches[1]);
+				array_push($data, $matches[2]);
 			}
 		}
 		return $data;