diff --git a/classes/MarketRelease.class.php b/classes/MarketRelease.class.php index 47509442ef6d6da72029b0d315212e385ae6cc1d..64efa6c4bc509b9bf2fc448ba3ad5722cf2a56be 100644 --- a/classes/MarketRelease.class.php +++ b/classes/MarketRelease.class.php @@ -121,7 +121,9 @@ class MarketRelease extends SimpleORMap { $this['studip_max_version'] = $manifest['studipMaxVersion']; if (!$this['studip_max_version']) { $versions = PluginMarket::getStudipReleases(); - $this['studip_max_version'] = array_pop($versions).".99"; + $manifest['studipMaxVersion'] + = $this['studip_max_version'] + = array_pop($versions).".99"; } $this['version'] = $manifest['version']; if ($this['repository_overwrites_descriptionfrom']) { @@ -139,6 +141,7 @@ class MarketRelease extends SimpleORMap { } } $this->store(); + file_put_contents($dir."/plugin.manifest", $this->createManifest($manifest)); $hash = md5(uniqid()); $plugin_raw = $GLOBALS['TMP_PATH']."/plugin_$hash.zip"; create_zip_from_directory($dir, $plugin_raw); @@ -158,4 +161,12 @@ class MarketRelease extends SimpleORMap { && ( !$this->studip_max_version || version_compare($version, $this->studip_max_version) <= 0 ); } + protected function createManifest($manifest) { + $arr = array(); + foreach ($manifest as $index => $value) { + $arr[] = $index."=".$value; + } + return implode("\n", $arr); + } + } \ No newline at end of file