keep version numbers in their own files for faster reading

This commit is contained in:
Robin Appelman 2012-04-14 16:27:58 +02:00
parent bfdbdd9b20
commit 926b2b78fe
43 changed files with 37 additions and 24 deletions

View File

@ -2,7 +2,6 @@
<info>
<id>admin_dependencies_chk</id>
<name>Owncloud dependencies info</name>
<version>0.01</version>
<licence>AGPL</licence>
<author>Brice Maron (eMerzh)</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.01

View File

@ -3,7 +3,6 @@
<id>admin_migrate</id>
<name>ownCloud Instance Migration</name>
<description>Import/Export your owncloud instance</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Thomas Schmidt and Tom Needham</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>bookmarks</id>
<name>Bookmarks</name>
<description>Bookmark manager for ownCloud</description>
<version>0.2</version>
<licence>AGPL</licence>
<author>Arthur Schiwon, Marvin Thomas Rabe</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.2

View File

@ -2,7 +2,6 @@
<info>
<id>calendar</id>
<name>Calendar</name>
<version>0.2.1</version>
<licence>AGPL</licence>
<author>Georg Ehrke, Bart Visscher, Jakob Sack</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.2.1

View File

@ -2,7 +2,6 @@
<info>
<id>contacts</id>
<name>Contacts</name>
<version>0.1</version>
<licence>AGPL</licence>
<author>Jakob Sack</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>external</id>
<name>External</name>
<description>Show external Application in the ownCloud menu</description>
<version>1.0</version>
<licence>AGPL</licence>
<author>Frank Karlitschek</author>
<require>2</require>

1
apps/external/appinfo/version vendored Normal file
View File

@ -0,0 +1 @@
1.0

View File

@ -3,7 +3,6 @@
<id>files_archive</id>
<name>Archive support</name>
<description>Transparent opening of archives</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_encryption</id>
<name>Encryption</name>
<description>Server side encryption of files</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_external</id>
<name>External storage support</name>
<description>Mount external storage sources</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>3</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_imageviewer</id>
<name>Image Viewer</name>
<description>Simple image viewer for owncloud</description>
<version>1.0</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>

View File

@ -0,0 +1 @@
1.0

View File

@ -3,7 +3,6 @@
<id>files_pdfviewer</id>
<name>PDF Viewer</name>
<description>Inline PDF viewer (pdfjs-based)</description>
<version>0.1</version>
<licence>GPL</licence>
<author>Joan Creus</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_sharing</id>
<name>Share Files</name>
<description>File sharing between users</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Michael Gapczynski</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>files_texteditor</id>
<name>Text Editor</name>
<description>Simple plain text editor based on Ace editor.</description>
<version>0.3</version>
<licence>AGPL</licence>
<author>Tom Needham</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -2,7 +2,6 @@
<info>
<id>files_versioning</id>
<name>Versioning and Backup</name>
<version>1.0.0</version>
<licence>GPLv2</licence>
<author>Craig Roberts</author>
<require>3</require>

View File

@ -0,0 +1 @@
1.0.0

View File

@ -2,7 +2,6 @@
<info>
<id>gallery</id>
<name>Pictures</name>
<version>0.4</version>
<licence>AGPL</licence>
<author>Bartek Przybylski</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.4

View File

@ -3,7 +3,6 @@
<id>media</id>
<name>Media</name>
<description>Media player and server for ownCloud</description>
<version>0.3</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -3,7 +3,6 @@
<id>remoteStorage</id>
<name>remoteStorage compatibility</name>
<description>Enables you to use ownCloud as their remote storage for unhosted applications. This app requires the Webfinger app to be installed and enabled correctly. More info on <a href="http://unhosted.org">the website of the unhosted movement</a>.</description>
<version>0.6</version>
<licence>AGPL or MIT</licence>
<author>Michiel de Jong</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.6

View File

@ -3,7 +3,6 @@
<id>user_ldap</id>
<name>LDAP user backend</name>
<description>Authenticate Users by LDAP</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Dominik Schmidt</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_migrate</id>
<name>User Account Migration</name>
<description>Migrate your user accounts</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Tom Needham</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_openid</id>
<name>OpenID user backend</name>
<description>Allow login through OpenID</description>
<version>0.1</version>
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.1

View File

@ -3,7 +3,6 @@
<id>user_webfinger</id>
<name>Webfinger</name>
<description>Provide WebFinger for all users so they get a user address like user@owncloudinstance which can be used for external applications. Other apps can provide information for webfinger requests, such as remoteStorage compatibility.</description>
<version>0.3</version>
<licence>AGPL or MIT</licence>
<author>Michiel de Jong, Florian Hülsmann</author>
<require>2</require>

View File

@ -0,0 +1 @@
0.3

View File

@ -307,6 +307,20 @@ class OC_App{
return $list;
}
/**
* get the last version of the app, either from appinfo/version or from appinfo/info.xml
*/
public static function getAppVersion($appid){
$file=OC::$APPSROOT.'/apps/'.$appid.'/appinfo/version';
$version=@file_get_contents($file);
if($version){
return $version;
}else{
$appData=self::getAppInfo($appid);
return $appData['version'];
}
}
/**
* @brief Read app metadata from the info.xml file
@ -441,9 +455,8 @@ class OC_App{
// The rest comes here
$versions = self::getAppVersions();
foreach( $versions as $app=>$installedVersion ){
$appInfo=OC_App::getAppInfo($app);
if (isset($appInfo['version'])) {
$currentVersion=$appInfo['version'];
$currentVersion=OC_App::getAppVersion($app);
if ($currentVersion) {
if (version_compare($currentVersion, $installedVersion, '>')) {
OC_App::updateApp($app);
OC_Appconfig::setValue($app,'installed_version',$appInfo['version']);