mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
Fix repeated page names on sidebar
Check if page already appears in sidebar. If so, continue the loop
This commit is contained in:
parent
7c5da3f6a9
commit
9ed0d666f9
2 changed files with 3575 additions and 3569 deletions
7139
build/index.php
7139
build/index.php
File diff suppressed because it is too large
Load diff
|
@ -100,7 +100,10 @@ function render_sidebar($pageindex, $root_pagename = "")
|
||||||
// The current page is the same as the root page, skip it
|
// The current page is the same as the root page, skip it
|
||||||
if($pagename == $root_pagename)
|
if($pagename == $root_pagename)
|
||||||
continue;
|
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
|
// 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.
|
// pagename has a slash in it, skip it as it is a sub-sub page.
|
||||||
|
|
Loading…
Reference in a new issue