cvs: bugtracker /htdocs cache.php /htdocs/elements screen.css /includes bug.php functions.php user.php /includes/cache account_type.php
bug_type.php comment_type.php os_version.php php_version.php status.php user.php /template/generic/bug index.php
| From: | Barry Carlyon | Date: | Fri, 11 Jul 2008 13:14:19 +0000 |
| Subject: | cvs: bugtracker /htdocs cache.php /htdocs/elements screen.css /includes bug.php functions.php user.php /includes/cache account_type.php bug_type.php comment_type.php os_version.php php_version.php status.php user.php /template/generic/bug index.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2079@lists.php.net to get a copy of this message | ||
bcarlyon Fri Jul 11 13:14:19 2008 UTC
Modified files:
/bugtracker/htdocs cache.php
/bugtracker/htdocs/elements screen.css
/bugtracker/includes bug.php functions.php user.php
/bugtracker/includes/cache account_type.php bug_type.php
comment_type.php os_version.php
php_version.php status.php user.php
/bugtracker/template/generic/bug index.php
Log:
Changed the temp account controller
Changed how a temp account user's handle is generated
Changed the side that the td border appears on
Changed new bug emails to include the new temp user's handle
Altered cache.php to include a config.php instead of database.php
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/cache.php?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/cache.php diff -u bugtracker/htdocs/cache.php:1.2 bugtracker/htdocs/cache.php:1.3 --- bugtracker/htdocs/cache.php:1.2 Thu Jul 10 20:56:41 2008 +++ bugtracker/htdocs/cache.php Fri Jul 11 13:14:18 2008 @@ -1,6 +1,6 @@ <?php -include($_SERVER['DOCUMENT_ROOT'] . '../includes/database.php'); +include($_SERVER['DOCUMENT_ROOT'] . '/config.php'); include($_SERVER['DOCUMENT_ROOT'] . '../includes/functions.php'); //database time http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.2 bugtracker/htdocs/elements/screen.css:1.3 --- bugtracker/htdocs/elements/screen.css:1.2 Thu Jul 10 00:08:16 2008 +++ bugtracker/htdocs/elements/screen.css Fri Jul 11 13:14:18 2008 @@ -133,7 +133,7 @@ } td { - border-left: 1px solid #000; + border-right: 1px solid #000; padding: 0 5px 0 5px; } http://cvs.php.net/viewvc.cgi/bugtracker/includes/bug.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/bug.php diff -u bugtracker/includes/bug.php:1.3 bugtracker/includes/bug.php:1.4 --- bugtracker/includes/bug.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/bug.php Fri Jul 11 13:14:18 2008 @@ -22,9 +22,11 @@ if (!$user->logged_in) { //no user create fake account - $handle = explode("@",$bug_data['email']); - $handle = $handle[0]; + $temp_handle = explode("@",$bug_data['email']); + $temp_dom = explode(".",$temp_handle[1]); + $handle = $temp_handle[0] . '_' . $temp_dom[0]; //temp account handle is their email address before the @ + //lets use before@+before the first . $user->temp_account($handle,$bug_data['email'],$bug_data['password']); $bug_data['reported_by'] = $handle; } http://cvs.php.net/viewvc.cgi/bugtracker/includes/functions.php?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/includes/functions.php diff -u bugtracker/includes/functions.php:1.4 bugtracker/includes/functions.php:1.5 --- bugtracker/includes/functions.php:1.4 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/functions.php Fri Jul 11 13:14:18 2008 @@ -80,9 +80,9 @@ (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) { $host = explode('@', $email); -// if(checkdnsrr($host[1].'.', 'MX') ) return true; -// if(checkdnsrr($host[1].'.', 'A') ) return true; -// if(checkdnsrr($host[1].'.', 'CNAME') ) return true; + if(checkdnsrr($host[1].'.', 'MX') ) return true; + if(checkdnsrr($host[1].'.', 'A') ) return true; + if(checkdnsrr($host[1].'.', 'CNAME') ) return true; return true; } return false; http://cvs.php.net/viewvc.cgi/bugtracker/includes/user.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/user.php diff -u bugtracker/includes/user.php:1.3 bugtracker/includes/user.php:1.4 --- bugtracker/includes/user.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/user.php Fri Jul 11 13:14:18 2008 @@ -22,31 +22,45 @@ $this->handle = $handle; //lets look in the cache first $exist = FALSE; - -// if (is_array($user_data[$handle]) && ($user_data[$handle]['handle'] == $handle && $user_data[$handle]['email'] == $email)) + $safe_handle = TRUE; if (in_array($handle,$user_data)) { - //then the user is in the cache - $exist = TRUE; + //then the user handle is in the cache + //lets see if the email matches + if ($user_data[$handle]['email'] == $email) + { + //then it is the same user + $exist = TRUE; + } + else + { + //its a different user, we need to create a different handle for this user + //this is handled later in the user create + $safe_handle = FALSE; + $exist = FALSE; + } } else { - //look in te db + //NOTE THE USE OF EMAIL HERE INSTEAD OF HANDLE!! + + //look in the db as the user has not been cached yet $query = "SELECT * FROM temp_account WHERE email = '{$email}'"; $db->get_data($query); $temp_exist = $db->total_rows ? TRUE : FALSE; //and the other db + //this handle (with a T at the start) should not exist but we will check anyway $query = "SELECT * FROM user WHERE email = '{$email}'"; $db->get_data($query); $exist = $db->total_rows ? TRUE : FALSE; } + if ($exist || $temp_exist) { //this email address exists, lets check the account type //wile row = mysql_fetch_array(connect id) $exist_user = $db->fetch_row(); -// if ($exist_user['account_type'] != TEMP_ACCOUNT) if (!$temp_exist) { //then the user is a real one, lets authenticate against the password on the form @@ -54,6 +68,7 @@ } else { + //the user exists //the user has account type temp_account //login is not required, but password update maybe required $this->update_password($password,$email,'',TEMP_ACCOUNT); @@ -75,14 +90,35 @@ //create a temporary account //first we need to see if we have a handle conflict and update the handle if required - + if (!$safe_handle) + { + //handle already exists, but the email does not match + $append = 0; + $handle_store = $handle; + while (!$safe_handle) + { + $append ++; + //lets alter the handle + //also lets save a little time and not bother looking in the cache + $query = "SELECT * FROM temp_user WHER handle = '{$handle}_{$append}'"; + $db->getdata($query); + if (!$db->total_rows) + { + //this is a safe handle + $safe_handle = TRUE; + $handle = $handle . '_' . $append; + //in theroy the append should never really get past 4 + } + } + $this->handle = $handle; + } //go $md5password = md5($password); $query = 'INSERT INTO temp_account(handle,password,email,registered) VALUES ' . "('{$handle}', '{$md5password}', '{$email}', NOW())"; unset($md5password); $db->get_data($query); $email_data['send'] = TRUE; - $email_data['account'] = 'A temporary account has been created @ http://bugs.php.net/, it is valid for two weeks from today.'; + $email_data['account'] = 'A temporary account (' . $this->handle . ') has been created @ http://bugs.php.net/, it is valid for two weeks from today.'; $email_data['password'] = 'Your password has been created as the same as the one you picked for the Bug you reported.'; } return; http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/account_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/account_type.php diff -u bugtracker/includes/cache/account_type.php:1.3 bugtracker/includes/cache/account_type.php:1.4 --- bugtracker/includes/cache/account_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/account_type.php Fri Jul 11 13:14:18 2008 @@ -8,3 +8,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/bug_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/bug_type.php diff -u bugtracker/includes/cache/bug_type.php:1.3 bugtracker/includes/cache/bug_type.php:1.4 --- bugtracker/includes/cache/bug_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/bug_type.php Fri Jul 11 13:14:18 2008 @@ -1,10 +1,11 @@ <?php - $bug_type[1] = "Doc"; - $bug_type[2] = "Core"; + $bug_type[1] = "Bug System"; + $bug_type[2] = "Doc"; foreach($bug_type as $ref => $data) { define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/comment_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/comment_type.php diff -u bugtracker/includes/cache/comment_type.php:1.3 bugtracker/includes/cache/comment_type.php:1.4 --- bugtracker/includes/cache/comment_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/comment_type.php Fri Jul 11 13:14:18 2008 @@ -10,3 +10,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/os_version.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/os_version.php diff -u bugtracker/includes/cache/os_version.php:1.3 bugtracker/includes/cache/os_version.php:1.4 --- bugtracker/includes/cache/os_version.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/os_version.php Fri Jul 11 13:14:18 2008 @@ -8,3 +8,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/php_version.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/php_version.php diff -u bugtracker/includes/cache/php_version.php:1.3 bugtracker/includes/cache/php_version.php:1.4 --- bugtracker/includes/cache/php_version.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/php_version.php Fri Jul 11 13:14:18 2008 @@ -14,3 +14,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/status.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/status.php diff -u bugtracker/includes/cache/status.php:1.3 bugtracker/includes/cache/status.php:1.4 --- bugtracker/includes/cache/status.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/status.php Fri Jul 11 13:14:18 2008 @@ -2,9 +2,11 @@ $status[0] = "Pending"; $status[1] = "Bogus"; + $status[3] = "Is Bug"; foreach($status as $ref => $data) { define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/user.php?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/includes/cache/user.php diff -u bugtracker/includes/cache/user.php:1.2 bugtracker/includes/cache/user.php:1.3 --- bugtracker/includes/cache/user.php:1.2 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/user.php Fri Jul 11 13:14:18 2008 @@ -1,5 +1,2 @@ <?php - $users["Tbarry"]["handle"] = "Tbarry"; - $users["Tbarry"]["email"] = "barry@barrycarlyon.co.uk"; - http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.6 bugtracker/template/generic/bug/index.php:1.7 --- bugtracker/template/generic/bug/index.php:1.6 Thu Jul 10 21:48:55 2008 +++ bugtracker/template/generic/bug/index.php Fri Jul 11 13:14:18 2008 @@ -35,7 +35,7 @@ if (is_numeric($bug_id)) { -$query = "SELECT *,UNIX_TIMESTAMP(reported_on),UNIX_TIMESTAMP(assigned_on) FROM bug WHERE bug_id = '{$bug_id}'"; +$query = "SELECT *,UNIX_TIMESTAMP(reported_on),UNIX_TIMESTAMP(assigned_on),UNIX_TIMESTAMP(updated) FROM bug WHERE bug_id = '{$bug_id}'"; $db->get_data($query); $row = $db->fetch_row(); $bug = $row; @@ -62,11 +62,15 @@ // $content .= '<img src="/images/bug_status/' . $status[$bug['status']] . '.png" alt="' . $status[$bug['status']] . '" />'; $content .= '<h4>' . $status[$bug['status']] . '</h4>'; -$content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']); +$content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '<br />'; + if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) + { + $content .= 'Last Updated: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; + } if ($bug['status'] != 0) { - $content .= 'Assigned to: ' . $bug['assigned_to'] . '<br />'; - $content .= 'Assigned on: ' . date('d/m/Y h:i',$bug['UNIX_TIMESTAMP(assigned_on)']); + $content .= 'Assigned to: <strong>' . $bug['assigned_to'] . '</strong><br />'; + $content .= 'Assigned on: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); } $content .= '</td></tr>'; @@ -88,6 +92,7 @@ // $content .= '<tr><td></td><td colspan="2" style="display: block;" id="reproduce_code">'; $content .= '<tr><td></td><td colspan="2" id="reproduce_code">'; $content .= '<h5>Reproduce Code</h5>'; + $content .= '<a href="javascript:handleClick(\'reproduce_code\');handleClick(\'reproduce_link\');" class="lineno">Hide Code and Results</a>'; $content .= '<a href="javascript:selectText(\'reproduce\');" title="Select Code" class="textselect">Select Code</a>'; $content .= '<a href="/bug/download/' . $bug['bug_id'] . '/" title="Download Code" class="textselect">Download</a>'; $content .= '<textarea id="reproduce" rows="7" cols="55">' . $bug['reproduce'] . '</textarea>';
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/cache.php?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/cache.php diff -u bugtracker/htdocs/cache.php:1.2 bugtracker/htdocs/cache.php:1.3 --- bugtracker/htdocs/cache.php:1.2 Thu Jul 10 20:56:41 2008 +++ bugtracker/htdocs/cache.php Fri Jul 11 13:14:18 2008 @@ -1,6 +1,6 @@ <?php -include($_SERVER['DOCUMENT_ROOT'] . '../includes/database.php'); +include($_SERVER['DOCUMENT_ROOT'] . '/config.php'); include($_SERVER['DOCUMENT_ROOT'] . '../includes/functions.php'); //database time http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/elements/screen.css?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/htdocs/elements/screen.css diff -u bugtracker/htdocs/elements/screen.css:1.2 bugtracker/htdocs/elements/screen.css:1.3 --- bugtracker/htdocs/elements/screen.css:1.2 Thu Jul 10 00:08:16 2008 +++ bugtracker/htdocs/elements/screen.css Fri Jul 11 13:14:18 2008 @@ -133,7 +133,7 @@ } td { - border-left: 1px solid #000; + border-right: 1px solid #000; padding: 0 5px 0 5px; } http://cvs.php.net/viewvc.cgi/bugtracker/includes/bug.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/bug.php diff -u bugtracker/includes/bug.php:1.3 bugtracker/includes/bug.php:1.4 --- bugtracker/includes/bug.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/bug.php Fri Jul 11 13:14:18 2008 @@ -22,9 +22,11 @@ if (!$user->logged_in) { //no user create fake account - $handle = explode("@",$bug_data['email']); - $handle = $handle[0]; + $temp_handle = explode("@",$bug_data['email']); + $temp_dom = explode(".",$temp_handle[1]); + $handle = $temp_handle[0] . '_' . $temp_dom[0]; //temp account handle is their email address before the @ + //lets use before@+before the first . $user->temp_account($handle,$bug_data['email'],$bug_data['password']); $bug_data['reported_by'] = $handle; } http://cvs.php.net/viewvc.cgi/bugtracker/includes/functions.php?r1=1.4&r2=1.5&diff_format=u Index: bugtracker/includes/functions.php diff -u bugtracker/includes/functions.php:1.4 bugtracker/includes/functions.php:1.5 --- bugtracker/includes/functions.php:1.4 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/functions.php Fri Jul 11 13:14:18 2008 @@ -80,9 +80,9 @@ (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) { $host = explode('@', $email); -// if(checkdnsrr($host[1].'.', 'MX') ) return true; -// if(checkdnsrr($host[1].'.', 'A') ) return true; -// if(checkdnsrr($host[1].'.', 'CNAME') ) return true; + if(checkdnsrr($host[1].'.', 'MX') ) return true; + if(checkdnsrr($host[1].'.', 'A') ) return true; + if(checkdnsrr($host[1].'.', 'CNAME') ) return true; return true; } return false; http://cvs.php.net/viewvc.cgi/bugtracker/includes/user.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/user.php diff -u bugtracker/includes/user.php:1.3 bugtracker/includes/user.php:1.4 --- bugtracker/includes/user.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/user.php Fri Jul 11 13:14:18 2008 @@ -22,31 +22,45 @@ $this->handle = $handle; //lets look in the cache first $exist = FALSE; - -// if (is_array($user_data[$handle]) && ($user_data[$handle]['handle'] == $handle && $user_data[$handle]['email'] == $email)) + $safe_handle = TRUE; if (in_array($handle,$user_data)) { - //then the user is in the cache - $exist = TRUE; + //then the user handle is in the cache + //lets see if the email matches + if ($user_data[$handle]['email'] == $email) + { + //then it is the same user + $exist = TRUE; + } + else + { + //its a different user, we need to create a different handle for this user + //this is handled later in the user create + $safe_handle = FALSE; + $exist = FALSE; + } } else { - //look in te db + //NOTE THE USE OF EMAIL HERE INSTEAD OF HANDLE!! + + //look in the db as the user has not been cached yet $query = "SELECT * FROM temp_account WHERE email = '{$email}'"; $db->get_data($query); $temp_exist = $db->total_rows ? TRUE : FALSE; //and the other db + //this handle (with a T at the start) should not exist but we will check anyway $query = "SELECT * FROM user WHERE email = '{$email}'"; $db->get_data($query); $exist = $db->total_rows ? TRUE : FALSE; } + if ($exist || $temp_exist) { //this email address exists, lets check the account type //wile row = mysql_fetch_array(connect id) $exist_user = $db->fetch_row(); -// if ($exist_user['account_type'] != TEMP_ACCOUNT) if (!$temp_exist) { //then the user is a real one, lets authenticate against the password on the form @@ -54,6 +68,7 @@ } else { + //the user exists //the user has account type temp_account //login is not required, but password update maybe required $this->update_password($password,$email,'',TEMP_ACCOUNT); @@ -75,14 +90,35 @@ //create a temporary account //first we need to see if we have a handle conflict and update the handle if required - + if (!$safe_handle) + { + //handle already exists, but the email does not match + $append = 0; + $handle_store = $handle; + while (!$safe_handle) + { + $append ++; + //lets alter the handle + //also lets save a little time and not bother looking in the cache + $query = "SELECT * FROM temp_user WHER handle = '{$handle}_{$append}'"; + $db->getdata($query); + if (!$db->total_rows) + { + //this is a safe handle + $safe_handle = TRUE; + $handle = $handle . '_' . $append; + //in theroy the append should never really get past 4 + } + } + $this->handle = $handle; + } //go $md5password = md5($password); $query = 'INSERT INTO temp_account(handle,password,email,registered) VALUES ' . "('{$handle}', '{$md5password}', '{$email}', NOW())"; unset($md5password); $db->get_data($query); $email_data['send'] = TRUE; - $email_data['account'] = 'A temporary account has been created @ http://bugs.php.net/, it is valid for two weeks from today.'; + $email_data['account'] = 'A temporary account (' . $this->handle . ') has been created @ http://bugs.php.net/, it is valid for two weeks from today.'; $email_data['password'] = 'Your password has been created as the same as the one you picked for the Bug you reported.'; } return; http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/account_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/account_type.php diff -u bugtracker/includes/cache/account_type.php:1.3 bugtracker/includes/cache/account_type.php:1.4 --- bugtracker/includes/cache/account_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/account_type.php Fri Jul 11 13:14:18 2008 @@ -8,3 +8,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/bug_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/bug_type.php diff -u bugtracker/includes/cache/bug_type.php:1.3 bugtracker/includes/cache/bug_type.php:1.4 --- bugtracker/includes/cache/bug_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/bug_type.php Fri Jul 11 13:14:18 2008 @@ -1,10 +1,11 @@ <?php - $bug_type[1] = "Doc"; - $bug_type[2] = "Core"; + $bug_type[1] = "Bug System"; + $bug_type[2] = "Doc"; foreach($bug_type as $ref => $data) { define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/comment_type.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/comment_type.php diff -u bugtracker/includes/cache/comment_type.php:1.3 bugtracker/includes/cache/comment_type.php:1.4 --- bugtracker/includes/cache/comment_type.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/comment_type.php Fri Jul 11 13:14:18 2008 @@ -10,3 +10,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/os_version.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/os_version.php diff -u bugtracker/includes/cache/os_version.php:1.3 bugtracker/includes/cache/os_version.php:1.4 --- bugtracker/includes/cache/os_version.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/os_version.php Fri Jul 11 13:14:18 2008 @@ -8,3 +8,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/php_version.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/php_version.php diff -u bugtracker/includes/cache/php_version.php:1.3 bugtracker/includes/cache/php_version.php:1.4 --- bugtracker/includes/cache/php_version.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/php_version.php Fri Jul 11 13:14:18 2008 @@ -14,3 +14,4 @@ define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/status.php?r1=1.3&r2=1.4&diff_format=u Index: bugtracker/includes/cache/status.php diff -u bugtracker/includes/cache/status.php:1.3 bugtracker/includes/cache/status.php:1.4 --- bugtracker/includes/cache/status.php:1.3 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/status.php Fri Jul 11 13:14:18 2008 @@ -2,9 +2,11 @@ $status[0] = "Pending"; $status[1] = "Bogus"; + $status[3] = "Is Bug"; foreach($status as $ref => $data) { define(strtoupper(str_replace(' ','_',$data)),$ref); } +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/bugtracker/includes/cache/user.php?r1=1.2&r2=1.3&diff_format=u Index: bugtracker/includes/cache/user.php diff -u bugtracker/includes/cache/user.php:1.2 bugtracker/includes/cache/user.php:1.3 --- bugtracker/includes/cache/user.php:1.2 Thu Jul 10 20:56:41 2008 +++ bugtracker/includes/cache/user.php Fri Jul 11 13:14:18 2008 @@ -1,5 +1,2 @@ <?php - $users["Tbarry"]["handle"] = "Tbarry"; - $users["Tbarry"]["email"] = "barry@barrycarlyon.co.uk"; - http://cvs.php.net/viewvc.cgi/bugtracker/template/generic/bug/index.php?r1=1.6&r2=1.7&diff_format=u Index: bugtracker/template/generic/bug/index.php diff -u bugtracker/template/generic/bug/index.php:1.6 bugtracker/template/generic/bug/index.php:1.7 --- bugtracker/template/generic/bug/index.php:1.6 Thu Jul 10 21:48:55 2008 +++ bugtracker/template/generic/bug/index.php Fri Jul 11 13:14:18 2008 @@ -35,7 +35,7 @@ if (is_numeric($bug_id)) { -$query = "SELECT *,UNIX_TIMESTAMP(reported_on),UNIX_TIMESTAMP(assigned_on) FROM bug WHERE bug_id = '{$bug_id}'"; +$query = "SELECT *,UNIX_TIMESTAMP(reported_on),UNIX_TIMESTAMP(assigned_on),UNIX_TIMESTAMP(updated) FROM bug WHERE bug_id = '{$bug_id}'"; $db->get_data($query); $row = $db->fetch_row(); $bug = $row; @@ -62,11 +62,15 @@ // $content .= '<img src="/images/bug_status/' . $status[$bug['status']] . '.png" alt="' . $status[$bug['status']] . '" />'; $content .= '<h4>' . $status[$bug['status']] . '</h4>'; -$content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']); +$content .= '</td><td colspan="2">Opened: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(reported_on)']) . '<br />'; + if ($bug['UNIX_TIMESTAMP(updated)'] != $bug['UNIX_TIMESTAMP(reported_on)']) + { + $content .= 'Last Updated: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(updated)']) . '<br />';; + } if ($bug['status'] != 0) { - $content .= 'Assigned to: ' . $bug['assigned_to'] . '<br />'; - $content .= 'Assigned on: ' . date('d/m/Y h:i',$bug['UNIX_TIMESTAMP(assigned_on)']); + $content .= 'Assigned to: <strong>' . $bug['assigned_to'] . '</strong><br />'; + $content .= 'Assigned on: ' . date('d/m/Y h:i O',$bug['UNIX_TIMESTAMP(assigned_on)']); } $content .= '</td></tr>'; @@ -88,6 +92,7 @@ // $content .= '<tr><td></td><td colspan="2" style="display: block;" id="reproduce_code">'; $content .= '<tr><td></td><td colspan="2" id="reproduce_code">'; $content .= '<h5>Reproduce Code</h5>'; + $content .= '<a href="javascript:handleClick(\'reproduce_code\');handleClick(\'reproduce_link\');" class="lineno">Hide Code and Results</a>'; $content .= '<a href="javascript:selectText(\'reproduce\');" title="Select Code" class="textselect">Select Code</a>'; $content .= '<a href="/bug/download/' . $bug['bug_id'] . '/" title="Download Code" class="textselect">Download</a>'; $content .= '<textarea id="reproduce" rows="7" cols="55">' . $bug['reproduce'] . '</textarea>';