summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
authorIzidor Matušov <izidor.matusov@gmail.com>2011-03-20 23:03:20 +0100
committerMichael Hamann <michael@content-space.de>2011-04-07 18:00:12 +0200
commitc006739e4780df86d205d5ebc6f39af141cbc3eb (patch)
tree21eb87ddc4f6d877073c9e5908965b3a398b15f1 /inc/pageutils.php
parent04d61d11bdad640df247f1c95ccdcee8aac3e32c (diff)
downloadrpg-c006739e4780df86d205d5ebc6f39af141cbc3eb.tar.gz
rpg-c006739e4780df86d205d5ebc6f39af141cbc3eb.tar.bz2
If the page link is empty, it should link to current page -- FS#2178
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index cd01dcae7..c9bf60135 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -423,8 +423,14 @@ function resolve_mediaid($ns,&$page,&$exists){
*/
function resolve_pageid($ns,&$page,&$exists){
global $conf;
+ global $ID;
$exists = false;
+ //empty address should point to current page
+ if ($page === "") {
+ $page = $ID;
+ }
+
//keep hashlink if exists then clean both parts
if (strpos($page,'#')) {
list($page,$hash) = explode('#',$page,2);