Whitespace fixes
This commit is contained in:
parent
e77ba0280a
commit
b022ccb863
4 changed files with 23 additions and 26 deletions
|
@ -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('');
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue