diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-11-04 20:19:52 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-04 20:19:52 +0100 |
commit | 383dc9895eac5f1b8ee2a938bfff4a1482228817 (patch) | |
tree | a6af696a4ecd6259628f2885e23eadb637603b30 /inc/template.php | |
parent | ecd445c000e4e54bf7228890848222312cffd3e3 (diff) | |
parent | 2005b6b650f2523cb58a005961a55a6f099c70c3 (diff) | |
download | rpg-383dc9895eac5f1b8ee2a938bfff4a1482228817.tar.gz rpg-383dc9895eac5f1b8ee2a938bfff4a1482228817.tar.bz2 |
Merge branch 'master' into future
* master: (45 commits)
TarLib code cleanup
TarLib: fixed appending in non-dynamic mode
fixed third method of adding files in TarLib
fix lone zero block in TarLib created archives
fix use of constructor in TarLib
Slovak language update
Korean language update
Latvian language update
removed redundant variables in tpl_include_page() (because of 3ff8773b)
added cut off points for mobile devices as parameters to style.ini
Corrected typo: ruke -> rule
Persian language update
Spanish language update
russian language update
Kazach language update
correctly check hash parameter in media dispatcher FS#2648
avoid broken browser_uid on IE
Removed acronyms for "Perl" and "PERL" as Perl is not an acronym. See http://learn.perl.org/faq/perlfaq1.html#Whats-the-difference-between-perl-and-Perl-
Made striplangs.php executable
release preparations
...
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/inc/template.php b/inc/template.php index 9f17d5e32..0d96be214 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1465,18 +1465,19 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap = } /** - * Includes the rendered XHTML of a given page + * Includes the rendered HTML of a given page * * This function is useful to populate sidebars or similar features in a * template */ -function tpl_include_page($pageid, $print = true) { +function tpl_include_page($pageid, $print = true, $propagate = false) { global $ID; global $TOC; - $oldid = $ID; + + if ($propagate) $pageid = page_findnearest($pageid); + $oldtoc = $TOC; $html = p_wiki_xhtml($pageid, '', false); - $ID = $oldid; $TOC = $oldtoc; if(!$print) return $html; @@ -1485,17 +1486,6 @@ function tpl_include_page($pageid, $print = true) { } /** - * Include the sidebar, will check current namespaces first - */ -function tpl_sidebar($print = true) { - global $conf; - - $sidebar = page_findnearest($conf['sidebar']); - if($sidebar) return tpl_include_page($sidebar, $print); - return ''; -} - -/** * Display the subscribe form * * @author Adrian Lang <lang@cosmocode.de> |