cvs: bugtracker /htdocs .htaccess /includes bug.php template.php

From: Date: Thu, 14 Aug 2008 09:06:48 +0000
Subject: cvs: bugtracker /htdocs .htaccess /includes bug.php template.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-2415@lists.php.net to get a copy of this message
bcarlyon Thu Aug 14 09:06:48 2008 UTC Modified files: /bugtracker/htdocs .htaccess /bugtracker/includes bug.php template.php Log: Minor query changes, for closing and reopening a bug http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/.htaccess?r1=1.9&r2=1.10&diff_format=u Index: bugtracker/htdocs/.htaccess diff -u bugtracker/htdocs/.htaccess:1.9 bugtracker/htdocs/.htaccess:1.10 --- bugtracker/htdocs/.htaccess:1.9 Wed Aug 13 14:21:03 2008 +++ bugtracker/htdocs/.htaccess Thu Aug 14 09:06:48 2008 @@ -7,8 +7,10 @@ RewriteRule cake.php cake.php [L] #smaller rewrites, higher priority you know +RewriteRule ^rss/(.*)/(.+).xml$ index/rss.php?type=$1&ref=$2 [L,PT] + RewriteCond %{REQUEST_URI} !=/bug/comment/ - RewriteRule ^bug/(.*)$ index/index.php?page=bug&bug_id=$1&%{QUERY_STRING} [L,PT] + RewriteRule ^bug/(.*)$ index/index.php?page=bug&bug_id=$1&%{QUERY_STRING} [L,PT] #Some shuntage RedirectPermanent /gifs http://bugs.php.net/gifs http://cvs.php.net/viewvc.cgi/bugtracker/includes/bug.php?r1=1.19&r2=1.20&diff_format=u Index: bugtracker/includes/bug.php diff -u bugtracker/includes/bug.php:1.19 bugtracker/includes/bug.php:1.20 --- bugtracker/includes/bug.php:1.19 Thu Aug 14 00:46:49 2008 +++ bugtracker/includes/bug.php Thu Aug 14 09:06:48 2008 @@ -38,7 +38,7 @@ * @author Barry Carlyon <bcarlyon@php.net> * @copyright 2008-2008 Barry Carlyon * @license http://www.opensource.org/licenses/bsd-license.php BSD License -* @version CVS: $Id: bug.php,v 1.19 2008/08/14 00:46:49 bcarlyon Exp $ +* @version CVS: $Id: bug.php,v 1.20 2008/08/14 09:06:48 bcarlyon Exp $ * @link http://gsoc.barrycarlyon.servegame.org/ */ @@ -118,7 +118,7 @@ function is_bug() { global $db; - $query = 'SELECT bug_id,status,reported_by,assigned_to FROM ' . BUG_TABLE . ' WHERE bug_id = ' . $this->bug_id; + $query = 'SELECT bug_id,status,reported_by,assigned_to,closed_by FROM ' . BUG_TABLE . ' WHERE bug_id = ' . $this->bug_id; $db->get_data($query); if ($db->total_rows) { $this->bug_data = $db->fetch_row(); @@ -160,8 +160,11 @@ if ($cache->obtain('status',$newstate)) { - if ($newstate == CLOSED) { - $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . CLOSED . ', closed_by = \'' . $user->handle . '\', closed_on = NOW() WHERE bug_id = ' . $this->bug_id; + if ($newstate == CLOSED || $newstate == FIXED) { + $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ', closed_by = \'' . $user->handle . '\', closed_on = NOW() WHERE bug_id = ' . $this->bug_id; + } elseif ($this->bug_data['closed_by']) { + //reopeneing + $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ', closed_by = \'\', closed_on = 0 WHERE bug_id = ' . $this->bug_id; } else { $query = 'UPDATE ' . BUG_TABLE . ' SET status = ' . $newstate . ' WHERE bug_id = ' . $this->bug_id; } http://cvs.php.net/viewvc.cgi/bugtracker/includes/template.php?r1=1.23&r2=1.24&diff_format=u Index: bugtracker/includes/template.php diff -u bugtracker/includes/template.php:1.23 bugtracker/includes/template.php:1.24 --- bugtracker/includes/template.php:1.23 Wed Aug 13 22:33:33 2008 +++ bugtracker/includes/template.php Thu Aug 14 09:06:48 2008 @@ -48,7 +48,7 @@ * @author Barry Carlyon <bcarlyon@php.net> * @copyright 2008-2008 Barry Carlyon * @license http://www.opensource.org/licenses/bsd-license.php BSD License -* @version CVS: $Id: template.php,v 1.23 2008/08/13 22:33:33 bcarlyon Exp $ +* @version CVS: $Id: template.php,v 1.24 2008/08/14 09:06:48 bcarlyon Exp $ * @link http://gsoc.barrycarlyon.servegame.org/ */ @@ -134,8 +134,8 @@ function generate_header() { $this->html = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '../template/generic/header.html'); - global $user; - if ($user->check_karma('',$user->handle)) +// global $user; +// if ($user->check_karma('',$user->handle)) $this->javascript .= "\n" . '<script type="text/javascript" src="/elements/js/admin.js"></script>'; $this->swap('year', date('Y',time()) );

« previous php.webmaster (#2415) next »