Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-14 18:27:58 +0400
committerRobin Appelman <icewind@owncloud.com>2012-04-14 18:29:11 +0400
commit926b2b78fe444f5facfb21a625a6cd01123d2fb2 (patch)
treeb5899be280cba1595e6a01f8bdb54b42f98c6cb3
parentbfdbdd9b20fd8196487315eeaa040a77ef90c531 (diff)
keep version numbers in their own files for faster reading
-rw-r--r--apps/admin_dependencies_chk/appinfo/info.xml1
-rw-r--r--apps/admin_dependencies_chk/appinfo/version1
-rw-r--r--apps/admin_migrate/appinfo/info.xml1
-rw-r--r--apps/admin_migrate/appinfo/version1
-rw-r--r--apps/bookmarks/appinfo/info.xml1
-rw-r--r--apps/bookmarks/appinfo/version1
-rw-r--r--apps/calendar/appinfo/info.xml1
-rw-r--r--apps/calendar/appinfo/version1
-rw-r--r--apps/contacts/appinfo/info.xml1
-rw-r--r--apps/contacts/appinfo/version1
-rw-r--r--apps/external/appinfo/info.xml1
-rw-r--r--apps/external/appinfo/version1
-rw-r--r--apps/files_archive/appinfo/info.xml1
-rw-r--r--apps/files_archive/appinfo/version1
-rw-r--r--apps/files_encryption/appinfo/info.xml1
-rw-r--r--apps/files_encryption/appinfo/version1
-rw-r--r--apps/files_external/appinfo/info.xml1
-rw-r--r--apps/files_external/appinfo/version1
-rw-r--r--apps/files_imageviewer/appinfo/info.xml1
-rw-r--r--apps/files_imageviewer/appinfo/version1
-rwxr-xr-xapps/files_pdfviewer/appinfo/info.xml1
-rw-r--r--apps/files_pdfviewer/appinfo/version1
-rw-r--r--apps/files_sharing/appinfo/info.xml1
-rw-r--r--apps/files_sharing/appinfo/version1
-rw-r--r--apps/files_texteditor/appinfo/info.xml1
-rw-r--r--apps/files_texteditor/appinfo/version1
-rw-r--r--apps/files_versioning/appinfo/info.xml1
-rw-r--r--apps/files_versioning/appinfo/version1
-rw-r--r--apps/gallery/appinfo/info.xml1
-rw-r--r--apps/gallery/appinfo/version1
-rw-r--r--apps/media/appinfo/info.xml1
-rw-r--r--apps/media/appinfo/version1
-rw-r--r--apps/remoteStorage/appinfo/info.xml1
-rw-r--r--apps/remoteStorage/appinfo/version1
-rw-r--r--apps/user_ldap/appinfo/info.xml1
-rw-r--r--apps/user_ldap/appinfo/version1
-rw-r--r--apps/user_migrate/appinfo/info.xml1
-rw-r--r--apps/user_migrate/appinfo/version1
-rw-r--r--apps/user_openid/appinfo/info.xml1
-rw-r--r--apps/user_openid/appinfo/version1
-rw-r--r--apps/user_webfinger/appinfo/info.xml1
-rw-r--r--apps/user_webfinger/appinfo/version1
-rwxr-xr-xlib/app.php19
43 files changed, 37 insertions, 24 deletions
diff --git a/apps/admin_dependencies_chk/appinfo/info.xml b/apps/admin_dependencies_chk/appinfo/info.xml
index a9c1c68c5d4..d5f8bd3783d 100644
--- a/apps/admin_dependencies_chk/appinfo/info.xml
+++ b/apps/admin_dependencies_chk/appinfo/info.xml
@@ -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>
diff --git a/apps/admin_dependencies_chk/appinfo/version b/apps/admin_dependencies_chk/appinfo/version
new file mode 100644
index 00000000000..d1c6331b310
--- /dev/null
+++ b/apps/admin_dependencies_chk/appinfo/version
@@ -0,0 +1 @@
+0.01 \ No newline at end of file
diff --git a/apps/admin_migrate/appinfo/info.xml b/apps/admin_migrate/appinfo/info.xml
index 67fc3f9c5a0..51721579002 100644
--- a/apps/admin_migrate/appinfo/info.xml
+++ b/apps/admin_migrate/appinfo/info.xml
@@ -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>
diff --git a/apps/admin_migrate/appinfo/version b/apps/admin_migrate/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/admin_migrate/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/bookmarks/appinfo/info.xml b/apps/bookmarks/appinfo/info.xml
index 862ab805a60..39779483d85 100644
--- a/apps/bookmarks/appinfo/info.xml
+++ b/apps/bookmarks/appinfo/info.xml
@@ -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>
diff --git a/apps/bookmarks/appinfo/version b/apps/bookmarks/appinfo/version
new file mode 100644
index 00000000000..2f4536184bc
--- /dev/null
+++ b/apps/bookmarks/appinfo/version
@@ -0,0 +1 @@
+0.2 \ No newline at end of file
diff --git a/apps/calendar/appinfo/info.xml b/apps/calendar/appinfo/info.xml
index 4ac3c5bf099..101840aa1fa 100644
--- a/apps/calendar/appinfo/info.xml
+++ b/apps/calendar/appinfo/info.xml
@@ -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>
diff --git a/apps/calendar/appinfo/version b/apps/calendar/appinfo/version
new file mode 100644
index 00000000000..7dff5b89211
--- /dev/null
+++ b/apps/calendar/appinfo/version
@@ -0,0 +1 @@
+0.2.1 \ No newline at end of file
diff --git a/apps/contacts/appinfo/info.xml b/apps/contacts/appinfo/info.xml
index 0e2b1336006..55ddf42ccc1 100644
--- a/apps/contacts/appinfo/info.xml
+++ b/apps/contacts/appinfo/info.xml
@@ -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>
diff --git a/apps/contacts/appinfo/version b/apps/contacts/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/contacts/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/external/appinfo/info.xml b/apps/external/appinfo/info.xml
index 05f5709916d..83130f17e62 100644
--- a/apps/external/appinfo/info.xml
+++ b/apps/external/appinfo/info.xml
@@ -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>
diff --git a/apps/external/appinfo/version b/apps/external/appinfo/version
new file mode 100644
index 00000000000..9f8e9b69a33
--- /dev/null
+++ b/apps/external/appinfo/version
@@ -0,0 +1 @@
+1.0 \ No newline at end of file
diff --git a/apps/files_archive/appinfo/info.xml b/apps/files_archive/appinfo/info.xml
index 236b5a64b05..b04498aa089 100644
--- a/apps/files_archive/appinfo/info.xml
+++ b/apps/files_archive/appinfo/info.xml
@@ -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>
diff --git a/apps/files_archive/appinfo/version b/apps/files_archive/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/files_archive/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml
index 691b265bf60..c2e1aa96043 100644
--- a/apps/files_encryption/appinfo/info.xml
+++ b/apps/files_encryption/appinfo/info.xml
@@ -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>
diff --git a/apps/files_encryption/appinfo/version b/apps/files_encryption/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/files_encryption/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml
index fb58297ff17..1918925389d 100644
--- a/apps/files_external/appinfo/info.xml
+++ b/apps/files_external/appinfo/info.xml
@@ -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>
diff --git a/apps/files_external/appinfo/version b/apps/files_external/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/files_external/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/files_imageviewer/appinfo/info.xml b/apps/files_imageviewer/appinfo/info.xml
index 00b55c254dd..dbc78ffba0f 100644
--- a/apps/files_imageviewer/appinfo/info.xml
+++ b/apps/files_imageviewer/appinfo/info.xml
@@ -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>
diff --git a/apps/files_imageviewer/appinfo/version b/apps/files_imageviewer/appinfo/version
new file mode 100644
index 00000000000..9f8e9b69a33
--- /dev/null
+++ b/apps/files_imageviewer/appinfo/version
@@ -0,0 +1 @@
+1.0 \ No newline at end of file
diff --git a/apps/files_pdfviewer/appinfo/info.xml b/apps/files_pdfviewer/appinfo/info.xml
index f133f1900d7..0e81729a8bc 100755
--- a/apps/files_pdfviewer/appinfo/info.xml
+++ b/apps/files_pdfviewer/appinfo/info.xml
@@ -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>
diff --git a/apps/files_pdfviewer/appinfo/version b/apps/files_pdfviewer/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/files_pdfviewer/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml
index 8fda775520b..490ffaca890 100644
--- a/apps/files_sharing/appinfo/info.xml
+++ b/apps/files_sharing/appinfo/info.xml
@@ -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>
diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/files_sharing/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/files_texteditor/appinfo/info.xml b/apps/files_texteditor/appinfo/info.xml
index da1cdba15dd..83c057f38fd 100644
--- a/apps/files_texteditor/appinfo/info.xml
+++ b/apps/files_texteditor/appinfo/info.xml
@@ -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>
diff --git a/apps/files_texteditor/appinfo/version b/apps/files_texteditor/appinfo/version
new file mode 100644
index 00000000000..1d71ef97443
--- /dev/null
+++ b/apps/files_texteditor/appinfo/version
@@ -0,0 +1 @@
+0.3 \ No newline at end of file
diff --git a/apps/files_versioning/appinfo/info.xml b/apps/files_versioning/appinfo/info.xml
index 4c67894f9f9..b9f56f674a0 100644
--- a/apps/files_versioning/appinfo/info.xml
+++ b/apps/files_versioning/appinfo/info.xml
@@ -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>
diff --git a/apps/files_versioning/appinfo/version b/apps/files_versioning/appinfo/version
new file mode 100644
index 00000000000..afaf360d37f
--- /dev/null
+++ b/apps/files_versioning/appinfo/version
@@ -0,0 +1 @@
+1.0.0 \ No newline at end of file
diff --git a/apps/gallery/appinfo/info.xml b/apps/gallery/appinfo/info.xml
index 4c8c1cee242..7dc85374b0b 100644
--- a/apps/gallery/appinfo/info.xml
+++ b/apps/gallery/appinfo/info.xml
@@ -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>
diff --git a/apps/gallery/appinfo/version b/apps/gallery/appinfo/version
new file mode 100644
index 00000000000..e6adf3fc7bb
--- /dev/null
+++ b/apps/gallery/appinfo/version
@@ -0,0 +1 @@
+0.4 \ No newline at end of file
diff --git a/apps/media/appinfo/info.xml b/apps/media/appinfo/info.xml
index 4a642bf889d..01145d4a944 100644
--- a/apps/media/appinfo/info.xml
+++ b/apps/media/appinfo/info.xml
@@ -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>
diff --git a/apps/media/appinfo/version b/apps/media/appinfo/version
new file mode 100644
index 00000000000..1d71ef97443
--- /dev/null
+++ b/apps/media/appinfo/version
@@ -0,0 +1 @@
+0.3 \ No newline at end of file
diff --git a/apps/remoteStorage/appinfo/info.xml b/apps/remoteStorage/appinfo/info.xml
index 1f9618a3334..1875e70a300 100644
--- a/apps/remoteStorage/appinfo/info.xml
+++ b/apps/remoteStorage/appinfo/info.xml
@@ -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>
diff --git a/apps/remoteStorage/appinfo/version b/apps/remoteStorage/appinfo/version
new file mode 100644
index 00000000000..490f510fc27
--- /dev/null
+++ b/apps/remoteStorage/appinfo/version
@@ -0,0 +1 @@
+0.6 \ No newline at end of file
diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml
index 99830dd1ffd..fe7e61fb5c3 100644
--- a/apps/user_ldap/appinfo/info.xml
+++ b/apps/user_ldap/appinfo/info.xml
@@ -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>
diff --git a/apps/user_ldap/appinfo/version b/apps/user_ldap/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/user_ldap/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/user_migrate/appinfo/info.xml b/apps/user_migrate/appinfo/info.xml
index 6abcb4af92c..4c3646f770c 100644
--- a/apps/user_migrate/appinfo/info.xml
+++ b/apps/user_migrate/appinfo/info.xml
@@ -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>
diff --git a/apps/user_migrate/appinfo/version b/apps/user_migrate/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/user_migrate/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/user_openid/appinfo/info.xml b/apps/user_openid/appinfo/info.xml
index 721db1877e3..6214229c0a1 100644
--- a/apps/user_openid/appinfo/info.xml
+++ b/apps/user_openid/appinfo/info.xml
@@ -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>
diff --git a/apps/user_openid/appinfo/version b/apps/user_openid/appinfo/version
new file mode 100644
index 00000000000..ceab6e11ece
--- /dev/null
+++ b/apps/user_openid/appinfo/version
@@ -0,0 +1 @@
+0.1 \ No newline at end of file
diff --git a/apps/user_webfinger/appinfo/info.xml b/apps/user_webfinger/appinfo/info.xml
index d47fb723a3a..fe1d4371863 100644
--- a/apps/user_webfinger/appinfo/info.xml
+++ b/apps/user_webfinger/appinfo/info.xml
@@ -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>
diff --git a/apps/user_webfinger/appinfo/version b/apps/user_webfinger/appinfo/version
new file mode 100644
index 00000000000..1d71ef97443
--- /dev/null
+++ b/apps/user_webfinger/appinfo/version
@@ -0,0 +1 @@
+0.3 \ No newline at end of file
diff --git a/lib/app.php b/lib/app.php
index 807d8955d8f..b499e1a8ef2 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -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']);