Avoid globals where possible

$logged => logged()
$account_logged => accountLogged()
This commit is contained in:
slawkens
2025-03-16 12:36:22 +01:00
parent a71f41193c
commit 13b8fcf454
85 changed files with 226 additions and 192 deletions

View File

@@ -48,7 +48,7 @@ function getColorByPercent($percent)
<tr BGCOLOR="'.$bgcolor.'">
<td>
<a href="';
if($logged)
if(logged())
echo $link.'?id='.$poll['id'];
else
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
@@ -77,7 +77,7 @@ function getColorByPercent($percent)
<tr BGCOLOR="'.$bgcolor.'">
<td>
<a href="';
if($logged)
if(logged())
echo $link.'?id='.$poll['id'];
else
echo getLink('account/manage') . '?redirect=' . urlencode($link.'?id='.$poll['id']);
@@ -98,9 +98,8 @@ function getColorByPercent($percent)
$showed=true;
}
if(!$logged)
{
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=polls') . '">Log in</a> to vote in polls.<br /><br />';
if(!logged()) {
return;
}