diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-09 17:40:59 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-10 09:14:26 +0200 |
commit | b022ccb86371e774b63a8000f7ea2207c2da225e (patch) | |
tree | ebef3e2b3fa0b1abe3c807b3c659ca7c3174dc69 /apps/gallery | |
parent | e77ba0280a0ebceef348750f5ff9738012e2b8fb (diff) | |
download | nextcloud-server-b022ccb86371e774b63a8000f7ea2207c2da225e.tar.gz nextcloud-server-b022ccb86371e774b63a8000f7ea2207c2da225e.zip |
Whitespace fixes
Diffstat (limited to 'apps/gallery')
-rw-r--r-- | apps/gallery/js/album_cover.js | 16 | ||||
-rwxr-xr-x | apps/gallery/lib/album.php | 26 |
2 files changed, 20 insertions, 22 deletions
diff --git a/apps/gallery/js/album_cover.js b/apps/gallery/js/album_cover.js index d1809462f2f..905034f6fd1 100644 --- a/apps/gallery/js/album_cover.js +++ b/apps/gallery/js/album_cover.js @@ -78,14 +78,14 @@ function albumClickHandler(r) { for (var i in r.photos) { Albums.photos.push(r.photos[i]); } - Albums.shared = r.shared; - if (Albums.shared) { - Albums.recursive = r.recursive; - Albums.token = r.token; - } else { - Albums.recursive = false; - Albums.token = ''; - } + Albums.shared = r.shared; + if (Albums.shared) { + Albums.recursive = r.recursive; + Albums.token = r.token; + } else { + Albums.recursive = false; + Albums.token = ''; + } $(document).ready(function(){ var targetDiv = $('#gallery_list'); targetDiv.html(''); diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php index 27d40cdb91f..ac6cacbe01f 100755 --- a/apps/gallery/lib/album.php +++ b/apps/gallery/lib/album.php @@ -79,7 +79,7 @@ class OC_Gallery_Album { $sql .= ' AND parent_path = ?'; $args[] = $parent; } - $order = OCP\Config::getUserValue($owner, 'gallery', 'order', 'ASC'); + $order = OCP\Config::getUserValue($owner, 'gallery', 'order', 'ASC'); $sql .= ' ORDER BY album_name ' . $order; $stmt = OCP\DB::prepare($sql); @@ -98,19 +98,17 @@ class OC_Gallery_Album { } public static function getAlbumSize($id){ - $sql = 'SELECT COUNT(*) as size FROM *PREFIX*gallery_photos WHERE album_id = ?'; - $stmt = OCP\DB::prepare($sql); - $result=$stmt->execute(array($id))->fetchRow(); - return $result['size']; + $sql = 'SELECT COUNT(*) as size FROM *PREFIX*gallery_photos WHERE album_id = ?'; + $stmt = OCP\DB::prepare($sql); + $result=$stmt->execute(array($id))->fetchRow(); + return $result['size']; } - public static function getIntermediateGallerySize($path) { - $path .= '%'; - $sql = 'SELECT COUNT(*) as size FROM *PREFIX*gallery_photos photos, *PREFIX*gallery_albums albums WHERE photos.album_id = albums.album_id AND uid_owner = ? AND file_path LIKE ?'; - $stmt = OCP\DB::prepare($sql); - $result = $stmt->execute(array(OCP\USER::getUser(), $path))->fetchRow(); - return $result['size']; - } + public static function getIntermediateGallerySize($path) { + $path .= '%'; + $sql = 'SELECT COUNT(*) as size FROM *PREFIX*gallery_photos photos, *PREFIX*gallery_albums albums WHERE photos.album_id = albums.album_id AND uid_owner = ? AND file_path LIKE ?'; + $stmt = OCP\DB::prepare($sql); + $result = $stmt->execute(array(OCP\USER::getUser(), $path))->fetchRow(); + return $result['size']; + } } - -?> |