summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2012-06-07 17:07:51 +0200
committerBartek Przybylski <bart.p.pl@gmail.com>2012-06-07 17:08:04 +0200
commit14e1be56a0927db5344af062a06839f08f674805 (patch)
treea8973edef382c42be1afc14db026887da4501913 /apps
parentd2a8746c49884e6757338d2dbcf90e90dea62e35 (diff)
downloadnextcloud-server-14e1be56a0927db5344af062a06839f08f674805.tar.gz
nextcloud-server-14e1be56a0927db5344af062a06839f08f674805.zip
pictures: update script and removal some all stuff
Diffstat (limited to 'apps')
-rw-r--r--apps/gallery/appinfo/update.php9
-rw-r--r--apps/gallery/appinfo/version2
-rw-r--r--apps/gallery/index.php24
3 files changed, 12 insertions, 23 deletions
diff --git a/apps/gallery/appinfo/update.php b/apps/gallery/appinfo/update.php
new file mode 100644
index 00000000000..dd248e21b3e
--- /dev/null
+++ b/apps/gallery/appinfo/update.php
@@ -0,0 +1,9 @@
+<?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');
+
diff --git a/apps/gallery/appinfo/version b/apps/gallery/appinfo/version
index 17b2ccd9bf9..8f0916f768f 100644
--- a/apps/gallery/appinfo/version
+++ b/apps/gallery/appinfo/version
@@ -1 +1 @@
-0.4.3
+0.5.0
diff --git a/apps/gallery/index.php b/apps/gallery/index.php
index a9fe200c4e4..9d4654a7cc5 100644
--- a/apps/gallery/index.php
+++ b/apps/gallery/index.php
@@ -27,26 +27,6 @@ OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('gallery');
OCP\App::setActiveNavigationEntry( 'gallery_index' );
-if (!isset($_GET['view'])) {
- $result = OC_Gallery_Album::find(OCP\USER::getUser());
-
- $r = array();
- while ($row = $result->fetchRow())
- $r[] = $row;
-
- $tmpl = new OCP\Template( 'gallery', 'index', 'user' );
- $tmpl->assign('r', $r);
- $tmpl->printPage();
-} else {
- $result = OC_Gallery_Photo::findForAlbum(OCP\USER::getUser(), $_GET['view']);
-
- $photos = array();
- while ($p = $result->fetchRow())
- $photos[] = $p['file_path'];
-
- $tmpl = new OCP\Template( 'gallery', 'view_album', 'user' );
- $tmpl->assign('photos', $photos);
- $tmpl->assign('albumName', $_GET['view']);
- $tmpl->printPage();
-}
+$tmpl = new OCP\Template( 'gallery', 'index', 'user' );
+$tmpl->printPage();
?>