From: Robin Appelman Date: Tue, 5 Jun 2012 22:24:15 +0000 (+0200) Subject: dont show config option for file upload size if we cant write the new value X-Git-Tag: v4.5.0beta1~74^2~424^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a3c1f70be423eb4e6bc76164da9d080ffe66305c;p=nextcloud-server.git dont show config option for file upload size if we cant write the new value --- diff --git a/apps/files/admin.php b/apps/files/admin.php index b0c2b35c696..d05eb7267b7 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -51,8 +51,10 @@ $allowZipDownload = intval(OCP\Config::getSystemValue('allowZipDownload', true)) OCP\App::setActiveNavigationEntry( "files_administration" ); +$htaccessWritable=is_writable(OC::$SERVERROOT.'/.htaccess'); + $tmpl = new OCP\Template( 'files', 'admin' ); -$tmpl->assign( 'htaccessWorking', $htaccessWorking ); +$tmpl->assign( 'uploadChangable', $htaccessWorking and $htaccessWritable ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX)); $tmpl->assign( 'allowZipDownload', $allowZipDownload); diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index c89070ce52e..23021ec6647 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -3,7 +3,7 @@
t('File handling');?> - + '/>(t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)
/>