summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-09-17 22:24:21 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-09-17 22:24:21 +0200
commita8be6a4f518e49271e6b35fe7c58901fba2b8d33 (patch)
treef85d0eb078edeb225e68b92a94c4ca08a871bf44 /inc/template.php
parentda50466be0d828eb9d822521798296a8b8a0797f (diff)
downloadrpg-a8be6a4f518e49271e6b35fe7c58901fba2b8d33.tar.gz
rpg-a8be6a4f518e49271e6b35fe7c58901fba2b8d33.tar.bz2
fixed indention
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php136
1 files changed, 68 insertions, 68 deletions
diff --git a/inc/template.php b/inc/template.php
index 595c5fc03..3d1135479 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -793,75 +793,75 @@ function tpl_userinfo(){
global $INFO;
if(isset($_SERVER['REMOTE_USER'])){
print $lang['loggedinas'].': '.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')';
- return true;
- }
- return false;
- }
+ return true;
+ }
+ return false;
+}
- /**
- * Print some info about the current page
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function tpl_pageinfo($ret=false){
- global $conf;
- global $lang;
- global $INFO;
- global $ID;
-
- // return if we are not allowed to view the page
- if (!auth_quickaclcheck($ID)) { return false; }
-
- // prepare date and path
- $fn = $INFO['filepath'];
- if(!$conf['fullpath']){
- if($INFO['rev']){
- $fn = str_replace(fullpath($conf['olddir']).'/','',$fn);
- }else{
- $fn = str_replace(fullpath($conf['datadir']).'/','',$fn);
- }
- }
- $fn = utf8_decodeFN($fn);
- $date = dformat($INFO['lastmod']);
-
- // print it
- if($INFO['exists']){
- $out = '';
- $out .= $fn;
- $out .= ' &middot; ';
- $out .= $lang['lastmod'];
- $out .= ': ';
- $out .= $date;
- if($INFO['editor']){
- $out .= ' '.$lang['by'].' ';
- $out .= editorinfo($INFO['editor']);
- }else{
- $out .= ' ('.$lang['external_edit'].')';
- }
- if($INFO['locked']){
- $out .= ' &middot; ';
- $out .= $lang['lockedby'];
- $out .= ': ';
- $out .= editorinfo($INFO['locked']);
- }
- if($ret){
- return $out;
- }else{
- echo $out;
- return true;
- }
- }
- return false;
- }
-
- /**
- * Prints or returns the name of the given page (current one if none given).
- *
- * If useheading is enabled this will use the first headline else
- * the given ID is used.
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
+/**
+ * Print some info about the current page
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function tpl_pageinfo($ret=false){
+ global $conf;
+ global $lang;
+ global $INFO;
+ global $ID;
+
+ // return if we are not allowed to view the page
+ if (!auth_quickaclcheck($ID)) { return false; }
+
+ // prepare date and path
+ $fn = $INFO['filepath'];
+ if(!$conf['fullpath']){
+ if($INFO['rev']){
+ $fn = str_replace(fullpath($conf['olddir']).'/','',$fn);
+ }else{
+ $fn = str_replace(fullpath($conf['datadir']).'/','',$fn);
+ }
+ }
+ $fn = utf8_decodeFN($fn);
+ $date = dformat($INFO['lastmod']);
+
+ // print it
+ if($INFO['exists']){
+ $out = '';
+ $out .= $fn;
+ $out .= ' &middot; ';
+ $out .= $lang['lastmod'];
+ $out .= ': ';
+ $out .= $date;
+ if($INFO['editor']){
+ $out .= ' '.$lang['by'].' ';
+ $out .= editorinfo($INFO['editor']);
+ }else{
+ $out .= ' ('.$lang['external_edit'].')';
+ }
+ if($INFO['locked']){
+ $out .= ' &middot; ';
+ $out .= $lang['lockedby'];
+ $out .= ': ';
+ $out .= editorinfo($INFO['locked']);
+ }
+ if($ret){
+ return $out;
+ }else{
+ echo $out;
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Prints or returns the name of the given page (current one if none given).
+ *
+ * If useheading is enabled this will use the first headline else
+ * the given ID is used.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
function tpl_pagetitle($id=null, $ret=false){
global $conf;
if(is_null($id)){