summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-10-16 22:04:01 +0100
committerChristopher Smith <chris@jalakai.co.uk>2013-10-16 22:04:01 +0100
commit443e135d59e9d227eec818dabf9ee64d7a73d474 (patch)
tree14c649d0a1fade810971d7e6da53471b41484fdf /inc/template.php
parent4d8acaacee33f49d51c06f6dae1dbe245018a020 (diff)
downloadrpg-443e135d59e9d227eec818dabf9ee64d7a73d474.tar.gz
rpg-443e135d59e9d227eec818dabf9ee64d7a73d474.tar.bz2
replace boolean conditional checks on possibly uninitialized vars with \!empty/empty/isset as appropriate
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/template.php b/inc/template.php
index 868ef300c..b42c9d934 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -401,7 +401,7 @@ function tpl_metaheaders($alt = true) {
// make $INFO and other vars available to JavaScripts
$json = new JSON();
$script = "var NS='".$INFO['namespace']."';";
- if($conf['useacl'] && $_SERVER['REMOTE_USER']) {
+ if($conf['useacl'] && !empty($_SERVER['REMOTE_USER'])) {
$script .= "var SIG='".toolbar_signature()."';";
}
$script .= 'var JSINFO = '.$json->encode($JSINFO).';';
@@ -680,12 +680,12 @@ function tpl_get_action($type) {
}
break;
case 'register':
- if($_SERVER['REMOTE_USER']) {
+ if(!empty($_SERVER['REMOTE_USER'])) {
return false;
}
break;
case 'resendpwd':
- if($_SERVER['REMOTE_USER']) {
+ if(!empty($_SERVER['REMOTE_USER'])) {
return false;
}
break;
@@ -1412,7 +1412,7 @@ function tpl_actiondropdown($empty = '', $button = '&gt;') {
echo '<div class="no">';
echo '<input type="hidden" name="id" value="'.$ID.'" />';
if($REV) echo '<input type="hidden" name="rev" value="'.$REV.'" />';
- if ($_SERVER['REMOTE_USER']) {
+ if (!empty($_SERVER['REMOTE_USER'])) {
echo '<input type="hidden" name="sectok" value="'.getSecurityToken().'" />';
}
@@ -1794,7 +1794,7 @@ function tpl_classes() {
'dokuwiki',
'mode_'.$ACT,
'tpl_'.$conf['template'],
- $_SERVER['REMOTE_USER'] ? 'loggedIn' : '',
+ !empty($_SERVER['REMOTE_USER']) ? 'loggedIn' : '',
$INFO['exists'] ? '' : 'notFound',
($ID == $conf['start']) ? 'home' : '',
);