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
+18 -5
View File
@@ -11,12 +11,25 @@
<span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.PUBLISH_ERROR}: {$error_publish}</span>
{/if}
{if $update}
<section id="dashboard_update">
<h3>{$CONST.UPDATE_NOTIFICATION}</h3>
{if $updateCheck == "stable" || $updateCheck == "beta" }
{if $curVersion == -1}
<section id="dashboard_update">
<h3>{$CONST.UPDATE_NOTIFICATION}</h3>
<span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NEW_VERSION_AVAILABLE} {$curVersion}</span>
</section>
<span class="msg_notice"><span class="icon-info-circled"></span> Check for new Serendipity version failed</span> {* i18n *}
<form id="updateCheckDisable" method="POST">
<input type="hidden" name="serendipity[adminAction]" value="updateCheckDisable" />
{$token}
<button type="submit">Disable update check</button> {* i18n *}
</form>
</section>
{else if $update}
<section id="dashboard_update">
<h3>{$CONST.UPDATE_NOTIFICATION}</h3>
<span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NEW_VERSION_AVAILABLE} {$curVersion}</span>
</section>
{/if}
{/if}
<section id="dashboard_comments" class="odd equal_heights quick_list">
<h3>{if 'adminComments'|checkPermission}<a href="serendipity_admin.php?serendipity[adminModule]=comments">{/if}{$CONST.COMMENTS}{if 'adminComments'|checkPermission}</a>{/if}</h3>