From 0a91ddc03c2b15ce51208e2c35df292c5276f50e Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Fri, 21 Feb 2014 16:10:11 +0100 Subject: Update text above searchresults, when only read-acl FS#2697 --- inc/html.php | 10 ++++++---- inc/lang/en/lang.php | 1 + inc/lang/en/searchpage.txt | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/inc/html.php b/inc/html.php index 0434f3b45..b88e58c3c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -299,15 +299,17 @@ function html_hilight_callback($m) { * @author Andreas Gohr */ function html_search(){ - global $QUERY; + global $QUERY, $ID; global $lang; $intro = p_locale_xhtml('searchpage'); // allow use of placeholder in search intro + $pagecreateinfo = (auth_quickaclcheck($ID) > AUTH_READ) ? $lang['searchcreatepage'] : ''; $intro = str_replace( - array('@QUERY@','@SEARCH@'), - array(hsc(rawurlencode($QUERY)),hsc($QUERY)), - $intro); + array('@QUERY@', '@SEARCH@', '@CREATEPAGEINFO@'), + array(hsc(rawurlencode($QUERY)), hsc($QUERY), $pagecreateinfo), + $intro + ); echo $intro; flush(); diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index cbdef8661..cc56f4653 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -68,6 +68,7 @@ $lang['badpassconfirm'] = 'Sorry, the password was wrong'; $lang['minoredit'] = 'Minor Changes'; $lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added $lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.'; +$lang['searchcreatepage'] = 'If you didn\'t find what you were looking for, you can create or edit the page named after your query with the appropriate tool.'; $lang['regmissing'] = 'Sorry, you must fill in all fields.'; $lang['reguexists'] = 'Sorry, a user with this login already exists.'; diff --git a/inc/lang/en/searchpage.txt b/inc/lang/en/searchpage.txt index 50578db3f..ba0960aa6 100644 --- a/inc/lang/en/searchpage.txt +++ b/inc/lang/en/searchpage.txt @@ -1,5 +1,5 @@ ====== Search ====== -You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate tool. +You can find the results of your search below. @CREATEPAGEINFO@ ===== Results ===== -- cgit v1.2.3