Skip to content
Snippets Groups Projects
Commit 1ce2cd73 authored by Jakob Sack's avatar Jakob Sack
Browse files

Add first version of backgroundjobs settings

parent 889f0a1c
Branches
No related tags found
No related merge requests found
<?php
/**
* ownCloud
*
* @author Jakob Sack
* @copyright 2012 Jakob Sack owncloud@jakobsack.de
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_Util::checkAdminUser();
OCP\JSON::callCheck();
OC_Appconfig::setValue( 'core', 'backgroundjob_mode', $_POST['mode'] );
echo 'true';
......@@ -3,5 +3,11 @@ $(document).ready(function(){
$.post(OC.filePath('settings','ajax','setloglevel.php'), { level: $(this).val() },function(){
OC.Log.reload();
} );
})
});
$('#backgroundjobs input').change(function(){
if($(this).attr('checked')){
$.post(OC.filePath('settings','ajax','setbackgroundjobsmode.php'), { mode: $(this).val() });
}
});
});
\ No newline at end of file
......@@ -24,6 +24,19 @@ if(!$_['htaccessworking']) {
<?php foreach($_['forms'] as $form){
echo $form;
};?>
<fieldset class="personalblock" id="backgroundjobs">
<legend><strong><?php echo $l->t('Cron');?></strong></legend>
<input type="radio" name="mode" value="none" id="backgroundjobs_none">
<label for="backgroundjobs_none">None</label><br />
<input type="radio" name="mode" value="ajax" id="backgroundjobs_ajax">
<label for="backgroundjobs_ajax">AJAX</label><br />
<input type="radio" name="mode" value="webcron" id="backgroundjobs_webcron">
<label for="backgroundjobs_webcron">Webcron</label><br />
<input type="radio" name="mode" value="cron" id="backgroundjobs_cron">
<label for="backgroundjobs_cron">Cron</label><br />
</fieldset>
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Log');?></strong></legend>
Log level: <select name='loglevel' id='loglevel'>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment