summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-06-11 11:57:36 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-06-11 11:57:36 +0200
commit6da717b644bf6ce44b2bdbd4b296fd24e2b12244 (patch)
treef3e32e1a5f38822a4e5803cd2d4ffe849884b2ad /apps
parentd294373f476c795aaee7dc2444e7edfdea01a606 (diff)
parentf2216dc9d228116ec1b9e58342cd62e075aff0a9 (diff)
downloadnextcloud-server-6da717b644bf6ce44b2bdbd4b296fd24e2b12244.tar.gz
nextcloud-server-6da717b644bf6ce44b2bdbd4b296fd24e2b12244.zip
Merge branch 'stable4' of gitorious.org:owncloud/owncloud into stable4
Backport for sanitized user data.
Diffstat (limited to 'apps')
-rw-r--r--apps/gallery/appinfo/update.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/gallery/appinfo/update.php b/apps/gallery/appinfo/update.php
index dd248e21b3e..a0997ab5e86 100644
--- a/apps/gallery/appinfo/update.php
+++ b/apps/gallery/appinfo/update.php
@@ -1,9 +1,11 @@
<?php
-$stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_photos');
-$stmt->execute();
-$stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_albums');
-$stmt->execute();
-
-\OC_DB::createDbFromStructure('./database.xml');
+$currentVersion=OC_Appconfig::getValue('gallery', 'installed_version');
+if (version_compare($currentVersion, '0.5.0', '<')) {
+ $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_photos');
+ $stmt->execute();
+ $stmt = OCP\DB::prepare('DROP TABLE IF EXISTS *PREFIX*gallery_albums');
+ $stmt->execute();
+ \OC_DB::createDbFromStructure(OC::$APPSROOT.'/apps/'.$appid.'/appinfo/database.xml');
+}