From: Bartek Przybylski Date: Thu, 7 Jun 2012 15:07:51 +0000 (+0200) Subject: pictures: update script and removal some all stuff X-Git-Tag: v4.5.0beta1~74^2~423^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14e1be56a0927db5344af062a06839f08f674805;p=nextcloud-server.git pictures: update script and removal some all stuff --- 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 @@ +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(); ?>