diff --git a/apps/gallery/appinfo/update.php b/apps/gallery/appinfo/update.php new file mode 100644 index 0000000000..dd248e21b3 --- /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 17b2ccd9bf..8f0916f768 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 a9fe200c4e..9d4654a7cc 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(); ?>