1
0

improve update notice: timeout, config

The updater in the dashboard needed a timeout to not kill the backend if github is not reachable
Also, this makes the check configurable
This commit is contained in:
onli
2014-04-24 18:25:56 +02:00
parent 2ae6bcc5dd
commit 631bc150ac
4 changed files with 63 additions and 14 deletions

View File

@ -23,6 +23,12 @@ switch($serendipity['POST']['adminAction']) {
$data['error_publish'] = $success;
}
break;
case 'updateCheckDisable':
if ( !serendipity_checkFormToken() || !serendipity_checkPermission('blogConfiguration') ) {
break;
}
serendipity_set_config_var('updateCheck', false);
break;
}
@ -40,6 +46,7 @@ $data['backend_frontpage_display'] = $output['more'];
$data['curVersion'] = serendipity_getCurrentVersion();
$data['usedVersion'] = $serendipity['version'];
$data['updateCheck'] = $serendipity['updateCheck'];
$data['update'] = version_compare($data['usedVersion'], $data['curVersion'], '<');