summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-30 12:30:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-30 12:30:40 +0100
commitd14415e37072dbe16077efd700aee5bd33707b54 (patch)
tree062c3c190039ac9490f56598b0ee116de18c2480 /inc/template.php
parent2ed38036a53a489d2fcadc46ce601f8c876fca31 (diff)
parent38479cbba628ee76a92ff5f3c974cfa8e6ce9e61 (diff)
downloadrpg-d14415e37072dbe16077efd700aee5bd33707b54.tar.gz
rpg-d14415e37072dbe16077efd700aee5bd33707b54.tar.bz2
Merge branch 'master' into subscription
* master: (175 commits) some coding style improvements added .idea project folder to gitignore use correct setUp method and parent calls. Correct German plugin manager translation (download != install) correct return in sendDigest() Fix case-insensitive match in ACL checking GeSHi update to 1.0.8.11 ignore empty header on mail sending remove empty BCC/CC mail headers Galician language update some welcome page changes Combine subsequent calls to strtr into a single transformation changed semicolon to colon in link to welcome page to make it less confusing fixed wrong sidebar showing in namespaces when sidebar is disabled Typo fix for TL;DR removed a bunch of outdated and irrelevant networking acronyms added another place to look for logo to make it more consistent (FS#2656) French language update Czech language update compat js findPosX/y more closely mimic historical function ... Conflicts: inc/auth.php inc/common.php inc/subscription.php lib/exe/indexer.php
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php23
1 files changed, 6 insertions, 17 deletions
diff --git a/inc/template.php b/inc/template.php
index 2dc58b36d..4af35cc2b 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -1465,18 +1465,18 @@ 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) {
- global $ID;
+function tpl_include_page($pageid, $print = true, $propagate = false) {
+ if (!$pageid) return false;
+ if ($propagate) $pageid = page_findnearest($pageid);
+
global $TOC;
- $oldid = $ID;
$oldtoc = $TOC;
$html = p_wiki_xhtml($pageid, '', false);
- $ID = $oldid;
$TOC = $oldtoc;
if(!$print) return $html;
@@ -1485,17 +1485,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>
@@ -1693,7 +1682,7 @@ function tpl_favicon($types = array('favicon')) {
$return .= '<link rel="shortcut icon" href="'.tpl_getMediaFile($look).'" />'.NL;
break;
case 'mobile':
- $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.ico');
+ $look = array(':wiki:apple-touch-icon.png', ':apple-touch-icon.png', 'images/apple-touch-icon.png');
$return .= '<link rel="apple-touch-icon" href="'.tpl_getMediaFile($look).'" />'.NL;
break;
case 'generic':