From c29dc6e4219a920b505ef667b82d4f601b34e52b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Sep 2006 23:02:29 +0200 Subject: updatecheck feature This patch adds a feature to let DokuWiki automatically check if updates are available or any other important messages (like security warnings) and then display this info to the admin user. DokuWiki will contact the URL http://www.splitbrain.org/lib/exe/msg.php with a parameter telling it which messages it already know (read from conf/msg) - the server side script then will return all new messages. The messages will be displayed until DokuWiki was upgraded or conf/msg was updated manually. Messages are cached and only checked once a day. The messenger URL will probably change before the next release. darcs-hash:20060916210229-7ad00-7ac592650e171ae4144b0eb47a751a4ca480f031.gz --- lib/images/notify.png | Bin 0 -> 789 bytes lib/plugins/config/lang/en/lang.php | 1 + lib/plugins/config/settings/config.metadata.php | 1 + lib/styles/style.css | 11 +++++++++++ 4 files changed, 13 insertions(+) create mode 100644 lib/images/notify.png (limited to 'lib') diff --git a/lib/images/notify.png b/lib/images/notify.png new file mode 100644 index 000000000..6e0015df4 Binary files /dev/null and b/lib/images/notify.png differ diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index d92e930f2..db8c270b9 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -96,6 +96,7 @@ $lang['disableactions_wikicode'] = 'View source/Export Raw'; $lang['disableactions_other'] = 'Other actions (comma separated)'; /* Advanced Options */ +$lang['updatecheck'] = 'Check for updates and security warnings? DokuWiki needs to contact splitbrain.org for this feature.'; $lang['userewrite'] = 'Use nice URLs'; $lang['useslash'] = 'Use slash as namespace separator in URLs'; $lang['usedraft'] = 'Automatically save a draft while editing'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index b55c0e930..09d3736f3 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -147,6 +147,7 @@ $meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); $meta['fetchsize'] = array('numeric'); $meta['_advanced'] = array('fieldset'); +$meta['updatecheck'] = array('onoff'); $meta['userewrite'] = array('multichoice','_choices' => array(0,1,2)); $meta['useslash'] = array('onoff'); $meta['sepchar'] = array('sepchar'); diff --git a/lib/styles/style.css b/lib/styles/style.css index cb39516c4..209e5654c 100644 --- a/lib/styles/style.css +++ b/lib/styles/style.css @@ -46,6 +46,17 @@ div.success { overflow: hidden; } +div.notify { + background: #ffc url(../images/notify.png) 0.5em 0px no-repeat; + color: #000; + border-bottom: 1px solid #ffa; + font-size: 90%; + margin: 0; + padding-left: 3em; + overflow: hidden; +} + + /* image alignment */ .medialeft { float: left; -- cgit v1.2.3