mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 05:20:30 +03:00
Provide a way to disable automatical updates checking
This commit is contained in:
parent
2fc85b1068
commit
4e7f9eac50
@ -111,6 +111,7 @@ class FeaturesController extends AbstractController
|
||||
'showonlineoperators',
|
||||
'enablecaptcha',
|
||||
'trackoperators',
|
||||
'autocheckupdates',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -97,14 +97,16 @@ class CronWorker
|
||||
$dispatcher = EventDispatcher::getInstance();
|
||||
$dispatcher->triggerEvent(Events::CRON_RUN);
|
||||
|
||||
// Run the update checker
|
||||
if (!$this->updateChecker->run()) {
|
||||
$this->errors = array_merge(
|
||||
$this->errors,
|
||||
$this->updateChecker->getErrors()
|
||||
);
|
||||
if (Settings::get('autocheckupdates') == '1') {
|
||||
// Run the update checker
|
||||
if (!$this->updateChecker->run()) {
|
||||
$this->errors = array_merge(
|
||||
$this->errors,
|
||||
$this->updateChecker->getErrors()
|
||||
);
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->log[] = $e->getMessage();
|
||||
|
@ -97,6 +97,7 @@ class Settings
|
||||
'surveyaskgroup' => '1',
|
||||
'surveyaskmessage' => '0',
|
||||
'enablepopupnotification' => '0',
|
||||
'autocheckupdates' => '1', /* Check updates automatically */
|
||||
'showonlineoperators' => '0',
|
||||
'enablecaptcha' => '0',
|
||||
'online_timeout' => 30, /* Timeout (in seconds) when online operator becomes offline */
|
||||
|
@ -172,6 +172,15 @@
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="autocheck-updates" class="field-label">{{l10n "Check updates automatically"}}</label>
|
||||
<div class="field-value">
|
||||
<input id="autocheck-updates" type="checkbox" name="autocheckupdates" value="on"{{#if formautocheckupdates}} checked="checked"{{/if}}{{#unless canmodify}} disabled="disabled"{{/unless}}/>
|
||||
</div>
|
||||
<label for="autocheck-updates" class="field-description"> — {{l10n "System will check updates for the core and plugins automatically using cron"}}</label>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
{{#if canmodify}}
|
||||
<div class="form-button">
|
||||
<input type="submit" name="save" class="submit-button-background save-button" value="{{l10n "Save"}}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user