mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Merge pull request #135 from ikisler/sidebar-repeat-fix
PR: Fix repeated page names on sidebar
This commit is contained in:
commit
d307102019
1 changed files with 4 additions and 1 deletions
|
@ -100,7 +100,10 @@ function render_sidebar($pageindex, $root_pagename = "")
|
|||
// The current page is the same as the root page, skip it
|
||||
if($pagename == $root_pagename)
|
||||
continue;
|
||||
|
||||
|
||||
// If the page already appears on the sidebar, skip it
|
||||
if(preg_match("/>$pagename<\a>/m", $result) === 1)
|
||||
continue;
|
||||
|
||||
// If the part of the current pagename that comes after the root
|
||||
// pagename has a slash in it, skip it as it is a sub-sub page.
|
||||
|
|
Loading…
Reference in a new issue