make Files settings work

This commit is contained in:
Arthur Schiwon 2012-03-16 16:00:12 +01:00
parent 0fadbee699
commit cfc41942e4
3 changed files with 10 additions and 6 deletions

View File

@ -25,7 +25,7 @@
// Init owncloud
require_once('../lib/base.php');
OC_User::checkAdminUser();
OC_Util::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
if(isset($_POST['maxUploadSize'])){
@ -38,10 +38,10 @@ if(isset($_POST['maxUploadSize'])){
}
OC_App::setActiveNavigationEntry( "files_administration" );
// return template
$tmpl = new OC_Template( "files", "admin", "user" );
$tmpl = new OC_Template( 'files', 'admin' );
$tmpl->assign( 'htaccessWorking', $htaccessWorking );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
$tmpl->printPage();
return $tmpl->fetchPage();
?>

View File

@ -1,10 +1,13 @@
<?php OC_Util::addScript('files','admin'); ?>
<form name="filesForm" action='#' method='post'>
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('File handling');?></strong></legend>
<?php if($_['htaccessWorking']):?>
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/><br/>
<input type='submit' value='Save'/>
<?php else:?>
No settings currently available.
<?php endif;?>
</fieldset>
</form>

View File

@ -325,6 +325,7 @@ class OC_App{
$source=self::$settingsForms;
break;
case 'admin':
$forms[] = include 'files/admin.php'; //hardcode own apps
$source=self::$adminForms;
break;
case 'personal':
@ -371,7 +372,7 @@ class OC_App{
}
return $apps;
}
/**
* check if any apps need updating and update those
*/
@ -390,7 +391,7 @@ class OC_App{
}
}
}
/**
* update the database for the app and call the update script
* @param string appid