From c006739e4780df86d205d5ebc6f39af141cbc3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Sun, 20 Mar 2011 23:03:20 +0100 Subject: If the page link is empty, it should link to current page -- FS#2178 --- inc/pageutils.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/pageutils.php') 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); -- cgit v1.2.3