diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-10-20 11:30:51 -0700 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-10-20 11:30:51 -0700 |
commit | d9529222b05d3366179c8a5bbd6d717664b98de0 (patch) | |
tree | 7789b8bc9ee9405f0ce33ff19dad5d15fb9b6207 /inc/template.php | |
parent | 9f5b9cf15569babaa90f0d6f3dd58cefd5439bc5 (diff) | |
parent | e07886c01389351f28a254ef6f7c9611453508fb (diff) | |
download | rpg-d9529222b05d3366179c8a5bbd6d717664b98de0.tar.gz rpg-d9529222b05d3366179c8a5bbd6d717664b98de0.tar.bz2 |
Merge pull request #380 from splitbrain/phpstrict
Php strict
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/inc/template.php b/inc/template.php index c08767e52..b42c9d934 100644 --- a/inc/template.php +++ b/inc/template.php @@ -223,7 +223,7 @@ function tpl_toc($return = false) { if(in_array($class, $pluginlist)) { // attempt to load the plugin /** @var $plugin DokuWiki_Admin_Plugin */ - $plugin =& plugin_load('admin', $class); + $plugin = plugin_load('admin', $class); } } if( ($plugin !== null) && (!$plugin->forAdminOnly() || $INFO['isadmin']) ) { @@ -257,7 +257,7 @@ function tpl_admin() { if(in_array($class, $pluginlist)) { // attempt to load the plugin /** @var $plugin DokuWiki_Admin_Plugin */ - $plugin =& plugin_load('admin', $class); + $plugin = plugin_load('admin', $class); } } @@ -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 = '>') { 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' : '', ); |