From 9a2cec2e934b77a311cf21d5822dfd0146d5140b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 9 Sep 2010 12:02:56 +0200 Subject: display DokuWiki version in admin menu Template authors might need to adjust their CSS --- inc/html.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index b475e2b7a..299795cc9 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1447,7 +1447,11 @@ function html_admin(){ } unset($menu['popularity']); + // print DokuWiki version: ptln(''); + echo '
'; + echo getVersion(); + echo '
'; // print the rest as sorted list if(count($menu)){ -- cgit v1.2.3 From c95a5b7dd09aa1bd32e773cc1d582de72fb3e54c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 9 Sep 2010 15:58:33 +0200 Subject: use background image based data security check in admin --- inc/html.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 299795cc9..0bf5842ef 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1394,6 +1394,12 @@ function html_admin(){ ); } + // data security check + echo ''; + print p_locale_xhtml('admin'); // Admin Tasks -- cgit v1.2.3 From 42de51b18d302d07e109c24dfb0ae237e6d38643 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 22 Sep 2010 16:29:25 +0200 Subject: Work around WebKit bug: newlines at the end of input values are removed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In WebKit, newlines at the end of input field’s value parameters are removed. This breaks $PRE, so we protect those new lines with a dot and later remove the dot. --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 0bf5842ef..add559971 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1177,7 +1177,7 @@ function html_edit(){ $form->addHidden('id', $ID); $form->addHidden('rev', $REV); $form->addHidden('date', $DATE); - $form->addHidden('prefix', $PRE); + $form->addHidden('prefix', $PRE . '.'); $form->addHidden('suffix', $SUF); $form->addHidden('changecheck', $check); -- cgit v1.2.3 From 26eb848c36688e459e5dfc46cdc68d87ed2bda0c Mon Sep 17 00:00:00 2001 From: Gina Haeussge Date: Sat, 2 Oct 2010 18:04:09 +0200 Subject: FS#1353: Only highlight isolated occurences of search term, not those where it's part of another term. Word boundaries are now respected. --- inc/html.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index add559971..e1478b0a8 100644 --- a/inc/html.php +++ b/inc/html.php @@ -285,13 +285,20 @@ function html_draft(){ */ function html_hilight($html,$phrases){ $phrases = array_filter((array) $phrases); - $regex = join('|',array_map('preg_quote_cb',$phrases)); + $regex = join('|',array_map('_html_hilight_re_preprocess', array_map('preg_quote_cb',$phrases))); if ($regex === '') return $html; $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); return $html; } +/** + * Wraps a search term in regex boundary checks. + */ +function _html_hilight_re_preprocess($term) { + return '\b'.$term.'\b'; +} + /** * Callback used by html_hilight() * -- cgit v1.2.3 From 2237b4fa4c84beb06a92308a19e45027e2bdc131 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Oct 2010 12:53:41 +0200 Subject: correctly handle highlighting of partial searches FS#1353 --- inc/html.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index e1478b0a8..968a63e4e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -285,20 +285,13 @@ function html_draft(){ */ function html_hilight($html,$phrases){ $phrases = array_filter((array) $phrases); - $regex = join('|',array_map('_html_hilight_re_preprocess', array_map('preg_quote_cb',$phrases))); + $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); if ($regex === '') return $html; $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); return $html; } -/** - * Wraps a search term in regex boundary checks. - */ -function _html_hilight_re_preprocess($term) { - return '\b'.$term.'\b'; -} - /** * Callback used by html_hilight() * -- cgit v1.2.3