svn: /web/php-bugs/trunk/ include/functions.php www/index.php
| From: | Felipe Pena | Date: | Sun, 03 Jul 2011 21:18:13 +0000 |
| Subject: | svn: /web/php-bugs/trunk/ include/functions.php www/index.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-11449@lists.php.net to get a copy of this message | ||
felipe Sun, 03 Jul 2011 21:18:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=312872
Log:
- Display the right link (logout) on the index page when logged in
Changed paths:
U web/php-bugs/trunk/include/functions.php
U web/php-bugs/trunk/www/index.php
Modified: web/php-bugs/trunk/include/functions.php
===================================================================
--- web/php-bugs/trunk/include/functions.php 2011-07-03 20:51:10 UTC (rev 312871)
+++ web/php-bugs/trunk/include/functions.php 2011-07-03 21:18:13 UTC (rev 312872)
@@ -1587,10 +1587,18 @@
function response_header($title, $extraHeaders = '')
{
global $_header_done, $self, $auth_user, $logged_in, $siteBig, $site_url, $basedir;
+
+ $is_logged = false;
if ($_header_done) {
return;
}
+
+ if ($logged_in === 'developer') {
+ $is_logged = true;
+ } else if (isset($_SESSION['credentials']) &&
count($_SESSION['credentials']) == 2) {
+ $is_logged = empty($_SESSION['credentials'][0]) ? false : true;
+ }
$_header_done = true;
@@ -1626,7 +1634,7 @@
<a href="search.php" class="menuWhite">advanced
search</a> |
<a href="search-howto.php" class="menuWhite">search
howto</a> |
<a href="stats.php"
class="menuWhite">statistics</a> |
-<?php if ($logged_in === 'developer') { ?>
+<?php if ($is_logged) { ?>
<a href="logout.php" class="menuWhite">logout</a>
<?php } else { ?>
<a href="login.php" class="menuWhite">login</a>
Modified: web/php-bugs/trunk/www/index.php
===================================================================
--- web/php-bugs/trunk/www/index.php 2011-07-03 20:51:10 UTC (rev 312871)
+++ web/php-bugs/trunk/www/index.php 2011-07-03 21:18:13 UTC (rev 312872)
@@ -1,5 +1,7 @@
<?php
+session_start();
+
/* The bug system home page */
// Obtain common includes