]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont show config option for file upload size if we cant write the new value
authorRobin Appelman <icewind@owncloud.com>
Tue, 5 Jun 2012 22:24:15 +0000 (00:24 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 5 Jun 2012 22:24:15 +0000 (00:24 +0200)
apps/files/admin.php
apps/files/templates/admin.php

index b0c2b35c6966ed59b70f8b605b6f4c2c63a6e53e..d05eb7267b7d5e8ee2431fc0619060296eeaff76 100644 (file)
@@ -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);
index c89070ce52ef8c11677a680429eeae9b1ecbd398..23021ec66477c7e6991c0bf8c50c7f07046a9a29 100644 (file)
@@ -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/>