prevent php errors for potentially uninitialised var

This commit is contained in:
Anika Henke 2013-11-11 12:03:35 +00:00
parent f43ba7f15c
commit cdfbeeb1d2
2 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ function _tpl_discussion($discussionPage, $title, $backTitle, $link=0, $wrapper=
* @author Anika Henke <anika@selfthinker.org>
*/
function _tpl_userpage($userPage, $title, $link=0, $wrapper=0) {
if (!$_SERVER['REMOTE_USER']) return;
if (empty($_SERVER['REMOTE_USER'])) return;
global $conf;
$userPage = str_replace('@USER@', $_SERVER['REMOTE_USER'], $userPage);
@ -74,7 +74,7 @@ function _tpl_register($link=0, $wrapper=0) {
global $ID;
$lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register'];
if ($_SERVER['REMOTE_USER'] || !$conf['useacl'] || !actionOK('register')) return;
if (!empty($_SERVER['REMOTE_USER']) || !$conf['useacl'] || !actionOK('register')) return;
if ($wrapper) echo "<$wrapper>";
@ -265,7 +265,7 @@ if (!function_exists('tpl_classes')) {
'dokuwiki',
'mode_'.$ACT,
'tpl_'.$conf['template'],
$_SERVER['REMOTE_USER'] ? 'loggedIn' : '',
!empty($_SERVER['REMOTE_USER']) ? 'loggedIn' : '',
$INFO['exists'] ? '' : 'notFound',
($ID == $conf['start']) ? 'home' : '',
);