mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Improved "there isn't a page..." message on search page. Fixes #49.
This commit is contained in:
parent
5cf850f0ba
commit
f6f38adae3
4 changed files with 29 additions and 3 deletions
|
@ -20,6 +20,7 @@
|
||||||
- Removed parsedown from the `parser-parsedown` module and replaced it with code that automatically downloads parsedown and parsedown extra on the first run.
|
- Removed parsedown from the `parser-parsedown` module and replaced it with code that automatically downloads parsedown and parsedown extra on the first run.
|
||||||
- Removed Slimdown add from the parsedown parser and replaced it with a custom extension of parsedown extra.
|
- Removed Slimdown add from the parsedown parser and replaced it with a custom extension of parsedown extra.
|
||||||
- Moved printable button to bottom bar and changed display text to "Printable version".
|
- Moved printable button to bottom bar and changed display text to "Printable version".
|
||||||
|
- Improved the "There isn't a page called..." message you sometimes see when searching.
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- Removed debug statement from the redirect page module.
|
- Removed debug statement from the redirect page module.
|
||||||
|
|
|
@ -11,6 +11,7 @@ $start_time = time(true);
|
||||||
* Credits:
|
* Credits:
|
||||||
* Code by @Starbeamrainbowlabs
|
* Code by @Starbeamrainbowlabs
|
||||||
* Slimdown - by Johnny Broadway from https://gist.github.com/jbroadway/2836900
|
* Slimdown - by Johnny Broadway from https://gist.github.com/jbroadway/2836900
|
||||||
|
* Parsedown - by erusev and others on github from http://parsedown.org/
|
||||||
* Bug reports:
|
* Bug reports:
|
||||||
* #2 - Incorrect closing tag - nibreh <https://github.com/nibreh/>
|
* #2 - Incorrect closing tag - nibreh <https://github.com/nibreh/>
|
||||||
* #8 - Rogue <datalist /> tag - nibreh <https://github.com/nibreh/>
|
* #8 - Rogue <datalist /> tag - nibreh <https://github.com/nibreh/>
|
||||||
|
@ -1761,7 +1762,19 @@ register_module([
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content .= "<p>There isn't a page called $query on $settings->sitename, but you can <a href='?action=edit&page=" . rawurlencode($query) . "'>create it</a>.</p>";
|
$content .= "<p>There isn't a page called $query on $settings->sitename, but you ";
|
||||||
|
if((!$settings->anonedits && !$env->is_logged_in) || !$settings->editing)
|
||||||
|
{
|
||||||
|
$content .= "do not have permission to create it.";
|
||||||
|
if(!$env->is_logged_in)
|
||||||
|
{
|
||||||
|
$content .= " You could try <a href='?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>logging in</a>.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$content .= "can <a href='?action=edit&page=" . rawurlencode($query) . "'>create it</a>.</p>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0; // todo use $_GET["offset"] and $_GET["result-count"] or something
|
$i = 0; // todo use $_GET["offset"] and $_GET["result-count"] or something
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
"description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
|
||||||
"id": "feature-search",
|
"id": "feature-search",
|
||||||
"lastupdate": 1457808707,
|
"lastupdate": 1457809238,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,19 @@ register_module([
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$content .= "<p>There isn't a page called $query on $settings->sitename, but you can <a href='?action=edit&page=" . rawurlencode($query) . "'>create it</a>.</p>";
|
$content .= "<p>There isn't a page called $query on $settings->sitename, but you ";
|
||||||
|
if((!$settings->anonedits && !$env->is_logged_in) || !$settings->editing)
|
||||||
|
{
|
||||||
|
$content .= "do not have permission to create it.";
|
||||||
|
if(!$env->is_logged_in)
|
||||||
|
{
|
||||||
|
$content .= " You could try <a href='?action=login&returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "'>logging in</a>.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$content .= "can <a href='?action=edit&page=" . rawurlencode($query) . "'>create it</a>.</p>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0; // todo use $_GET["offset"] and $_GET["result-count"] or something
|
$i = 0; // todo use $_GET["offset"] and $_GET["result-count"] or something
|
||||||
|
|
Loading…
Reference in a new issue