summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gallery/js/album_cover.js16
-rwxr-xr-xapps/gallery/lib/album.php26
-rw-r--r--lib/files.php4
-rw-r--r--lib/util.php3
4 files changed, 23 insertions, 26 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'];
+ }
}
-
-?>
diff --git a/lib/files.php b/lib/files.php
index 5d4d73630eb..d837bf7aa2c 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -32,11 +32,11 @@ class OC_Files {
* get the content of a directory
* @param dir $directory
*/
- public static function getDirectoryContent($directory, $mimetype_filter = ''){
+ public static function getDirectoryContent($directory, $mimetype_filter = ''){
if(strpos($directory,OC::$CONFIG_DATADIRECTORY)===0){
$directory=substr($directory,strlen(OC::$CONFIG_DATADIRECTORY));
}
- $files=OC_FileCache::getFolderContent($directory, '', $mimetype_filter);
+ $files=OC_FileCache::getFolderContent($directory, '', $mimetype_filter);
foreach($files as &$file){
$file['directory']=$directory;
$file['type']=($file['mimetype']=='httpd/unix-directory')?'dir':'file';
diff --git a/lib/util.php b/lib/util.php
index e4546d6ac3d..ff117998713 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -31,7 +31,7 @@ class OC_Util {
// Create root dir.
if(!is_dir($CONFIG_DATADIRECTORY_ROOT)){
$success=@mkdir($CONFIG_DATADIRECTORY_ROOT);
- if(!$success) {
+ if(!$success) {
$tmpl = new OC_Template( '', 'error', 'guest' );
$tmpl->assign('errors',array(1=>array('error'=>"Can't create data directory (".$CONFIG_DATADIRECTORY_ROOT.")",'hint'=>"You can usually fix this by giving the webserver write access to the ownCloud directory '".OC::$SERVERROOT."' (in a terminal, use the command 'chown -R www-data:www-data /path/to/your/owncloud/install/data' ")));
$tmpl->printPage();
@@ -50,7 +50,6 @@ class OC_Util {
self::$rootMounted=true;
}
if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem
-
OC::$CONFIG_DATADIRECTORY = $CONFIG_DATADIRECTORY_ROOT."/$user/$root";
if( !is_dir( OC::$CONFIG_DATADIRECTORY )){
mkdir( OC::$CONFIG_DATADIRECTORY, 0755, true );