diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-07 19:07:51 +0400 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-10 15:17:23 +0400 |
commit | 6682c60866a0031b031bcaeade0ed77e90698d92 (patch) | |
tree | 172cff2b121243b5494d0764ab93abd921861874 /apps | |
parent | 9c1cc15c8dee3ac2213f42fb26ee14ace9a3153a (diff) |
pictures: update script and removal some all stuff
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gallery/appinfo/update.php | 9 | ||||
-rw-r--r-- | apps/gallery/appinfo/version | 2 | ||||
-rw-r--r-- | apps/gallery/index.php | 28 |
3 files changed, 12 insertions, 27 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 e47fb3db5d6..9d4654a7cc5 100644 --- a/apps/gallery/index.php +++ b/apps/gallery/index.php @@ -27,30 +27,6 @@ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('gallery'); OCP\App::setActiveNavigationEntry( 'gallery_index' ); -if (!file_exists(OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery')) { - mkdir(OCP\Config::getSystemValue("datadirectory").'/'. OCP\USER::getUser() .'/gallery'); -} - -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(); ?> |