automatically remove and prevent installation of apps with a require version less than the current one. We check now the first ad second part of the version number.

Also increase the require tags of the core apps to 4.9 Please note that 4.9 is the internal versionnumber of the upcoming 4.5 release.
You have to pu a <require>4.9</require> into the info.xml of your app to make it as compatible with 4.5
This commit is contained in:
Frank Karlitschek 2012-10-02 12:10:45 +02:00
parent 783c02eda9
commit 3fdebaa5dc
9 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@
<description>File Management</description> <description>File Management</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<standalone/> <standalone/>
<default_enable/> <default_enable/>

View File

@ -5,7 +5,7 @@
<description>Server side encryption of files. DEPRECATED. This app is no longer supported and will be replaced with an improved version in ownCloud 5. Only enable this features if you want to read old encrypted data. Warning: You will lose your data if you enable this App and forget your password. Encryption is not yet compatible with LDAP.</description> <description>Server side encryption of files. DEPRECATED. This app is no longer supported and will be replaced with an improved version in ownCloud 5. Only enable this features if you want to read old encrypted data. Warning: You will lose your data if you enable this App and forget your password. Encryption is not yet compatible with LDAP.</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman</author> <author>Robin Appelman</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<types> <types>
<filesystem/> <filesystem/>

View File

@ -5,7 +5,7 @@
<description>Mount external storage sources</description> <description>Mount external storage sources</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Robin Appelman, Michael Gapczynski</author> <author>Robin Appelman, Michael Gapczynski</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<types> <types>
<filesystem/> <filesystem/>

View File

@ -5,7 +5,7 @@
<description>File sharing between users</description> <description>File sharing between users</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Michael Gapczynski</author> <author>Michael Gapczynski</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<default_enable/> <default_enable/>
<types> <types>

View File

@ -4,7 +4,7 @@
<name>Versions</name> <name>Versions</name>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Frank Karlitschek</author> <author>Frank Karlitschek</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<description>Versioning of files</description> <description>Versioning of files</description>
<types> <types>

View File

@ -5,7 +5,7 @@
<description>Authenticate Users by LDAP</description> <description>Authenticate Users by LDAP</description>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Dominik Schmidt and Arthur Schiwon</author> <author>Dominik Schmidt and Arthur Schiwon</author>
<require>4</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
<types> <types>
<authentication/> <authentication/>

View File

@ -6,6 +6,6 @@
<version>1.0</version> <version>1.0</version>
<licence>AGPL</licence> <licence>AGPL</licence>
<author>Frank Karlitschek</author> <author>Frank Karlitschek</author>
<require>3</require> <require>4.9</require>
<shipped>true</shipped> <shipped>true</shipped>
</info> </info>

View File

@ -664,8 +664,8 @@ class OC_App{
$version = OC_Util::getVersion(); $version = OC_Util::getVersion();
foreach($apps as $app) { foreach($apps as $app) {
// check if the app is compatible with this version of ownCloud // check if the app is compatible with this version of ownCloud
$info = OC_App::getAppInfo($app); $info = OC_App::getAppInfo($app);
if(!isset($info['require']) or ($version[0]>$info['require'])) { if(!isset($info['require']) or (($version[0].'.'.$version[1])>$info['require'])) {
OC_Log::write('core', 'App "'.$info['name'].'" ('.$app.') can\'t be used because it is not compatible with this version of ownCloud', OC_Log::ERROR); OC_Log::write('core', 'App "'.$info['name'].'" ('.$app.') can\'t be used because it is not compatible with this version of ownCloud', OC_Log::ERROR);
OC_App::disable( $app ); OC_App::disable( $app );
} }

View File

@ -80,8 +80,8 @@ class OC_Util {
* @return array * @return array
*/ */
public static function getVersion() { public static function getVersion() {
// hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4,9,0. This is not visible to the user // hint: We only can count up. So the internal version number of ownCloud 4.5 will be 4.9.0. This is not visible to the user
return array(4,85,11); return array(4,86,11);
} }
/** /**