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:
@ -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'], '<');
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user