diff options
author | Adrian Lang <lang@cosmocode.de> | 2009-11-04 11:01:15 +0100 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2009-11-04 11:01:15 +0100 |
commit | c66972f2cb89e65a8bbf8e39d42e8e479f7eb8dc (patch) | |
tree | 3d20030c333e987b42ff101ec339f2120f9f5883 /inc/template.php | |
parent | 1378fb56f6873b93fe002e8aed001e92857b5b5c (diff) | |
download | rpg-c66972f2cb89e65a8bbf8e39d42e8e479f7eb8dc.tar.gz rpg-c66972f2cb89e65a8bbf8e39d42e8e479f7eb8dc.tar.bz2 |
Emit less E_NOTICEs and E_STRICTs
Changes of behaviour are:
* Allow the user name, title & description \e2\80\9c0\e2\80\9d
* Default to Port 443 if using HTTPS
* Set $INFO['isadmin'] and $INFO['ismanager'] to \e2\80\9cfalse\e2\80\9d even if no user is
logged in
* Do not pass empty fragment field in the event data for event
ACTION_SHOW_REDIRECT
* Handle chunked encoding in HTTPClient
darcs-hash:20091104100115-e4919-5cf6397d4a457e3f98a8ca49fbdab03f2147721d.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/template.php b/inc/template.php index f51e2acf9..3193e0013 100644 --- a/inc/template.php +++ b/inc/template.php @@ -80,7 +80,7 @@ function tpl_content_core(){ html_search(); break; case 'revisions': - $first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0; + $first = isset($_REQUEST['first']) ? intval($_REQUEST['first']) : 0; html_revisions($first); break; case 'diff': @@ -517,7 +517,7 @@ function tpl_button($type,$return=false){ break; case 'login': if($conf['useacl'] && $auth){ - if($_SERVER['REMOTE_USER']){ + if(isset($_SERVER['REMOTE_USER'])){ $out .= html_btn('logout',$ID,'',array('do' => 'logout', 'sectok' => getSecurityToken())); }else{ $out .= html_btn('login',$ID,'',array('do' => 'login', 'sectok' => getSecurityToken())); @@ -567,7 +567,7 @@ function tpl_button($type,$return=false){ $out .= html_btn('backlink',$ID,'',array('do' => 'backlink')); break; case 'profile': - if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $auth && + if($conf['useacl'] && isset($_SERVER['REMOTE_USER']) && $auth && $auth->canDo('Profile') && ($ACT!='profile')){ $out .= html_btn('profile',$ID,'',array('do' => 'profile')); } @@ -927,7 +927,7 @@ function tpl_youarehere($sep=' » '){ function tpl_userinfo(){ global $lang; global $INFO; - if($_SERVER['REMOTE_USER']){ + if(isset($_SERVER['REMOTE_USER'])){ print $lang['loggedinas'].': '.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')'; return true; } @@ -1103,7 +1103,7 @@ function tpl_img($maxwidth=0,$maxheight=0){ /** * This function inserts a 1x1 pixel gif which in reality - * is the inexer function. + * is the indexer function. * * Should be called somewhere at the very end of the main.php * template @@ -1375,7 +1375,7 @@ function tpl_license($img='badge',$imgonly=false,$return=false){ if(!$imgonly) { $out .= $lang['license']; $out .= '<a href="'.$lic['url'].'" rel="license" class="urlextern"'; - if($conf['target']['external']) $out .= ' target="'.$conf['target']['external'].'"'; + if(isset($conf['target']['external'])) $out .= ' target="'.$conf['target']['external'].'"'; $out .= '>'.$lic['name'].'</a>'; } $out .= '</div>'; |