diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/admin.php | 11 | ||||
-rw-r--r-- | files/ajax/autocomplete.php | 8 | ||||
-rw-r--r-- | files/ajax/delete.php | 4 | ||||
-rw-r--r-- | files/ajax/download.php | 6 | ||||
-rw-r--r-- | files/ajax/list.php | 11 | ||||
-rw-r--r-- | files/ajax/move.php | 4 | ||||
-rw-r--r-- | files/ajax/newfolder.php | 4 | ||||
-rw-r--r-- | files/ajax/rename.php | 4 | ||||
-rw-r--r-- | files/ajax/upload.php | 6 | ||||
-rw-r--r-- | files/appinfo/app.php | 8 | ||||
-rw-r--r-- | files/css/files.css | 9 | ||||
-rw-r--r-- | files/download.php | 15 | ||||
-rw-r--r-- | files/index.php | 31 | ||||
-rw-r--r-- | files/js/filelist.js | 10 | ||||
-rw-r--r-- | files/js/files.js | 10 | ||||
-rw-r--r-- | files/settings.php | 13 | ||||
-rw-r--r-- | files/templates/admin.php | 2 | ||||
-rw-r--r-- | files/templates/part.list.php | 8 | ||||
-rw-r--r-- | files/webdav.php | 5 |
19 files changed, 86 insertions, 83 deletions
diff --git a/files/admin.php b/files/admin.php index 5c9923aff86..0b8639f38ca 100644 --- a/files/admin.php +++ b/files/admin.php @@ -24,26 +24,25 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( OC_USER::getUser(), 'admin' )){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } $htaccessWorking=(getenv('htaccessWorking')=='true'); if(isset($_POST['maxUploadSize'])){ $maxUploadFilesize=$_POST['maxUploadSize']; - OC_FILES::setUploadLimit(OC_HELPER::computerFileSize($maxUploadFilesize)); + OC_Files::setUploadLimit(OC_Helper::computerFileSize($maxUploadFilesize)); }else{ $maxUploadFilesize = ini_get('upload_max_filesize').'B'; } -OC_APP::setActiveNavigationEntry( "files_administration" ); +OC_App::setActiveNavigationEntry( "files_administration" ); // return template -$tmpl = new OC_TEMPLATE( "files", "admin", "admin" ); +$tmpl = new OC_Template( "files", "admin", "admin" ); $tmpl->assign( 'htaccessWorking', $htaccessWorking ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->printPage(); diff --git a/files/ajax/autocomplete.php b/files/ajax/autocomplete.php index 2c2f665fd6c..183ee86c788 100644 --- a/files/ajax/autocomplete.php +++ b/files/ajax/autocomplete.php @@ -9,7 +9,7 @@ require_once('../../lib/base.php'); // header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -40,8 +40,8 @@ $query=strtolower($query); $files=array(); -if(OC_FILESYSTEM::file_exists($base) and OC_FILESYSTEM::is_dir($base)){ - $dh = OC_FILESYSTEM::opendir($base); +if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)){ + $dh = OC_Filesystem::opendir($base); if($dh){ if(substr($base,-1,1)!='/'){ $base=$base.'/'; @@ -50,7 +50,7 @@ if(OC_FILESYSTEM::file_exists($base) and OC_FILESYSTEM::is_dir($base)){ if ($file != "." && $file != ".."){ if(substr(strtolower($file),0,$queryLen)==$query){ $item=$base.$file; - if((!$dirOnly or OC_FILESYSTEM::is_dir($item))){ + if((!$dirOnly or OC_Filesystem::is_dir($item))){ $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); } } diff --git a/files/ajax/delete.php b/files/ajax/delete.php index 79caf4d0bb2..782db215dfc 100644 --- a/files/ajax/delete.php +++ b/files/ajax/delete.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -21,7 +21,7 @@ $filesWithError = ''; $status = 'success'; //Now delete foreach($files as $file) { - if( !OC_FILES::delete( $dir, $file )){ + if( !OC_Files::delete( $dir, $file )){ $filesWithError .= $file . "\n"; $status = 'error'; } diff --git a/files/ajax/download.php b/files/ajax/download.php index 0b2f894a11b..2bbf1df4eca 100644 --- a/files/ajax/download.php +++ b/files/ajax/download.php @@ -25,13 +25,13 @@ require_once('../../lib/base.php'); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } $files = $_GET["files"]; $dir = $_GET["dir"]; -OC_FILES::get($dir,$files); +OC_Files::get($dir,$files); ?> diff --git a/files/ajax/list.php b/files/ajax/list.php index ef43e72fcae..547bc91fb05 100644 --- a/files/ajax/list.php +++ b/files/ajax/list.php @@ -2,13 +2,12 @@ // Init owncloud require_once('../../lib/base.php'); -require_once('../../lib/template.php'); // We send json data header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -29,7 +28,7 @@ if($doBreadcrumb){ } } - $breadcrumbNav = new OC_TEMPLATE( "files", "part.breadcrumb", "" ); + $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); $data['breadcrumb'] = $breadcrumbNav->fetchPage(); @@ -37,12 +36,12 @@ if($doBreadcrumb){ // make filelist $files = array(); -foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ - $i["date"] = OC_UTIL::formatDate($i["mtime"] ); +foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ + $i["date"] = OC_Util::formatDate($i["mtime"] ); $files[] = $i; } -$list = new OC_TEMPLATE( "files", "part.list", "" ); +$list = new OC_Template( "files", "part.list", "" ); $list->assign( "files", $files ); $data = array('files' => $list->fetchPage()); diff --git a/files/ajax/move.php b/files/ajax/move.php index b1ba641c5b1..4224cbce6d0 100644 --- a/files/ajax/move.php +++ b/files/ajax/move.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -18,7 +18,7 @@ $file = $_GET["file"]; $target = $_GET["target"]; -if(OC_FILES::move($dir,$file,$target,$file)){ +if(OC_Files::move($dir,$file,$target,$file)){ echo json_encode( array( "status" => 'success', "data" => array( "dir" => $dir, "files" => $file ))); }else{ echo json_encode( array( "status" => 'error', "data" => array( "message" => "Could move $file" ))); diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php index 988e7f04012..610418583bd 100644 --- a/files/ajax/newfolder.php +++ b/files/ajax/newfolder.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -21,7 +21,7 @@ if($foldername == '') { exit(); } error_log('try to create ' . $foldername . ' in ' . $dir); -if(OC_FILES::newFile($dir, $foldername, 'dir')) { +if(OC_Files::newFile($dir, $foldername, 'dir')) { echo json_encode( array( "status" => "success", "data" => array())); exit(); } diff --git a/files/ajax/rename.php b/files/ajax/rename.php index 7554aa0dd62..516077f6fda 100644 --- a/files/ajax/rename.php +++ b/files/ajax/rename.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -18,7 +18,7 @@ $file = $_GET["file"]; $newname = $_GET["newname"]; // Delete -if( OC_FILES::move( $dir, $file, $dir, $newname )) { +if( OC_Files::move( $dir, $file, $dir, $newname )) { echo json_encode( array( "status" => "success", "data" => array( "dir" => $dir, "file" => $file, "newname" => $newname ))); } else{ diff --git a/files/ajax/upload.php b/files/ajax/upload.php index f47f9b3d282..5dcd2f2b6af 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -9,7 +9,7 @@ require_once('../../lib/base.php'); header( "Content-Type: text/plain" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -24,8 +24,8 @@ if(strpos($dir,'..') === false){ $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++){ $target='/' . stripslashes($dir) . $files['name'][$i]; - if(OC_FILESYSTEM::fromUploadedFile($files['tmp_name'][$i],$target)){ - $result[]=array( "status" => "success", 'mime'=>OC_FILESYSTEM::getMimeType($target),'size'=>OC_FILESYSTEM::filesize($target),'name'=>$files['name'][$i]); + if(OC_Filesystem::fromUploadedFile($files['tmp_name'][$i],$target)){ + $result[]=array( "status" => "success", 'mime'=>OC_Filesystem::getMimeType($target),'size'=>OC_Filesystem::filesize($target),'name'=>$files['name'][$i]); } } echo json_encode($result); diff --git a/files/appinfo/app.php b/files/appinfo/app.php index 06ca16e82d4..0f95b19f592 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -1,12 +1,12 @@ <?php -OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" )); +OC_App::register( array( "order" => 2, "id" => "files", "name" => "Files" )); -OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "home.png" ), "name" => "Files" )); -OC_APP::addAdminPage( array( "id" => "files_administration", "order" => 3, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" ))); +OC_App::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_Helper::linkTo( "files", "index.php" ), "icon" => OC_Helper::imagePath( "files", "home.png" ), "name" => "Files" )); +OC_App::addAdminPage( array( "id" => "files_administration", "order" => 3, "href" => OC_Helper::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_Helper::imagePath( "files", "folder.png" ))); // To add navigation sub entries use -// OC_APP::addNavigationSubEntry( "files_index", array( ... )); +// OC_App::addNavigationSubEntry( "files_index", array( ... )); ?> diff --git a/files/css/files.css b/files/css/files.css index 50b61a488d1..4aaca82f124 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -6,6 +6,7 @@ #fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } .file_upload_filename, #file_newfolder_name { background-repeat:no-repeat; background-position:0.5em 0; padding-left:2em; } .file_upload_filename { background-image:url("../img/file.png"); font-weight:bold; }.file_upload_start { opacity:0;filter:alpha(opacity = 0); } +input.highlight{ background-color:#ffc100; border:#dda600 1px solid; } #file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:11em; } .file_upload_start, .file_upload_filename { position:absolute; top:0px; left:0px; width:11em; font-size:0.9em; } @@ -16,13 +17,15 @@ /* FILE TABLE */ span#emptyfolder { position:absolute; margin:10em 0 0 10em; font-size:1.5em; font-weight:bold; color:#888; text-shadow:#fff 0 1px 0; } table { position:relative; top:37px; width:100%; } -tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; } +tbody tr:hover, tbody tr:active, tbody tr.selected { background-color:#eee; height:1em; } tbody a { color:#000; } span.extention, td.date { color:#999; } -div.crumb { float:left; display:block; background:no-repeat right 0; font-weight:bold; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ } +div.crumb { float:left; display:block; background:no-repeat right 0; padding:8px 1.5em 0 1em; height:28px; /*36-8*/ } +div.crumb:last-child { font-weight:bold; } table tr.mouseOver td { background-color:#eee; } -table th { padding:.5em; height:2em; } +table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } +table th.multiselect { background:#ddd; color:#000; font-weight:bold; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } table td { border-bottom:1px solid #eee; font-style:normal; } table th#headerSize, table td.filesize { width:5em; padding:0 1em; text-align:right; } diff --git a/files/download.php b/files/download.php index f7fbcd0f857..cc52b930f72 100644 --- a/files/download.php +++ b/files/download.php @@ -23,33 +23,32 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } $filename = $_GET["file"]; -if(!OC_FILESYSTEM::file_exists($filename)){ +if(!OC_Filesystem::file_exists($filename)){ header("HTTP/1.0 404 Not Found"); - $tmpl = new OC_TEMPLATE( '', '404', 'guest' ); + $tmpl = new OC_Template( '', '404', 'guest' ); $tmpl->assign('file',$filename); $tmpl->printPage(); exit; } -$ftype=OC_FILESYSTEM::getMimeType( $filename ); +$ftype=OC_Filesystem::getMimeType( $filename ); header('Content-Type:'.$ftype); header('Content-Disposition: attachment; filename="'.basename($filename).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); -header('Content-Length: '.OC_FILESYSTEM::filesize($filename)); +header('Content-Length: '.OC_Filesystem::filesize($filename)); ob_end_clean(); -OC_FILESYSTEM::readfile( $filename ); +OC_Filesystem::readfile( $filename ); ?> diff --git a/files/index.php b/files/index.php index 550f23541a0..821879b0346 100644 --- a/files/index.php +++ b/files/index.php @@ -24,29 +24,28 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( '', 'index.php' )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( '', 'index.php' )); exit(); } // Load the files we need -OC_UTIL::addStyle( "files", "files" ); -OC_UTIL::addScript( "files", "files" ); -OC_UTIL::addScript( 'files', 'filelist' ); -OC_UTIL::addScript( 'files', 'fileactions' ); +OC_Util::addStyle( "files", "files" ); +OC_Util::addScript( "files", "files" ); +OC_Util::addScript( 'files', 'filelist' ); +OC_Util::addScript( 'files', 'fileactions' ); if(!isset($_SESSION['timezone'])){ - OC_UTIL::addScript( 'files', 'timezone' ); + OC_Util::addScript( 'files', 'timezone' ); } -OC_APP::setActiveNavigationEntry( "files_index" ); +OC_App::setActiveNavigationEntry( "files_index" ); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $files = array(); -foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ - $i["date"] = OC_UTIL::formatDate($i["mtime"] ); +foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ + $i["date"] = OC_Util::formatDate($i["mtime"] ); if($i['type']=='file'){ $i['extention']=substr($i['name'],strrpos($i['name'],'.')); $i['basename']=substr($i['name'],0,strrpos($i['name'],'.')); @@ -68,19 +67,19 @@ foreach( explode( "/", $dir ) as $i ){ } // make breadcrumb und filelist markup -$list = new OC_TEMPLATE( "files", "part.list", "" ); +$list = new OC_Template( "files", "part.list", "" ); $list->assign( "files", $files ); -$breadcrumbNav = new OC_TEMPLATE( "files", "part.breadcrumb", "" ); +$breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); -$maxUploadFilesize = OC_HELPER::computerFileSize(ini_get('upload_max_filesize')); +$maxUploadFilesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize')); -$tmpl = new OC_TEMPLATE( "files", "index", "user" ); +$tmpl = new OC_Template( "files", "index", "user" ); $tmpl->assign( "fileList", $list->fetchPage() ); $tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() ); $tmpl->assign( 'dir', $dir); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); -$tmpl->assign( 'uploadMaxHumanFilesize', OC_HELPER::humanFileSize($maxUploadFilesize)); +$tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize)); $tmpl->printPage(); ?> diff --git a/files/js/filelist.js b/files/js/filelist.js index c3a2522fb6a..3f9b3984465 100644 --- a/files/js/filelist.js +++ b/files/js/filelist.js @@ -23,9 +23,9 @@ FileList={ }else{ simpleSize='Pending'; } - sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2)); + sizeColor = Math.round(200-size/(1024*1024)*2); lastModifiedTime=Math.round(lastModified.getTime() / 1000); - modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5); + modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*14); html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>'; html+='<td class="date" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</td>'; html+='</tr>'; @@ -66,6 +66,10 @@ FileList={ remove:function(name){ $('tr[data-file="'+name+'"] td.filename').draggable('destroy'); $('tr[data-file="'+name+'"]').remove(); + if($('tr[data-file]').length==0){ + $('#emptyfolder').show(); + $('.file_upload_filename').addClass('highlight'); + } }, insertElement:function(name,type,element){ //find the correct spot to insert the file or folder @@ -93,6 +97,8 @@ FileList={ }else{ $('#fileList').append(element); } + $('#emptyfolder').hide(); + $('.file_upload_filename').removeClass('highlight'); }, loadingDone:function(name){ $('tr[data-file="'+name+'"]').data('loading',false); diff --git a/files/js/files.js b/files/js/files.js index be7e48aeeeb..3d3d8ca49fd 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -1,4 +1,8 @@ $(document).ready(function() { + if($('tr[data-file]').length==0){ + $('.file_upload_filename').addClass('highlight'); + } + $('#file_action_panel').attr('activeAction', false); //drag/drop of files @@ -338,7 +342,7 @@ function procesSelection(){ $('#headerName>span.name').text('Name'); $('#headerSize').text('Size MB'); $('#modified').text('Modified'); - $('th').css({background:'#fff',fontWeight:'normal'}); + $('th').removeClass('multiselect'); $('.selectedActions').hide(); }else{ $('.selectedActions').show(); @@ -372,7 +376,7 @@ function procesSelection(){ } $('#headerName>span.name').text(selection); $('#modified').text(''); - $('th').css({background:'#ddd', fontWeight:'bold'}); + $('th').addClass('multiselect'); } } @@ -433,4 +437,4 @@ function getMimeIcon(mime){ mime='file'; } return OC.imagePath('core','mimetypes/'+mime+'.png'); -}
\ No newline at end of file +} diff --git a/files/settings.php b/files/settings.php index 23aed4d1b86..1f2e9d9868c 100644 --- a/files/settings.php +++ b/files/settings.php @@ -24,23 +24,22 @@ // Init owncloud require_once('../lib/base.php'); -require( 'template.php' ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } // Load the files we need -OC_UTIL::addStyle( "files", "files" ); -OC_UTIL::addScript( "files", "files" ); +OC_Util::addStyle( "files", "files" ); +OC_Util::addScript( "files", "files" ); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $files = array(); -foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ $i["date"] = date( $CONFIG_DATEFORMAT, $i["mtime"] ); $files[] = $i; } @@ -56,7 +55,7 @@ foreach( explode( "/", $dir ) as $i ){ } // return template -$tmpl = new OC_TEMPLATE( "files", "index", "user" ); +$tmpl = new OC_Template( "files", "index", "user" ); $tmpl->assign( 'files', $files ); $tmpl->assign( "breadcrumb", $breadcrumb ); $tmpl->printPage(); diff --git a/files/templates/admin.php b/files/templates/admin.php index 40880d34911..e0cf2608301 100644 --- a/files/templates/admin.php +++ b/files/templates/admin.php @@ -1,4 +1,4 @@ -<?php OC_UTIL::addScript('files','admin'); ?> +<?php OC_Util::addScript('files','admin'); ?> <form name="filesForm" action='#' method='post'> <?php if($_['htaccessWorking']):?> diff --git a/files/templates/part.list.php b/files/templates/part.list.php index d249455c55c..93ed70990b7 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,10 +1,10 @@ - <?php if(!$_['files']) echo '<span id="emptyfolder">Nothing in here. Upload something!</span><style>.file_upload_filename { background-color:#ffc100; border:#dda600 1px solid; }</style>'; - foreach($_['files'] as $file): + <span id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>>Nothing in here. Upload something!</span> + <?php foreach($_['files'] as $file): $simple_file_size = simple_file_size($file['size']); - $simple_size_color = 200-intval($file['size']/(1024*1024)*5); + $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 if($simple_size_color<0) $simple_size_color = 0; $relative_modified_date = relative_modified_date($file['mtime']); - $relative_date_color = round((time()-$file['mtime'])/60/60/24*7); //days ago + $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14 if($relative_date_color>200) $relative_date_color = 200; ?> <tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'> <td class="filename"> diff --git a/files/webdav.php b/files/webdav.php index 7dce0b48197..a59dee70c2e 100644 --- a/files/webdav.php +++ b/files/webdav.php @@ -28,11 +28,6 @@ $RUNTIME_NOSETUPFS = true; require_once('../lib/base.php'); require_once('Sabre/autoload.php'); -require_once('Connector/Sabre/auth.php'); -require_once('Connector/Sabre/node.php'); -require_once('Connector/Sabre/file.php'); -require_once('Connector/Sabre/directory.php'); -require_once('Connector/Sabre/locks.php'); // Create ownCloud Dir $publicDir = new OC_Connector_Sabre_Directory(''); |