keep version numbers in their own files for faster reading

remotes/origin/stable4
Robin Appelman 13 years ago
parent bfdbdd9b20
commit 926b2b78fe
  1. 1
      apps/admin_dependencies_chk/appinfo/info.xml
  2. 1
      apps/admin_dependencies_chk/appinfo/version
  3. 1
      apps/admin_migrate/appinfo/info.xml
  4. 1
      apps/admin_migrate/appinfo/version
  5. 1
      apps/bookmarks/appinfo/info.xml
  6. 1
      apps/bookmarks/appinfo/version
  7. 1
      apps/calendar/appinfo/info.xml
  8. 1
      apps/calendar/appinfo/version
  9. 1
      apps/contacts/appinfo/info.xml
  10. 1
      apps/contacts/appinfo/version
  11. 1
      apps/external/appinfo/info.xml
  12. 1
      apps/external/appinfo/version
  13. 1
      apps/files_archive/appinfo/info.xml
  14. 1
      apps/files_archive/appinfo/version
  15. 1
      apps/files_encryption/appinfo/info.xml
  16. 1
      apps/files_encryption/appinfo/version
  17. 1
      apps/files_external/appinfo/info.xml
  18. 1
      apps/files_external/appinfo/version
  19. 1
      apps/files_imageviewer/appinfo/info.xml
  20. 1
      apps/files_imageviewer/appinfo/version
  21. 1
      apps/files_pdfviewer/appinfo/info.xml
  22. 1
      apps/files_pdfviewer/appinfo/version
  23. 1
      apps/files_sharing/appinfo/info.xml
  24. 1
      apps/files_sharing/appinfo/version
  25. 1
      apps/files_texteditor/appinfo/info.xml
  26. 1
      apps/files_texteditor/appinfo/version
  27. 1
      apps/files_versioning/appinfo/info.xml
  28. 1
      apps/files_versioning/appinfo/version
  29. 1
      apps/gallery/appinfo/info.xml
  30. 1
      apps/gallery/appinfo/version
  31. 1
      apps/media/appinfo/info.xml
  32. 1
      apps/media/appinfo/version
  33. 1
      apps/remoteStorage/appinfo/info.xml
  34. 1
      apps/remoteStorage/appinfo/version
  35. 1
      apps/user_ldap/appinfo/info.xml
  36. 1
      apps/user_ldap/appinfo/version
  37. 1
      apps/user_migrate/appinfo/info.xml
  38. 1
      apps/user_migrate/appinfo/version
  39. 1
      apps/user_openid/appinfo/info.xml
  40. 1
      apps/user_openid/appinfo/version
  41. 1
      apps/user_webfinger/appinfo/info.xml
  42. 1
      apps/user_webfinger/appinfo/version
  43. 19
      lib/app.php

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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>

@ -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']);

Loading…
Cancel
Save