mirror of
https://github.com/nextcloud/server.git
synced 2026-03-22 18:33:46 -04:00
dont show config option for file upload size if we cant write the new value
This commit is contained in:
parent
549889d3cb
commit
a3c1f70be4
2 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<form name="filesForm" action='#' method='post'>
|
||||
<fieldset class="personalblock">
|
||||
<legend><strong><?php echo $l->t('File handling');?></strong></legend>
|
||||
<?php if($_['htaccessWorking']):?>
|
||||
<?php if($_['uploadChangable']):?>
|
||||
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
|
||||
<?php endif;?>
|
||||
<input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue