You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Benjamin C. <bc...@us...> - 2002-03-18 15:54:42
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16557
Modified Files:
upgrade.php
Log Message:
Updated for 0.8.0
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- upgrade.php 17 Mar 2002 01:44:24 -0000 1.11
+++ upgrade.php 18 Mar 2002 15:54:39 -0000 1.12
@@ -28,17 +28,24 @@
function upgrade() {
global $db;
- $upgraded = $db->getOne('select varvalue from '.TBL_CONFIGURATION.
- " where varname = 'PROMOTE_VOTES'");
- if (!$upgraded) {
- // Add the bug_vote table and insert the new configuration options
+ $upgraded = $db->getOne('select count(*) from '.TBL_BUG.'_seq');
+ if (!$upgraded or DB::isError($upgraded)) {
+ // Convert the sequences
+ if (DB_TYPE == 'mysql') {
+ // Just in case we have someone who started using phpbt a long time ago...
+ $db->query('update '.TBL_DB_SEQUENCE.' set seq_name = lower(seq_name)');
+ }
+ $rs = $db->query("select * from ".TBL_DB_SEQUENCE);
if (DB_TYPE == 'pgsql') {
- $db->query("CREATE TABLE ".TBL_BUG_VOTE." ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (user_id,bug_id) );");
+ while ($rs->fetchInto($row)) {
+ $db->query("create sequence {$row['seq_name']}_seq start {$row['nextid']}");
+ }
} else {
- $db->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
+ while ($rs->fetchInto($row)) {
+ $db->query("create table {$row['seq_name']}_seq (id int unsigned auto_increment not null primary key)");
+ $db->query("insert into {$row['seq_name']}_seq values ({$row['nextid']})");
+ }
}
- $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
- $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
}
include 'templates/default/upgrade-finished.html';
}
|
|
From: Ben C. <php...@be...> - 2002-03-17 03:32:45
|
Why stop with one major change when you can make two with twice the risk? :) I'm thinking about moving the templates to smarty, which I've come to like more and more lately. Anyone have any comments on the idea of switching? |
|
From: Ben C. <php...@be...> - 2002-03-17 02:03:57
|
Be cautious with the latest changes I just committed... they aren't tested much. Also, I haven't yet written the script to convert the old sequence style to the PEAR::DB style, so if you do want to test it you will probably want to test it with a new installation. Good luck, and let me know if you have any problems with it! |
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:47:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5718
Modified Files:
include.php
Log Message:
Switching to PEAR::DB
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- include.php 14 Mar 2002 19:36:00 -0000 1.98
+++ include.php 17 Mar 2002 01:47:04 -0000 1.99
@@ -39,83 +39,15 @@
// Grab the global functions
include (INSTALL_PATH.'/inc/functions.php');
-class dbclass extends DB_Sql {
- var $classname = 'dbclass';
- var $Host = DB_HOST;
- var $Database = DB_DATABASE;
- var $User = DB_USER;
- var $Password = DB_PASSWORD;
- var $Seq_Table = TBL_DB_SEQUENCE;
- var $Seq_ID_Col = "nextid";
- var $Seq_Name_Col = "seq_name";
-
- // Attempt to handle different limit syntax
- function limit_query($q_string, $limit, $offset = 0) {
- if ($offset) {
- if (DB_TYPE == 'pgsql') {
- $this->query("$q_string limit $limit offset $offset");
- } else {
- $this->query("$q_string limit $offset, $limit");
- }
- } else {
- $this->query("$q_string limit $limit");
- }
- }
-
- // Handle the different types of concats
- function concat() {
- $pieces = func_get_args();
- if (DB_TYPE == 'pgsql') {
- return delimit_list(' || ', $pieces);
- } else {
- return 'concat('. delimit_list(', ', $pieces).')';
- }
- }
-
- function grab($q_string = '') {
- if ($q_string) $this->query($q_string);
- $this->next_record();
- return $this->Record;
- }
-
- function grab_field($q_string = '') {
- list($retval) = $this->grab($q_string);
- return $retval;
- }
-
- function grab_set($q_string = '') {
- $retary = array();
- if ($q_string) $this->query($q_string);
- while ($row = $this->grab()) { $retary[] = $row; }
- return $retary;
- }
-
- function grab_field_set($q_string = '') {
- $retary = array();
- if ($q_string) $this->query($q_string);
- while ($item = $this->grab_field()) { $retary[] = $item; }
- return $retary;
- }
- function nextid($seq_name) {
- global $auth;
-
- if ($seq_name == TBL_SAVED_QUERY) {
- if ($id = $this->grab_field("select max(saved_query_id)+1 from ".TBL_SAVED_QUERY." where user_id = ".$auth->auth['uid'])) {
- return $id;
- } else {
- return 1;
- }
- } else {
- return DB_Sql::nextid($seq_name);
- }
- }
-}
+// PEAR::DB
+require_once('DB.php');
+$db = DB::Connect(DB_TYPE.'://'.DB_USER.':'.DB_PASSWORD.'@'.DB_HOST.'/'.DB_DATABASE);
+$db->setFetchMode(DB_FETCHMODE_ASSOC);
-$q = new dbclass;
// Set up the configuration variables
-$q->query('select varname, varvalue from '.TBL_CONFIGURATION);
-while (list($k, $v) = $q->grab()) {
+$rs = $db->query('select varname, varvalue from '.TBL_CONFIGURATION);
+while (list($k, $v) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
define($k, $v);
}
@@ -157,19 +89,21 @@
class templateclass extends Template {
function pparse($target, $handle, $append = false) {
- global $auth, $perm, $q;
+ global $auth, $perm, $db;
$u = isset($auth->auth['uid']) ? $auth->auth['uid'] : 0;
$this->set_block('wrap', 'logoutblock', 'loblock');
$this->set_block('wrap', 'loginblock', 'liblock');
$this->set_block('wrap', 'adminnavblock', 'anblock');
if ($u) {
- list($owner_open, $owner_closed) = $q->grab("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
+ list($owner_open, $owner_closed) = $db->getRow("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
- ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where assigned_to = $u");
- list($reporter_open, $reporter_closed) = $q->grab("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
+ ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where assigned_to = $u",
+ DB_FETCHMODE_ORDERED);
+ list($reporter_open, $reporter_closed) = $db->getRow("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
- ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u");
+ ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u",
+ DB_FETCHMODE_ORDERED);
$this->set_var(array(
'loggedinas' => $auth->auth['uname'],
'liblock' => '',
@@ -225,14 +159,14 @@
// Check to see if the user is trying to login
if (isset($_pv['dologin'])) {
if (isset($_pv['sendpass'])) {
- list($email, $password) = $q->grab("select email, password from ".TBL_AUTH_USER." where login = '{$_pv['username']}' and active > 0");
- if (!$q->num_rows()) {
+ list($email, $password) = $db->getRow("select email, password from ".TBL_AUTH_USER." where login = '{$_pv['username']}' and active > 0");
+ if (!$email) {
$t->set_var('loginerror', '<div class="error">Invalid login</div>');
} else {
if (ENCRYPT_PASS) {
$password = genpassword(10);
$mpassword = md5($password);
- $q->query("update ".TBL_AUTH_USER." set password = '$mpassword' where login = '$username'");
+ $db->query("update ".TBL_AUTH_USER." set password = '$mpassword' where login = '$username'");
}
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), sprintf("From: %s\nContent-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n",ADMIN_EMAIL, $STRING['lang_charset']));
@@ -253,11 +187,11 @@
$restricted_projects = '0';
if (!$perm->have_perm('Admin')) {
$viewable_projects = delimit_list(',',
- $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ $db->getCol("select project_id from ".TBL_PROJECT_GROUP.
" where group_id in (".delimit_list(',', $auth->auth['group_ids']).")"));
$viewable_projects = $viewable_projects ? $viewable_projects : '0';
$matching_projects = delimit_list(',',
- $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ $db->getCol("select project_id from ".TBL_PROJECT_GROUP.
" where project_id not in ($viewable_projects) group by project_id"));
if ($matching_projects) {
$restricted_projects .= ",$matching_projects";
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:46:40
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv5621/inc
Modified Files:
functions.php
Log Message:
Oops
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- functions.php 17 Mar 2002 01:36:43 -0000 1.7
+++ functions.php 17 Mar 2002 01:46:38 -0000 1.8
@@ -371,7 +371,7 @@
case 'fbsql' : $retstr = 'CONCAT('. delimit_list(', ', $pieces).')'; break;
default : $retstr = delimit_list(' + ', $pieces); break;
}
- return $retstr
+ return $retstr;
}
?>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:44:27
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5222
Modified Files:
attachment.php bug.php index.php newaccount.php query.php
upgrade.php user.php
Log Message:
Switching to PEAR::DB -- mostly untested
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- attachment.php 19 Jan 2002 15:11:26 -0000 1.12
+++ attachment.php 17 Mar 2002 01:44:24 -0000 1.13
@@ -25,26 +25,26 @@
include 'include.php';
function del_attachment($attachid) {
- global $q;
+ global $db;
if (list($filename, $mimetype) = grab_attachment($attachid)) {
- $q->query("delete from ".TBL_ATTACHMENT." where attachment_id = $attachid");
+ $db->query("delete from ".TBL_ATTACHMENT." where attachment_id = $attachid");
unlink($filename);
header("Location: bug.php?op=show&bugid=$attachid");
}
}
function grab_attachment($attachid) {
- global $q, $STRING;
+ global $db, $STRING;
if (!is_numeric($attachid)) {
show_text($STRING['bad_attachment'], true);
return false;
}
- $ainfo = $q->grab("select a.bug_id, file_name, mime_type, project_id"
- ." from ".TBL_ATTACHMENT." a, ".TBL_BUG." b"
- ." where attachment_id = $attachid and a.bug_id = b.bug_id");
- if ($q->num_rows() != 1) {
+ $ainfo = $db->getRow("select a.bug_id, file_name, mime_type, project_id"
+ ." from ".TBL_ATTACHMENT." a, ".TBL_BUG." b"
+ ." where attachment_id = $attachid and a.bug_id = b.bug_id");
+ if (empty($ainfo)) {
show_text($STRING['bad_attachment'], true);
return false;
}
@@ -58,7 +58,7 @@
}
function add_attachment($bugid, $description) {
- global $q, $HTTP_POST_FILES, $now, $u, $STRING, $t;
+ global $db, $HTTP_POST_FILES, $now, $u, $STRING, $t;
if (!isset($HTTP_POST_FILES['attachment']) ||
$HTTP_POST_FILES['attachment']['tmp_name'] == 'none') {
@@ -73,16 +73,17 @@
return;
}
- $projectid = $q->grab_field("select project_id from ".TBL_BUG." where bug_id = $bugid");
+ $projectid = $db->getOne("select project_id from ".TBL_BUG." where bug_id = $bugid");
if (!$projectid) {
show_text($STRING['nobug'], true);
return;
}
// Check for a previously-uploaded attachment with the same name, bug, and project
- $q->query("select a.bug_id, project_id from ".TBL_ATTACHMENT." a, ".TBL_BUG." b"
- ." where file_name = '{$HTTP_POST_FILES['attachment']['name']}' and a.bug_id = b.bug_id");
- while ($ainfo = $q->grab()) {
+ $rs = $db->query("select a.bug_id, project_id from ".TBL_ATTACHMENT." a, ".
+ TBL_BUG." b where file_name = '{$HTTP_POST_FILES['attachment']['name']}' ".
+ "and a.bug_id = b.bug_id");
+ while ($rs->fetchInto($ainfo)) {
if ($bugid == $ainfo['bug_id'] && $projectid == $ainfo['project_id']) {
show_attachment_form($bugid, $STRING['dupe_attachment']);
return;
@@ -114,13 +115,18 @@
}
@chmod("$filepath/$projectid/$filename", 0766);
- $q->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, description, file_size, mime_type, created_by, created_date) values (".$q->nextid(TBL_ATTACHMENT).", $bugid, '{$HTTP_POST_FILES['attachment']['name']}', '$description', {$HTTP_POST_FILES['attachment']['size']}, '{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
+ $db->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, ".
+ "description, file_size, mime_type, created_by, created_date) values (".
+ $db->nextId(TBL_ATTACHMENT).", $bugid, ".
+ "'{$HTTP_POST_FILES['attachment']['name']}', '$description', ".
+ "{$HTTP_POST_FILES['attachment']['size']}, ".
+ "'{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
$t->set_file('content', 'bugattachmentsuccess.html');
$t->set_var('bugid', $bugid);
}
function show_attachment_form($bugid, $error = '') {
- global $q, $t, $STRING;
+ global $db, $t, $STRING;
$t->set_file('content', 'bugattachmentform.html');
if (!is_numeric($bugid)) {
@@ -128,7 +134,7 @@
return;
}
- $bugexists = $q->grab_field("select count(*) from ".TBL_BUG." where bug_id = $bugid");
+ $bugexists = $db->getOne("select count(*) from ".TBL_BUG." where bug_id = $bugid");
if (!$bugexists) {
show_text($STRING['nobug'], true);
return;
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- bug.php 11 Mar 2002 18:28:35 -0000 1.83
+++ bug.php 17 Mar 2002 01:44:24 -0000 1.84
@@ -27,19 +27,19 @@
///
/// View the votes for a bug
function vote_view($bug_id) {
- global $u, $q, $t, $STRING;
+ global $u, $db, $t, $STRING;
$t->set_file('content', 'bugvotes.html');
$t->set_block('content', 'row', 'rows');
- $q->query('select login, v.created_date from '.TBL_AUTH_USER.' u, '.
+ $rs = $db->query('select login, v.created_date from '.TBL_AUTH_USER.' u, '.
TBL_BUG_VOTE." v where u.user_id = v.user_id and bug_id = $bug_id".
' order by v.created_date');
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows', "<tr><td colspan=\"2\" align=\"center\">{$STRING['no_votes']}</td></tr>");
} else {
$i = 0;
- while (list($login, $date) = $q->grab()) {
+ while (list($login, $date) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
@@ -55,37 +55,37 @@
///
/// Add a vote to a bug to (possibly) promote it
function vote_bug($bug_id) {
- global $u, $q, $now, $_pv, $STRING;
+ global $u, $db, $now, $_pv, $STRING;
// Check to see if the user already voted on this bug
- if ($q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ if ($db->getOne("select count(*) from ".TBL_BUG_VOTE.
" where bug_id = $bug_id and user_id = $u")) {
show_bug($bug_id, array('vote' => $STRING['already_voted']));
return;
}
// Check whether the user has used his allotment of votes (if there is a max)
- if (MAX_USER_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ if (MAX_USER_VOTES and $db->getOne("select count(*) from ".TBL_BUG_VOTE.
" where user_id = $u") >= MAX_USER_VOTES) {
show_bug($bug_id, array('vote' => $STRING['too_many_votes']));
return;
}
// Record the vote
- $q->query("insert into ".TBL_BUG_VOTE." (user_id, bug_id, created_date)
+ $db->query("insert into ".TBL_BUG_VOTE." (user_id, bug_id, created_date)
values ($u, $bug_id, $now)");
// Proceed only if promoting by votes is turned on
if (PROMOTE_VOTES) {
// Has this bug already been promoted?
- $bug_is_new = $q->grab_field("select count(*) from ".TBL_BUG." b, ".
+ $bug_is_new = $db->getOne("select count(*) from ".TBL_BUG." b, ".
TBL_STATUS." s where bug_id = $bug_id and b.status_id = s.status_id and
status_name = 'New'");
// If a number of votes are required to promote a bug, check for promotion
- if (!$bug_is_new and $q->grab_field("select count(*) from ".
+ if (!$bug_is_new and $db->getOne("select count(*) from ".
TBL_BUG_VOTE." where bug_id = $bug_id") == PROMOTE_VOTES) {
- $status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'New'");
- $buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bug_id");
+ $status_id = $db->getOne("select status_id from ".TBL_STATUS." where status_name = 'New'");
+ $buginfo = $db->getOne("select * from ".TBL_BUG." where bug_id = $bug_id");
$changedfields = array('status_id' => $status_id);
do_changedfields($u, $buginfo, $changedfields);
}
@@ -121,16 +121,16 @@
///
/// Show the activity for a bug
function show_history($bugid) {
- global $q, $t, $STRING;
+ global $db, $t, $STRING;
if (!is_numeric($bugid)) {
show_text($STRING['nobughistory']);
return;
}
- $q->query('select bh.*, login from '.TBL_BUG_HISTORY.' bh left join '.
+ $rs = $db->query('select bh.*, login from '.TBL_BUG_HISTORY.' bh left join '.
TBL_AUTH_USER." on bh.created_by = user_id where bug_id = $bugid");
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
show_text($STRING['nobughistory']);
return;
}
@@ -138,7 +138,7 @@
$t->set_file('content','bughistory.html');
$t->set_block('content', 'row', 'rows');
$t->set_var('bugid', $bugid);
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
@@ -155,7 +155,7 @@
///
/// Send the email about changes to the bug and log the changes in the DB
function do_changedfields($userid, &$buginfo, $cf = array(), $comments = '') {
- global $q, $t, $u, $select, $now, $STRING;
+ global $db, $t, $u, $select, $now, $STRING;
// It's a new bug if the changedfields array is empty and there are no comments
$newbug = (!count($cf) and !$comments);
@@ -164,7 +164,7 @@
$t->set_block('emailout','commentblock', 'cblock');
foreach(array('title','url') as $field) {
if (isset($cf[$field])) {
- $q->query('insert into '.TBL_BUG_HISTORY
+ $db->query('insert into '.TBL_BUG_HISTORY
.' (bug_id, changed_field, old_value, new_value, created_by, created_date)'
." values ({$buginfo['bug_id']}, '$field', '"
.addslashes($buginfo[$field])."', '".addslashes($cf[$field])
@@ -193,12 +193,12 @@
);
foreach($cfgDatabase as $field => $table) {
- $oldvalue = $q->grab_field("select ${field}_name from $table"
+ $oldvalue = $db->getOne("select ${field}_name from $table"
." where ${field}_id = {$buginfo[$field.'_id']}");
if (!empty($cf[$field.'_id'])) {
- $newvalue = $q->grab_field("select ${field}_name from $table"
+ $newvalue = $db->getOne("select ${field}_name from $table"
." where ${field}_id = {$cf[$field.'_id']}");
- $q->query('insert into '.TBL_BUG_HISTORY
+ $db->query('insert into '.TBL_BUG_HISTORY
.' (bug_id, changed_field, old_value, new_value, created_by, created_date)'
." values ({$buginfo['bug_id']}, '$field', '".addslashes($oldvalue).
"', '".addslashes($newvalue)."', $u, $now)");
@@ -215,21 +215,21 @@
}
// Reporter never changes;
- $reporter = $q->grab_field('select email from '.TBL_AUTH_USER
+ $reporter = $db->getOne('select email from '.TBL_AUTH_USER
." where user_id = {$buginfo['created_by']}");
$reporterstat = ' ';
- $assignedto = $q->grab_field('select email from '.TBL_AUTH_USER
+ $assignedto = $db->getOne('select email from '.TBL_AUTH_USER
.' where user_id = '
.(!empty($cf['assigned_to']) ? $cf['assigned_to'] : $buginfo['assigned_to']));
$assignedtostat = !empty($cf['assigned_to']) ? '!' : ' ';
// If there are new comments grab the comments immediately before the latest
if ($comments or $newbug) {
- $q->query('select u.login, c.comment_text, c.created_date'
+ $rs = $db->query('select u.login, c.comment_text, c.created_date'
.' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER.' u'
." where bug_id = {$buginfo['bug_id']} and c.created_by = u.user_id"
.' order by created_date desc limit 2');
- $row = $q->grab();
+ $rs->fetchInto($row);
$t->set_var(array(
'newpostedby' => $row['login'],
'newpostedon' => date(TIME_FORMAT, $row['created_date']).' on '.
@@ -238,17 +238,18 @@
));
// If this comment is the first additional comment after the creation of the
// bug then we need to grab the bug's description as the previous comment
- if ($q->num_rows() < 2) {
- list($by, $on, $comments) = $q->grab('select u.login, b.created_date, b.description'
+ if ($rs->numRows() < 2) {
+ list($by, $on, $comments) = $db->getRow('select u.login, b.created_date, b.description'
.' from '.TBL_BUG.' b, '.TBL_AUTH_USER.' u'
- ." where b.created_by = u.user_id and bug_id = {$buginfo['bug_id']}");
+ ." where b.created_by = u.user_id and bug_id = {$buginfo['bug_id']}",
+ null, DB_FETCHMODE_ORDERED);
$t->set_var(array(
'oldpostedby' => $by,
'oldpostedon' => date(TIME_FORMAT,$on).' on '.date(DATE_FORMAT,$on),
'oldcomments' => textwrap(format_comments($comments),72)
));
} else {
- $row = $q->grab();
+ $rs->fetchInto($row);
$t->set_var(array(
'oldpostedby' => $row['login'],
'oldpostedon' => date(TIME_FORMAT,$row['created_date']).' on '.
@@ -269,11 +270,10 @@
$maillist[] = $assignedto;
// Collect the CCs
- $q->query('select email from '.TBL_BUG_CC.' left join '.TBL_AUTH_USER.
- " using(user_id) where bug_id = {$buginfo['bug_id']}");
- while ($cc_email = $q->grab_field()) {
- $maillist[] = $cc_email;
- }
+ if ($ccs = $db->getCol('select email from '.TBL_BUG_CC.' left join '.
+ TBL_AUTH_USER." using(user_id) where bug_id = {$buginfo['bug_id']}")) {
+ array_push($maillist, $ccs);
+ }
// Later add a watcher (such as QA person) check here
$toemail = delimit_list(', ',$maillist);
@@ -298,10 +298,10 @@
}
function update_bug($bugid = 0) {
- global $q, $t, $u, $STRING, $perm, $now, $_pv;
+ global $db, $t, $u, $STRING, $perm, $now, $_pv;
// Pull bug from database to determine changed fields and for user validation
- $buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bugid");
+ $buginfo = $db->getRow("select * from ".TBL_BUG." where bug_id = $bugid");
$changedfields = array();
if (isset($_pv)) {
@@ -331,7 +331,7 @@
} else { // text box
$assign_user_query = " where login = '$reassignto'";
}
- if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ if (!$assignedto = $db->getOne("select user_id from ".TBL_AUTH_USER.
$assign_user_query)) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
@@ -345,22 +345,22 @@
// Add CC if specified
if ($add_cc) {
- if (!$cc_uid = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ if (!$cc_uid = $db->getOne("select user_id from ".TBL_AUTH_USER.
" where login = '$add_cc'")) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
}
- $cc_already = $q->grab_field('select user_id from '.TBL_BUG_CC.
+ $cc_already = $db->getOne('select user_id from '.TBL_BUG_CC.
" where bug_id = $bugid and user_id = $cc_uid");
if (!$cc_already && $cc_uid != $buginfo['created_by']) {
- $q->query("insert into ".TBL_BUG_CC." (bug_id, user_id, created_by,
+ $db->query("insert into ".TBL_BUG_CC." (bug_id, user_id, created_by,
created_date) values ($bugid, $cc_uid, $u, $now)");
}
}
// Remove CCs if requested
if (isset($remove_cc) and count($remove_cc)) {
- $q->query('delete from '.TBL_BUG_CC." where bug_id = $bugid
+ $db->query('delete from '.TBL_BUG_CC." where bug_id = $bugid
and user_id in (".delimit_list(',', $remove_cc).')');
}
@@ -369,7 +369,7 @@
case 'unchanged' : break;
case 'assign' : $assignedto = $u; $statusfield = 'Assigned'; break;
case 'reassign' :
- if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ if (!$assignedto = $db->getOne("select user_id from ".TBL_AUTH_USER.
$assign_user_query)) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
@@ -379,23 +379,23 @@
break;
}
case 'reassigntocomponent' :
- $assignedto = $q->grab_field("select owner from ".TBL_COMPONENT." where component_id = $component_id");
+ $assignedto = $db->getOne("select owner from ".TBL_COMPONENT." where component_id = $component_id");
$statusfield = 'Assigned'; break;
case 'dupe' :
$changeresolution = true;
if ($dupenum == $bugid) {
show_bug($bugid,array('status' => $STRING['dupeofself']));
return;
- } elseif (!$q->grab_field("select bug_id from ".TBL_BUG." where bug_id = $dupenum")) {
+ } elseif (!$db->getOne("select bug_id from ".TBL_BUG." where bug_id = $dupenum")) {
show_bug($bugid,array('status' => $STRING['nobug']));
return;
}
- $q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid(TBL_COMMENT).", $dupenum, 'Bug #$bugid has been marked a duplicate of this bug', $u, $now)");
- $q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid(TBL_COMMENT).", $bugid, 'This bug is a duplicate of bug #$dupenum', $u, $now)");
+ $db->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
+ ." values (".$db->nextId(TBL_COMMENT).", $dupenum, 'Bug #$bugid has been marked a duplicate of this bug', $u, $now)");
+ $db->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
+ ." values (".$db->nextId(TBL_COMMENT).", $bugid, 'This bug is a duplicate of bug #$dupenum', $u, $now)");
$statusfield = 'Duplicate';
- $resolution_id = $q->grab_field("select resolution_id from ".TBL_RESOLUTION." where resolution_name = 'Duplicate'");
+ $resolution_id = $db->getOne("select resolution_id from ".TBL_RESOLUTION." where resolution_name = 'Duplicate'");
$statusfield = 'Resolved';
break;
case 'resolve' :
@@ -415,7 +415,7 @@
break;
}
if (isset($statusfield)) {
- $status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = '$statusfield'");
+ $status_id = $db->getOne("select status_id from ".TBL_STATUS." where status_name = '$statusfield'");
$changedfields['status_id'] = $status_id;
}
if ($changeresolution) {
@@ -423,8 +423,8 @@
}
if ($comments) {
//$comments = strip_tags($comments); -- Uncomment this if you want no <> content in the comments
- $q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid(TBL_COMMENT).", $bugid, '$comments', $u, $now)");
+ $db->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
+ ." values (".$db->nextId(TBL_COMMENT).", $bugid, '$comments', $u, $now)");
}
// Allow for removing of some items from the bug page
@@ -432,7 +432,7 @@
$os_id = $os_id ? $os_id : 0;
$severity_id = $severity_id ? $severity_id : 0;
- $q->query("update ".TBL_BUG." set title = '$title', url = '$url', severity_id = $severity_id, priority = $priority, ".(isset($status_id) ? "status_id = $status_id, " : ''). ($changeresolution ? "resolution_id = $resolution_id, " : ''). (isset($assignedto) ? "assigned_to = $assignedto, " : '')." project_id = $project_id, version_id = $version_id, component_id = $component_id, os_id = $os_id, last_modified_by = $u, last_modified_date = $now where bug_id = $bugid");
+ $db->query("update ".TBL_BUG." set title = '$title', url = '$url', severity_id = $severity_id, priority = $priority, ".(isset($status_id) ? "status_id = $status_id, " : ''). ($changeresolution ? "resolution_id = $resolution_id, " : ''). (isset($assignedto) ? "assigned_to = $assignedto, " : '')." project_id = $project_id, version_id = $version_id, component_id = $component_id, os_id = $os_id, last_modified_by = $u, last_modified_date = $now where bug_id = $bugid");
if (count($changedfields) or !empty($comments)) {
do_changedfields($u, $buginfo, $changedfields, $comments);
@@ -441,7 +441,7 @@
}
function do_form($bugid = 0) {
- global $q, $me, $u, $_pv, $STRING, $now, $HTTP_SERVER_VARS;
+ global $db, $me, $u, $_pv, $STRING, $now, $HTTP_SERVER_VARS;
$error = '';
// Validation
@@ -461,12 +461,12 @@
$severity = $severity ? $severity : 0;
if (!$bugid) {
- $bugid = $q->nextid(TBL_BUG);
+ $bugid = $db->nextId(TBL_BUG);
// Check to see if this bug's component has an owner and should be assigned
- if ($owner = $q->grab_field("select owner from ".TBL_COMPONENT.
+ if ($owner = $db->getOne("select owner from ".TBL_COMPONENT.
" c where component_id = $component")) {
- $status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'Assigned'");
+ $status = $db->getOne("select status_id from ".TBL_STATUS." where status_name = 'Assigned'");
} else {
$owner = 0;
// If we aren't using voting to promote, then auto-promote to New
@@ -475,26 +475,26 @@
} else {
$stat_to_assign = 'New';
}
- $status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = '$stat_to_assign'");
+ $status = $db->getOne("select status_id from ".TBL_STATUS." where status_name = '$stat_to_assign'");
}
- $q->query("insert into ".TBL_BUG." (bug_id, title, description, url,
+ $db->query("insert into ".TBL_BUG." (bug_id, title, description, url,
severity_id, priority, status_id, assigned_to, created_by, created_date,
last_modified_by, last_modified_date, project_id, version_id,
component_id, os_id, browser_string) values ($bugid, '$title',
'$description', '$url', $severity, $priority, $status, $owner, $u,
$now, $u, $now, $project, $version, $component, '$os',
'{$HTTP_SERVER_VARS['HTTP_USER_AGENT']}')");
- $buginfo = $q->grab('select * from '.TBL_BUG." where bug_id = $bugid");
+ $buginfo = $db->getRow('select * from '.TBL_BUG." where bug_id = $bugid");
do_changedfields($u, $buginfo);
} else {
- $q->query("update ".TBL_BUG." set title = '$title', description = '$description', url = '$url', severity_id = '$severity', priority = '$priority', status_id = $status, assigned_to = '$assignedto', project_id = $project, version_id = $version, component_id = $component, os_id = '$os', browser_string = '{$GLOBALS['HTTP_USER_AGENT']}' last_modified_by = $u, last_modified_date = $time where bug_id = '$bugid'");
+ $db->query("update ".TBL_BUG." set title = '$title', description = '$description', url = '$url', severity_id = '$severity', priority = '$priority', status_id = $status, assigned_to = '$assignedto', project_id = $project, version_id = $version, component_id = $component, os_id = '$os', browser_string = '{$GLOBALS['HTTP_USER_AGENT']}' last_modified_by = $u, last_modified_date = $time where bug_id = '$bugid'");
}
if (isset($another)) header("Location: $me?op=add&project=$project");
else header("Location: query.php");
}
function show_form($bugid = 0, $error = '') {
- global $q, $me, $t, $_gv, $_pv, $TITLE;
+ global $db, $me, $t, $_gv, $_pv, $TITLE;
if (isset($_gv['project'])) {
$project = $_gv['project'];
@@ -505,9 +505,9 @@
}
$t->set_file('content','bugform.html');
- $projectname = $q->grab_field("select project_name from ".TBL_PROJECT." where project_id = $project");
+ $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = $project");
if ($bugid && !$error) {
- $row = $q->grab("select * from ".TBL_BUG." where bug_id = '$bugid'");
+ $row = $db->getRow("select * from ".TBL_BUG." where bug_id = '$bugid'");
$t->set_var(array(
'bugid' => $bugid,
'TITLE' => $TITLE['editbug'],
@@ -558,10 +558,10 @@
}
function show_bug_printable($bugid) {
- global $q, $t, $select, $TITLE;
+ global $db, $t, $select, $TITLE;
if (!is_numeric($bugid) or
- !$row = $q->grab('select b.*, reporter.login as reporter,
+ !$row = $db->getRow('select b.*, reporter.login as reporter,
owner.login as owner, project_name, component_name, version_name,
severity_name, os_name, status_name, resolution_name
from '.TBL_BUG.' b
@@ -603,13 +603,13 @@
));
// Show the comments
- $q->query('select comment_text, c.created_date, login'
+ $rs = $db->query('select comment_text, c.created_date, login'
.' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER
." where bug_id = $bugid and c.created_by = user_id order by c.created_date");
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows','');
} else {
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'rdescription' => nl2br(format_comments(
htmlspecialchars($row['comment_text']))),
@@ -625,7 +625,7 @@
///
/// Grab the links for the previous and next bugs in the list
function prev_next_links($bugid, $pos) {
- global $q, $_sv, $STRING;
+ global $db, $_sv, $STRING;
if (!isset($_sv['queryinfo']['query']) || !$_sv['queryinfo']['query']) {
return array('', '');
@@ -639,7 +639,7 @@
$offset = $pos;
$limit = 1;
}
- $q->limit_query('select bug_id, reporter.login as reporter, owner.login as owner
+ $rs = $db->limitQuery('select bug_id, reporter.login as reporter, owner.login as owner
from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id
@@ -651,10 +651,10 @@
and b.os_id = os.os_id and b.version_id = version.version_id
and b.component_id = component.component_id and b.project_id = project.project_id '.
"and {$_sv['queryinfo']['query']} and bug_id <> $bugid
- order by {$_sv['queryinfo']['order']} {$_sv['queryinfo']['sort']}, bug_id asc", $limit, $offset);
+ order by {$_sv['queryinfo']['order']} {$_sv['queryinfo']['sort']}, bug_id asc", $offset, $limit);
- $firstid = $q->grab_field();
- $secondid = $q->grab_field();
+ $firstid = $db->getOne();
+ $secondid = $db->getOne();
if ($pos) {
if ($firstid) {
@@ -676,10 +676,10 @@
}
function show_bug($bugid = 0, $error = array()) {
- global $q, $me, $t, $STRING, $TITLE, $u, $perm, $_gv;
+ global $db, $me, $t, $STRING, $TITLE, $u, $perm, $_gv;
if (!ereg('^[0-9]+$',$bugid) or
- !$row = $q->grab('select b.*, reporter.login as reporter, owner.login as owner, status_name, resolution_name
+ !$row = $db->getRow('select b.*, reporter.login as reporter, owner.login as owner, status_name, resolution_name
from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id
@@ -735,10 +735,10 @@
'nextlink' => $nextlink,
'prevnextsep' => $prevlink && $nextlink ? ' | ' : '',
'pos' => isset($_gv['pos']) ? $_gv['pos'] : 0,
- 'already_voted' => $q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ 'already_voted' => $db->getOne("select count(*) from ".TBL_BUG_VOTE.
" where bug_id = $bugid and user_id = $u"),
'already_voted_string' => $STRING['already_voted'],
- 'num_votes' => $q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ 'num_votes' => $db->getOne("select count(*) from ".TBL_BUG_VOTE.
" where bug_id = $bugid")
));
switch($row['status_name']) {
@@ -767,12 +767,12 @@
$t->set_var('js', build_project_js());
// Show the attachments
- $q->query("select * from ".TBL_ATTACHMENT." where bug_id = $bugid");
- if (!$q->num_rows()) {
+ $rs = $db->query("select * from ".TBL_ATTACHMENT." where bug_id = $bugid");
+ if (!$rs->numRows()) {
$t->set_var('attrows', '<tr><td colspan="5" align="center">No attachments</td></tr>');
} else {
$j = 0;
- while ($att = $q->grab()) {
+ while ($rs->fetchInto($att)) {
if (@is_readable(INSTALL_PATH.'/'.ATTACHMENT_PATH."/{$row['project_id']}/$bugid-{$att['file_name']}")) {
$action = "<a href='attachment.php?attachid={$att['attachment_id']}'>View</a>";
if ($perm->have_perm('Administrator')) {
@@ -804,14 +804,14 @@
}
// Show the comments
- $q->query('select comment_text, c.created_date, login'
+ $rs = $db->query('select comment_text, c.created_date, login'
.' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER
." where bug_id = $bugid and c.created_by = user_id order by c.created_date");
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows','');
} else {
$i = 1;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
@@ -827,7 +827,7 @@
}
function show_projects() {
- global $me, $q, $t, $STRING, $TITLE, $perm, $auth, $restricted_projects, $_gv;
+ global $me, $db, $t, $STRING, $TITLE, $perm, $auth, $restricted_projects, $_gv;
// Show only active projects with at least one component
if ($perm->have_perm('Admin')) { // Show admins all projects
@@ -835,18 +835,18 @@
} else { // Filter out projects that can't be seen by this user
$p_query = " and p.project_id not in ($restricted_projects)";
}
- $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
+ $rs = $db->query('select p.project_id, p.project_name, p.project_desc, p.created_date
from '.TBL_PROJECT.' p, '.TBL_COMPONENT.
' c where p.active = 1 and p.project_id = c.project_id'.$p_query.
' group by p.project_id, p.project_name, p.project_desc, p.created_date'.
' order by project_name');
- switch ($q->num_rows()) {
+ switch ($rs->numRows()) {
case 0 :
$t->set_var('content',"<div class=\"error\">{$STRING['noprojects']}</div>");
return;
case 1 :
- $row = $q->grab();
+ $rs->fetchInto($row);
$_gv['project'] = $row['project_id'];
show_form();
break;
@@ -854,7 +854,7 @@
$t->set_file('content','projectlist.html');
$t->set_block('content','row','rows');
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'id' => $row['project_id'],
'name' => $row['project_name'],
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- index.php 14 Mar 2002 16:01:20 -0000 1.18
+++ index.php 17 Mar 2002 01:44:24 -0000 1.19
@@ -34,18 +34,18 @@
$t->set_var('TITLE',$TITLE['home']);
function grab_data($restricted_projects) {
- global $q;
+ global $db;
// Grab the legend
- $q->query("select status_id, status_name from ".TBL_STATUS." order by sort_order");
- while ($row = $q->grab()) {
+ $rs = $db->query("select status_id, status_name from ".TBL_STATUS." order by sort_order");
+ while ($rs->fetchInto($row)) {
$stats[$row['status_id']]['name'] = $row['status_name'];
}
// Grab the data
- $q->query("select status_id, count(status_id) as count from ".TBL_BUG.
+ $rs = $db->query("select status_id, count(status_id) as count from ".TBL_BUG.
" where project_id not in ($restricted_projects) group by status_id");
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$stats[$row['status_id']]['count'] = $row['count'];
}
@@ -117,13 +117,13 @@
}
// Show the recently added and closed bugs
-$q->query("select bug_id, title from ".TBL_BUG.
+$rs = $db->query("select bug_id, title from ".TBL_BUG.
" where project_id not in ($restricted_projects)".
' order by created_date desc limit 5');
-if (!$q->num_rows()) {
+if (!$rs->numRows()) {
$t->set_var('recentrows', $STRING['nobugs']);
} else {
- while (list($bugid, $title) = $q->grab()) {
+ while (list($bugid, $title) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
$t->set_var(array(
'title' => stripslashes($title),
'bugid' => $bugid
@@ -131,14 +131,14 @@
$t->parse('recentrows', 'recentrow', true);
}
}
-$q->query('select b.bug_id, title from '.TBL_BUG.' b, '.TBL_BUG_HISTORY.
+$rs = $db->query('select b.bug_id, title from '.TBL_BUG.' b, '.TBL_BUG_HISTORY.
" h where project_id not in ($restricted_projects) and b.bug_id = h.bug_id".
" and changed_field = 'status' and new_value = 'Closed'".
' order by h.created_date desc limit 5');
-if (!$q->num_rows()) {
+if (!$rs->numRows()) {
$t->set_var('closerows', $STRING['nobugs']);
} else {
- while (list($bugid, $title) = $q->grab()) {
+ while (list($bugid, $title) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
$t->set_var(array(
'title' => stripslashes($title),
'bugid' => $bugid
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- newaccount.php 13 Dec 2001 14:00:35 -0000 1.23
+++ newaccount.php 17 Mar 2002 01:44:24 -0000 1.24
@@ -25,7 +25,7 @@
include 'include.php';
function do_form() {
- global $q, $t, $_pv, $STRING, $now, $u;
+ global $db, $t, $_pv, $STRING, $now, $u;
if (NEW_ACCOUNTS_DISABLED) {
$t->set_file('content', 'newaccount-disabled');
@@ -36,7 +36,7 @@
$error = $STRING['givelogin'];
elseif (!$_pv['email'] or !valid_email($_pv['email']))
$error = $STRING['giveemail'];
- elseif ($q->grab_field("select user_id from ".TBL_AUTH_USER.
+ elseif ($db->getOne("select user_id from ".TBL_AUTH_USER.
" where email = '{$_pv['email']}' ".
(!empty($_pv['login']) ? "or login = '{$_pv['login']}'" : '')))
$error = $STRING['loginused'];
@@ -57,10 +57,10 @@
} else {
$login = $_pv['login'];
}
- $user_id = $q->nextid(TBL_AUTH_USER);
- $q->query("insert into ".TBL_AUTH_USER." (user_id, login, first_name, last_name, email, password, active, created_date, last_modified_date)"
+ $user_id = $db->nextId(TBL_AUTH_USER);
+ $db->query("insert into ".TBL_AUTH_USER." (user_id, login, first_name, last_name, email, password, active, created_date, last_modified_date)"
." values ($user_id, '$login', '$firstname', '$lastname', '{$_pv['email']}', '$mpassword', 1, $now, $now)");
- $q->query("insert into ".TBL_USER_GROUP.
+ $db->query("insert into ".TBL_USER_GROUP.
" (user_id, group_id, created_by, created_date)
select $user_id, group_id, 0, $now from ".TBL_AUTH_GROUP.
" where group_name = 'User'");
@@ -70,7 +70,7 @@
}
function show_form($error = '') {
- global $q, $t, $_pv;
+ global $t, $_pv;
if (NEW_ACCOUNTS_DISABLED) {
$t->set_file('content', 'newaccount-disabled.html');
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- query.php 5 Mar 2002 23:04:21 -0000 1.59
+++ query.php 17 Mar 2002 01:44:24 -0000 1.60
@@ -25,15 +25,15 @@
include 'include.php';
function delete_saved_query($queryid) {
- global $q, $u, $me;
+ global $db, $u, $me;
- $q->query("delete from ".TBL_SAVED_QUERY." where user_id = $u
+ $db->query("delete from ".TBL_SAVED_QUERY." where user_id = $u
and saved_query_id = $queryid");
header("Location: $me?op=query");
}
function show_query() {
- global $q, $t, $TITLE, $u;
+ global $db, $t, $TITLE, $u;
$t->set_file('content','queryform.html');
$t->set_block('content', 'savequeryblock', 'sqblock');
@@ -41,11 +41,11 @@
if ($u != 'nobody') {
// Grab the saved queries if there are any
- $q->query("select * from ".TBL_SAVED_QUERY." where user_id = '$u'");
- if (!$q->num_rows()) {
+ $rs = $db->query("select * from ".TBL_SAVED_QUERY." where user_id = '$u'");
+ if (!$rs->numRows()) {
$t->set_var('rows','');
} else {
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'savedquerystring' => $row['saved_query_string'],
'savedqueryname' => stripslashes($row['saved_query_name']),
@@ -73,15 +73,15 @@
}
function build_query($assignedto, $reportedby, $open) {
- global $q, $auth, $_gv, $perm, $restricted_projects;
+ global $db, $auth, $_gv, $perm, $restricted_projects;
foreach ($_gv as $k => $v) { $$k = $v; }
// Open bugs assigned to the user -- a hit list
if ($assignedto || $reportedby) {
- $q->query("select status_id from ".TBL_STATUS." where status_name ".
- ($open ? '' : 'not ')."in ('Unconfirmed', 'New', 'Assigned', 'Reopened')");
- while ($statusid = $q->grab_field()) $status[] = $statusid;
+ $status = $db->getCol("select status_id from ".TBL_STATUS.
+ " where status_name ".($open ? '' : 'not ').
+ "in ('Unconfirmed', 'New', 'Assigned', 'Reopened')");
$query[] = 'b.status_id in ('.delimit_list(',',$status).')';
if ($assignedto) {
$query[] = "assigned_to = {$auth->auth['uid']}";
@@ -150,7 +150,7 @@
}
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
- global $me, $q, $t, $select, $TITLE, $STRING, $_gv, $u, $auth,
+ global $me, $db, $t, $select, $TITLE, $STRING, $_gv, $u, $auth,
$default_db_fields, $all_db_fields, $_sv, $HTTP_SERVER_VARS;
$t->set_file('content','buglist.html');
@@ -164,9 +164,11 @@
// Save the query if requested
if (!empty($savedqueryname)) {
$savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $HTTP_SERVER_VARS['QUERY_STRING']);
- $q->query("insert into ".TBL_SAVED_QUERY.
+ $nextid = $db->getOne("select max(saved_query_id)+1 from ".TBL_SAVED_QUERY." where user_id = $u");
+ $nextid = $nextid ? $nextid : 1;
+ $db->query("insert into ".TBL_SAVED_QUERY.
" (saved_query_id, user_id, saved_query_name, saved_query_string)
- values (".$q->nextid(TBL_SAVED_QUERY).", $u, '$savedqueryname', '$savedquerystring')");
+ values ($nextid, $u, '$savedqueryname', '$savedquerystring')");
}
if (!isset($order)) {
if (isset($_sv['queryinfo']['order'])) {
@@ -189,7 +191,7 @@
$_sv['queryinfo'] = array();
}
- $nr = $q->grab_field('select count(*) from '.TBL_BUG.' b
+ $nr = $db->getOne('select count(*) from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '.
(!empty($_sv['queryinfo']['query']) ? "where {$_sv['queryinfo']['query']}": ''));
@@ -206,7 +208,7 @@
'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
- $q->limit_query('select b.*, reporter.login as reporter, owner.login as owner,
+ $rs = $db->limitQuery('select b.*, reporter.login as reporter, owner.login as owner,
lastmodifier.login as lastmodifier, project_name, severity_name, severity_color, status_name,
os_name, version_name, component_name, resolution_name from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
@@ -219,7 +221,7 @@
and b.os_id = os.os_id and b.version_id = version.version_id
and b.component_id = component.component_id and b.project_id = project.project_id '.
(!empty($_sv['queryinfo']['query']) ? "and {$_sv['queryinfo']['query']} " : '').
- "order by $order $sort, bug_id asc", $selrange, $llimit);
+ "order by $order $sort, bug_id asc", $llimit, $selrange);
$headers = array(
'bug_id' => 'bug_id',
@@ -244,7 +246,7 @@
sorting_headers($me, $headers, $order, $sort, "page=$page");
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var(array(
'rows' => "<tr><td>{$STRING['nobugs']}</td></tr>",
'numcols' => "1"));
@@ -267,7 +269,7 @@
$pos = 0;
// Data rows
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$bgcolor = USE_SEVERITY_COLOR ? $row['severity_color'] :
((++$i % 2 == 0) ? '#dddddd' : '#ffffff');
$trclass = USE_SEVERITY_COLOR ? '' : ($i % 2 ? '' : 'alt');
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- upgrade.php 13 Mar 2002 16:36:28 -0000 1.10
+++ upgrade.php 17 Mar 2002 01:44:24 -0000 1.11
@@ -26,19 +26,19 @@
include 'include.php';
function upgrade() {
- global $q;
+ global $db;
- $upgraded = $q->grab_field('select varvalue from '.TBL_CONFIGURATION.
+ $upgraded = $db->getOne('select varvalue from '.TBL_CONFIGURATION.
" where varname = 'PROMOTE_VOTES'");
if (!$upgraded) {
// Add the bug_vote table and insert the new configuration options
if (DB_TYPE == 'pgsql') {
- $q->query("CREATE TABLE ".TBL_BUG_VOTE." ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (user_id,bug_id) );");
+ $db->query("CREATE TABLE ".TBL_BUG_VOTE." ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (user_id,bug_id) );");
} else {
- $q->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
+ $db->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
}
- $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
- $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
+ $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
+ $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
}
include 'templates/default/upgrade-finished.html';
}
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- user.php 28 Feb 2002 18:23:31 -0000 1.19
+++ user.php 17 Mar 2002 01:44:24 -0000 1.20
@@ -25,24 +25,24 @@
include 'include.php';
function delete_vote($bug_id) {
- global $q, $u, $me, $now;
+ global $db, $u, $me, $now;
- $q->query("delete from ".TBL_BUG_VOTE." where user_id = $u and bug_id = $bug_id");
+ $db->query("delete from ".TBL_BUG_VOTE." where user_id = $u and bug_id = $bug_id");
header("Location: $me?r=$now");
}
function change_bug_list_columns($column_list) {
- global $q, $u, $t, $auth;
+ global $db, $u, $t, $auth;
$auth->auth['db_fields'] = $column_list;
$column_list = serialize($column_list);
- $q->query("update ".TBL_AUTH_USER." set bug_list_fields = '$column_list' where user_id = $u");
+ $db->query("update ".TBL_AUTH_USER." set bug_list_fields = '$column_list' where user_id = $u");
//$t->set_file('content', 'columnlistchanged.html');
show_text('Your bug list column preferences have been saved');
}
function change_password($pass1, $pass2) {
- global $t, $q, $u, $STRING;
+ global $t, $db, $u, $STRING;
if (!$pass1 = trim($pass1)) $error = $STRING['givepassword'];
elseif ($pass1 != $pass2) $error = $STRING['passwordmatch'];
@@ -58,12 +58,12 @@
$mpassword = $pass1;
}
- $q->query("update ".TBL_AUTH_USER." set password = '$mpassword' where user_id = $u");
+ $db->query("update ".TBL_AUTH_USER." set password = '$mpassword' where user_id = $u");
$t->set_file('content', 'passwordchanged.html');
}
function show_preferences_form($error = '') {
- global $t, $pass1, $pass2, $all_db_fields, $default_db_fields, $auth, $q, $u;
+ global $t, $pass1, $pass2, $all_db_fields, $default_db_fields, $auth, $db, $u;
$t->set_file('content', 'user.html');
$t->set_block('content', 'column_list_row', 'list_rows');
@@ -91,12 +91,12 @@
}
// Display the votes (if any)
- $q->query("select * from ".TBL_BUG_VOTE." where user_id = $u");
- if (!$q->num_rows()) {
+ $rs = $db->query("select * from ".TBL_BUG_VOTE." where user_id = $u");
+ if (!$rs->numRows()) {
$t->set_var('votesb', ' ');
} else {
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:42:43
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4822
Modified Files:
report.php
Log Message:
Switching to PEAR::DB. Added a new chart, but it is unfinished
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- report.php 5 Mar 2002 22:14:00 -0000 1.19
+++ report.php 17 Mar 2002 01:42:40 -0000 1.20
@@ -25,7 +25,7 @@
include 'include.php';
function resolution_by_engineer($projectid = 0) {
- global $q, $t, $restricted_projects, $perm;
+ global $db, $t, $restricted_projects, $perm;
$t->set_block('content', 'row', 'rows');
$t->set_block('row', 'col', 'cols');
@@ -36,8 +36,11 @@
$resfields = array('Assigned To','Open');
// Grab the resolutions from the database
- $q->query("select resolution_name, ".$q->concat("', sum(case when resolution_id = '", 'resolution_id', "' then 1 else 0 end) as \"'", 'resolution_name' ,"'\"'")." from ".TBL_RESOLUTION);
- while (list($fieldname, $countquery) = $q->grab()) {
+ $rs = $db->query("select resolution_name, ".
+ db_concat("', sum(case when resolution_id = '", 'resolution_id',
+ "' then 1 else 0 end) as \"'", 'resolution_name' ,"'\"'").
+ " from ".TBL_RESOLUTION);
+ while (list($fieldname, $countquery) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
$resfields[] = $fieldname;
$querystring .= $countquery;
}
@@ -51,8 +54,10 @@
$projectquery = '';
}
- $q->query("$querystring, count(bug_id) as \"Total\" from ".TBL_BUG." b left join ".TBL_AUTH_USER." u on assigned_to = user_id $projectquery group by assigned_to, u.email");
- if (!$q->num_rows()) {
+ $rs = $db->query("$querystring, count(bug_id) as \"Total\" from ".TBL_BUG.
+ " b left join ".TBL_AUTH_USER." u on assigned_to = user_id $projectquery ".
+ "group by assigned_to, u.email");
+ if (!$rs->numRows()) {
$t->set_var('rows', 'No data to display');
} else {
foreach ($resfields as $col) {
@@ -64,7 +69,7 @@
$t->parse('rows', 'row', true);
$t->set_var('cols', '');
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
foreach ($resfields as $col) {
if (!isset($row[$col]) || $row[$col] == '') {
$coldata = 'Unassigned';
@@ -89,6 +94,98 @@
}
}
+function new_bugs_by_date($date_range) {
+ global $db, $t, $now, $_gv;
+
+ include ("jpgraph.php");
+ include ("jpgraph_bar.php");
+
+ $colors = array('red', 'cadetblue', 'gold', 'darkmagenta');
+
+ $graph = new Graph(450,300);
+ $graph->SetShadow();
+ $graph->SetScale("textlin");
+ $graph->title->Set("Bug Counts by Date");
+ $graph->title->SetFont(FF_FONT1,FS_BOLD);
+ $graph->img->SetMargin(40,140,40,80);
+ if ($date_range > 30) {
+ $graph->xaxis->SetTextTickInterval(14);
+ } elseif ($date_range > 14) {
+ $graph->xaxis->SetTextTickInterval(7);
+ } elseif ($date_range > 7) {
+ $graph->xaxis->SetTextTickInterval(2);
+ }
+
+ $dates = array();
+ $then = $now - (ONEDAY * $date_range);
+
+ // New bugs
+ $dates = $db->getCol("select created_date from bug where created_date between $then and $now order by 1");
+ if ($date_range == 365) {
+ $date_format = 'M Y';
+ } else {
+ $date_format = 'j M';
+ for ($i = $date_range - 1; $i >= 0; $i--) {
+ $dates[date($date_format, ($now - (ONEDAY * $i)))] = 0.00000001;
+ }
+ }
+ foreach ($dates as $date) {
+ //$date = date($date_format, $date);
+ $dates[date($date_format, $date)] += 1;
+ }
+ foreach ($dates as $date => $count) {
+ #echo "$date:$count<br>";
+ $xlabel[] = $date;
+ $xvalue[] = $count;
+ }
+ $p1 = new BarPlot($xvalue);
+ $p1->SetLegend("Created");
+ $p1->SetColor("blue");
+ $p1->SetFillColor("blue");
+ #$p1->SetCenter();
+ $graph->xaxis->SetTickLabels($xlabel);
+ #$graph->xaxis->SetLabelAngle(90);
+ $graph->SetTickDensity(TICKD_SPARSE);
+ #$graph->yscale->SetGrace(50);
+ $graph->Add($p1);
+
+ // Resolutions
+ if (isset($_gv['resolutions'])) {
+ $color = 0;
+ foreach ($_gv['resolutions'] as $resolution) {
+ $stats = array(
+ 'dates' => array(),
+ 'labels' => array(),
+ 'values' => array(),
+ 'plot' => null);
+ if ($date_range == 365) {
+ $date_format = 'M Y';
+ } else {
+ $date_format = 'j M';
+ for ($i = $date_range - 1; $i >= 0; $i--) {
+ $stats['dates'][date($date_format, ($now - (ONEDAY * $i)))] = 0.00000001;
+ }
+ }
+ $dates = $db->getCol("select created_date from bug_history where changed_field = 'resolution' and new_value = '$resolution' and created_date between $then and $now order by 1");
+ foreach ($dates as $date) {
+ //$date = date($date_format, $date);
+ $stats['dates'][date($date_format, $date)] += 1;
+ }
+ foreach ($stats['dates'] as $date => $count) {
+ #echo "$date:$count<br>";
+ array_push($stats['labels'], $date);
+ array_push($stats['values'], $count);
+ }
+ $stats['plot'] = new BarPlot($stats['values']);
+ $stats['plot']->SetLegend($resolution);
+ $stats['plot']->SetColor($colors[$color]);
+ $stats['plot']->SetFillColor($colors[$color++]);
+ $graph->Add($stats['plot']);
+ }
+ }
+ $graph->Stroke();
+}
+
$projectid = isset($_gv['projectid']) ? $_gv['projectid'] : 0;
$t->set_file('wrap','wrap.html');
$t->set_file('content','report.html');
@@ -97,7 +194,15 @@
'TITLE' => $TITLE['reporting']
));
-resolution_by_engineer($projectid);
+if (isset($_gv['op'])) {
+ switch ($_gv['op']) {
+ case 'bugsbydate' :
+ new_bugs_by_date(isset($_gv['date_range']) ? $_gv['date_range'] : 7);
+ break;
+ }
+} else {
+ resolution_by_engineer($projectid);
+}
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:39:34
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4068
Modified Files:
install.php
Log Message:
Switching to PEAR::DB and changes for oracle support
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- install.php 13 Mar 2002 17:40:18 -0000 1.14
+++ install.php 17 Mar 2002 01:39:31 -0000 1.15
@@ -107,13 +107,9 @@
function create_tables() {
global $_pv, $tables;
- include_once(INSTALL_PATH.'/inc/db/'.$_pv['db_type'].'.php');
-
- $db = new DB_Sql;
- $db->Host = $_pv['db_host'];
- $db->Database = $_pv['db_database'];
- $db->User = $_pv['db_user'];
- $db->Password = $_pv['db_pass'];
+ // PEAR::DB
+ require_once('DB.php');
+ $db = DB::Connect($_pv['db_type'].'://'.$_pv['db_user'].':'.$_pv['db_pass'].'@'.$_pv['db_host'].'/'.$_pv['db_database']);
$q_temp_ary = file('schemas/'.$_pv['db_type'].'.in');
$queries = preg_replace(array_keys($tables), array_values($tables),
@@ -123,6 +119,9 @@
// First, collect multi-line queries into one line, then run the query
$do_query .= chop($query);
if (empty($do_query) or substr($do_query, -1) != ';') continue;
+ if ($_pv['db_type'] == 'oci8' ) {
+ $do_query = substr($do_query, 0, -1);
+ }
$db->query($do_query);
$do_query = '';
}
@@ -197,6 +196,7 @@
$db_types = array(
'mysql' => 'MySQL',
+ 'oci8' => 'Oracle 8.1.x',
'pgsql' => 'PostgreSQL');
foreach ($_pv as $k => $v) $$k = $v;
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:38:34
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3843
Modified Files:
configure.php group.php os.php project.php resolution.php
severity.php status.php user.php
Log Message:
Changing to PEAR::DB -- somewhat tested
Index: configure.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure.php 26 Jan 2002 16:46:52 -0000 1.4
+++ configure.php 17 Mar 2002 01:38:31 -0000 1.5
@@ -26,15 +26,15 @@
include '../include.php';
function save_options() {
- global $q, $HTTP_POST_VARS;
+ global $db, $HTTP_POST_VARS;
foreach ($HTTP_POST_VARS as $k => $v) {
- $q->query('update '.TBL_CONFIGURATION." set varvalue = '$v' where varname = '$k'");
+ $db->query('update '.TBL_CONFIGURATION." set varvalue = '$v' where varname = '$k'");
}
}
function list_options() {
- global $q, $t;
+ global $db, $t;
$t->set_file('content', 'configure.html');
$t->set_block('content', 'row', 'rows');
@@ -43,8 +43,8 @@
$t->set_block('row', 'radioblock', 'radio');
$i = 0;
- $q->query('select * from '.TBL_CONFIGURATION);
- while ($row = $q->grab()) {
+ $rs = $db->query('select * from '.TBL_CONFIGURATION);
+ while ($rs->fetchInto($row)) {
$t->set_var($row);
$t->set_var('trclass', ++$i % 2 ? '' : 'alt');
Index: group.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/group.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- group.php 26 Jan 2002 16:46:52 -0000 1.4
+++ group.php 17 Mar 2002 01:38:31 -0000 1.5
@@ -26,20 +26,20 @@
include '../include.php';
function purge_group($groupid = 0) {
- global $q;
+ global $db;
- $q->query("delete from ".TBL_USER_GROUP." where group_id = $groupid");
+ $db->query("delete from ".TBL_USER_GROUP." where group_id = $groupid");
}
function del_group($groupid = 0) {
- global $q;
+ global $db;
purge_group($groupid);
- $q->query("delete from ".TBL_AUTH_GROUP." where group_id = $groupid");
+ $db->query("delete from ".TBL_AUTH_GROUP." where group_id = $groupid");
}
function do_form($groupid = 0) {
- global $q, $me, $_pv, $STRING, $u, $now;
+ global $db, $me, $_pv, $STRING, $u, $now;
extract($_pv);
$error = '';
@@ -49,11 +49,11 @@
if ($error) { list_items($groupid, $error); return; }
if (!$groupid) {
- $q->query("insert into ".TBL_AUTH_GROUP.
+ $db->query("insert into ".TBL_AUTH_GROUP.
" (group_id, group_name, created_by, created_date, last_modified_by, last_modified_date)"
- ." values (".$q->nextid(TBL_AUTH_GROUP).", '$fname', $u, $now, $u, $now)");
+ ." values (".$db->nextId(TBL_AUTH_GROUP).", '$fname', $u, $now, $u, $now)");
} else {
- $q->query("update ".TBL_AUTH_GROUP.
+ $db->query("update ".TBL_AUTH_GROUP.
" set group_name = '$fname', last_modified_by = $u,
last_modified_date = $now where group_id = '$groupid'");
}
@@ -61,10 +61,10 @@
}
function show_form($groupid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
if ($groupid && !$error) {
- $row = $q->grab("select * from ".TBL_AUTH_GROUP.
+ $row = $db->getRow("select * from ".TBL_AUTH_GROUP.
" where group_id = '$groupid'");
$t->set_var(array(
'action' => $STRING['edit'],
@@ -81,7 +81,7 @@
function list_items($groupid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $db, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','grouplist.html');
$t->set_block('content','row','rows');
@@ -98,7 +98,7 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->grab_field("select count(*) from ".TBL_AUTH_GROUP);
+ $nr = $db->getOne("select count(*) from ".TBL_AUTH_GROUP);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -109,12 +109,12 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select ag.group_id, group_name, locked, count(ug.group_id) as count from ".
+ $rs = $db->limitQuery("select ag.group_id, group_name, locked, count(ug.group_id) as count from ".
TBL_AUTH_GROUP." ag left join ".TBL_USER_GROUP." ug using (group_id) left join ".
TBL_AUTH_USER." using (user_id) group by ag.group_id, group_name, locked order by $order $sort",
- $selrange, $llimit);
+ $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
// This should never happen, as admin, user, and developer groups must exist
$t->set_var('rows',"");
return;
@@ -128,7 +128,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- os.php 5 Mar 2002 23:54:15 -0000 1.21
+++ os.php 17 Mar 2002 01:38:31 -0000 1.22
@@ -26,24 +26,24 @@
include '../include.php';
function del_item($osid = 0) {
- global $q, $me;
+ global $db, $me;
if ($osid) {
// Make sure we are going after a valid record
- $itemexists = $q->grab_field('select count(*) from '.TBL_OS.
+ $itemexists = $db->getOne('select count(*) from '.TBL_OS.
" where os_id = $osid");
// Are there any bugs tied to this one?
- $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
" where os_id = $osid");
if ($itemexists and !$bugcount) {
- $q->query('delete from '.TBL_OS." where os_id = $osid");
+ $db->query('delete from '.TBL_OS." where os_id = $osid");
}
}
header("Location: $me?");
}
function do_form($osid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $db, $me, $_pv, $STRING;
extract($_pv);
$error = '';
@@ -53,19 +53,19 @@
if ($error) { list_items($osid, $error); return; }
if (!$osid) {
- $q->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$q->nextid(TBL_OS).", '$fname', '$fregex', '$fsortorder')");
+ $db->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$db->nextId(TBL_OS).", '$fname', '$fregex', '$fsortorder')");
} else {
- $q->query("update ".TBL_OS." set os_name = '$fname', regex = '$fregex', sort_order = '$fsortorder' where os_id = '$osid'");
+ $db->query("update ".TBL_OS." set os_name = '$fname', regex = '$fregex', sort_order = '$fsortorder' where os_id = '$osid'");
}
header("Location: $me?");
}
function show_form($osid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
extract($_pv);
if ($osid && !$error) {
- $row = $q->grab("select * from ".TBL_OS." where os_id = '$osid'");
+ $row = $db->getRow("select * from ".TBL_OS." where os_id = '$osid'");
$t->set_var(array(
'action' => $STRING['edit'],
'fosid' => $row['os_id'],
@@ -85,7 +85,7 @@
function list_items($osid = 0, $error = '') {
- global $q, $me, $db, $t, $_gv, $STRING, $TITLE;
+ global $db, $me, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','oslist.html');
$t->set_block('content','row','rows');
@@ -102,7 +102,7 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->grab_field("select count(*) from ".TBL_OS);
+ $nr = $db->getOne("select count(*) from ".TBL_OS);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -113,13 +113,13 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query('select s.os_id, os_name, regex, sort_order,'.
+ $rs = $db->limitQuery('select s.os_id, os_name, regex, sort_order,'.
' count(bug_id) as bug_count from '.TBL_OS.
' s left join '.TBL_BUG.' using (os_id) group by s.os_id,'.
' os_name, regex, sort_order'.
- " order by $order $sort", $selrange, $llimit);
+ " order by $order $sort", $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['nooses']}</td></tr>");
return;
}
@@ -133,7 +133,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- project.php 2 Mar 2002 18:08:55 -0000 1.31
+++ project.php 17 Mar 2002 01:38:31 -0000 1.32
@@ -26,7 +26,7 @@
include '../include.php';
function save_version($versionid = 0) {
- global $q, $me, $_pv, $STRING, $now, $u;
+ global $db, $me, $_pv, $STRING, $now, $u;
$error = '';
// Validation
@@ -37,11 +37,11 @@
foreach ($_pv as $k => $v) $$k = $v;
if (!$vf_active) $vf_active = 0;
if (!$versionid) {
- $q->query('insert into '.TBL_VERSION
+ $db->query('insert into '.TBL_VERSION
." (version_id, project_id, version_name, active, created_by, created_date)
- values (".$q->nextid(TBL_VERSION).", $projectid, '$vf_version', $vf_active, $u, $now)");
+ values (".$db->nextId(TBL_VERSION).", $projectid, '$vf_version', $vf_active, $u, $now)");
} else {
- $q->query('update '.TBL_VERSION
+ $db->query('update '.TBL_VERSION
." set project_id = $projectid, version_name = '$vf_version',
active = $vf_active where version_id = '$versionid'");
}
@@ -49,12 +49,12 @@
}
function show_version($versionid = 0, $error = '') {
- global $q, $t, $_pv, $STRING;
+ global $db, $t, $_pv, $STRING;
foreach ($_pv as $k => $v) $$k = $v;
if ($versionid && !$error) {
- $row = $q->grab("select v.*, p.project_name as project_name"
+ $row = $db->getRow("select v.*, p.project_name as project_name"
." from ".TBL_VERSION." v left join ".TBL_PROJECT." p using(project_id)"
." where version_id = '$versionid'");
$t->set_var(array(
@@ -74,16 +74,16 @@
}
function list_versions($projectid) {
- global $q, $t, $STRING;
+ global $db, $t, $STRING;
- $q->query("select * from ".TBL_VERSION." where project_id = $projectid");
- if (!$q->num_rows()) {
+ $rs = $db->query("select * from ".TBL_VERSION." where project_id = $projectid");
+ if (!$rs->numRows()) {
$t->set_var('verrows',"<tr><td colspan='2' align='center'>{$STRING['noversions']}</td></tr>");
return;
}
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
@@ -97,7 +97,7 @@
}
function save_component($componentid = 0) {
- global $q, $me, $_pv, $u, $STRING, $now;
+ global $db, $me, $_pv, $u, $STRING, $now;
$error = '';
// Validation
@@ -111,13 +111,13 @@
if (!$cf_owner) $cf_owner = 0;
if (!$cf_active) $cf_active = 0;
if (!$componentid) {
- $q->query('insert into '.TBL_COMPONENT
+ $db->query('insert into '.TBL_COMPONENT
." (component_id, project_id, component_name, component_desc, owner,
active, created_by, created_date, last_modified_by, last_modified_date)
- values (".$q->nextid(TBL_COMPONENT).", $projectid, '$cf_name',
+ values (".$db->nextId(TBL_COMPONENT).", $projectid, '$cf_name',
'$cf_description', $cf_owner, $cf_active, $u, $now, $u, $now)");
} else {
- $q->query('update '.TBL_COMPONENT
+ $db->query('update '.TBL_COMPONENT
." set component_name = '$cf_name', component_desc = '$cf_description',
owner = $cf_owner, active = $cf_active, last_modified_by = $u,
last_modified_date = $now where component_id = '$componentid'");
@@ -126,12 +126,12 @@
}
function show_component($componentid = 0, $error = '') {
- global $q, $t, $_pv, $STRING;
+ global $db, $t, $_pv, $STRING;
foreach ($_pv as $k => $v) $$k = $v;
if ($componentid && !$error) {
- $row = $q->grab('select c.*, p.project_name as project_name
+ $row = $db->getRow('select c.*, p.project_name as project_name
from '.TBL_COMPONENT.' c left join '.TBL_PROJECT." p using (project_id)
where component_id = '$componentid'");
$t->set_var(array(
@@ -155,16 +155,16 @@
}
function list_components($projectid) {
- global $q, $t, $STRING;
+ global $db, $t, $STRING;
- $q->query("select * from ".TBL_COMPONENT." where project_id = $projectid");
- if (!$q->num_rows()) {
+ $rs = $db->query("select * from ".TBL_COMPONENT." where project_id = $projectid");
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td colspan='2' align='center'>{$STRING['nocomponents']}</td></tr>");
return;
}
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
@@ -182,7 +182,7 @@
}
function save_project($projectid = 0) {
- global $q, $me, $u, $STRING, $now, $_pv;
+ global $db, $me, $u, $STRING, $now, $_pv;
$error = '';
// Validation
@@ -210,32 +210,32 @@
foreach ($_pv as $k => $v) $$k = $v;
if (!isset($active)) $active = 0;
if (!$projectid) {
- $projectid = $q->nextid(TBL_PROJECT);
- $q->query('insert into '.TBL_PROJECT
+ $projectid = $db->nextId(TBL_PROJECT);
+ $db->query('insert into '.TBL_PROJECT
." (project_id, project_name, project_desc, active, created_by, created_date)
values ($projectid , '$name', '$description', $active, $u, $now)");
- $q->query('insert into '.TBL_VERSION
+ $db->query('insert into '.TBL_VERSION
." (version_id, project_id, version_name, active, created_by, created_date)
- values (".$q->nextid(TBL_VERSION).", $projectid, '$vf_version', 1, $u, $now)");
- $q->query('insert into '.TBL_COMPONENT
+ values (".$db->nextId(TBL_VERSION).", $projectid, '$vf_version', 1, $u, $now)");
+ $db->query('insert into '.TBL_COMPONENT
." (component_id, project_id, component_name, component_desc, owner,
active, created_by, created_date, last_modified_by, last_modified_date)
- values (".$q->nextid(TBL_COMPONENT).", $projectid, '$cf_name',
+ values (".$db->nextId(TBL_COMPONENT).", $projectid, '$cf_name',
'$cf_description', $cf_owner, 1, $u, $now, $u, $now)");
} else {
- $q->query('update '.TBL_PROJECT
+ $db->query('update '.TBL_PROJECT
." set project_name = '$name', project_desc = '$description',
active = $active where project_id = $projectid");
}
// Handle project -> group relationship
- $old_usergroup = $q->grab_field_set('select group_id from '.TBL_PROJECT_GROUP.
+ $old_usergroup = $db->getCol('select group_id from '.TBL_PROJECT_GROUP.
" where project_id = $projectid");
if (isset($usergroup) and is_array($usergroup) and count($usergroup)) {
if (in_array('all', $usergroup)) {
// User selected 'All groups'
if (count($old_usergroup)) {
- $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
+ $db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
}
} else {
// Compute differences between old and new
@@ -244,13 +244,13 @@
if (count($remove_from)) {
foreach ($remove_from as $group) {
- $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid
+ $db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid
and group_id = $group");
}
}
if (count($add_to)) {
foreach ($add_to as $group) {
- $q->query("insert into ".TBL_PROJECT_GROUP
+ $db->query("insert into ".TBL_PROJECT_GROUP
." (project_id, group_id, created_by, created_date)
values ('$projectid' ,'$group', $u, $now)");
}
@@ -258,19 +258,19 @@
}
} elseif (count($old_usergroup)) {
// User selected nothing, so consider it 'All groups'
- $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
+ $db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
}
header("Location: $me?op=edit&id=$projectid");
}
function show_project($projectid = 0, $error = array()) {
- global $q, $me, $t, $name, $description, $active, $TITLE, $_gv;
+ global $db, $me, $t, $name, $description, $active, $TITLE, $_gv;
- $proj_groups = $q->grab_field_set('select group_id from '.TBL_PROJECT_GROUP.
+ $proj_groups = $db->getCol('select group_id from '.TBL_PROJECT_GROUP.
" where project_id = $projectid");
if ($projectid && !$error) {
- $row = $q->grab('select * from '.TBL_PROJECT
+ $row = $db->getRow('select * from '.TBL_PROJECT
." where project_id = $projectid");
$t->set_var(array(
'projectid' => $row['project_id'],
@@ -308,13 +308,13 @@
}
function list_projects() {
- global $me, $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
+ global $me, $db, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
$t->set_file('content','projectlist.html');
$t->set_block('content','row','rows');
if (!$order) { $order = '1'; $sort = 'asc'; }
- $nr = $q->grab_field("select count(*) from ".TBL_PROJECT);
+ $nr = $db->getOne("select count(*) from ".TBL_PROJECT);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -327,10 +327,10 @@
'TITLE' => $TITLE['project']
));
- $q->limit_query("select * from ".TBL_PROJECT." order by $order $sort",
- $selrange, $llimit);
+ $rs = $db->limitQuery("select * from ".TBL_PROJECT." order by $order $sort",
+ $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['noprojects']}</td></tr>");
return;
}
@@ -346,7 +346,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- resolution.php 5 Mar 2002 23:54:15 -0000 1.22
+++ resolution.php 17 Mar 2002 01:38:31 -0000 1.23
@@ -26,24 +26,24 @@
include '../include.php';
function del_item($resolutionid = 0) {
- global $q, $me;
+ global $db, $me;
if ($resolutionid) {
// Make sure we are going after a valid record
- $itemexists = $q->grab_field('select count(*) from '.TBL_RESOLUTION.
+ $itemexists = $db->getOne('select count(*) from '.TBL_RESOLUTION.
" where resolution_id = $resolutionid");
// Are there any bugs tied to this one?
- $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
" where resolution_id = $resolutionid");
if ($itemexists and !$bugcount) {
- $q->query('delete from '.TBL_RESOLUTION." where resolution_id = $resolutionid");
+ $db->query('delete from '.TBL_RESOLUTION." where resolution_id = $resolutionid");
}
}
header("Location: $me?");
}
function do_form($resolutionid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $db, $me, $_pv, $STRING;
extract($_pv);
$error = '';
@@ -55,11 +55,11 @@
if ($error) { list_items($resolutionid, $error); return; }
if (!$resolutionid) {
- $q->query("insert into ".TBL_RESOLUTION.
+ $db->query("insert into ".TBL_RESOLUTION.
" (resolution_id, resolution_name, resolution_desc, sort_order)"
- ." values (".$q->nextid(TBL_RESOLUTION).", '$fname', '$fdescription', '$fsortorder')");
+ ." values (".$db->nextId(TBL_RESOLUTION).", '$fname', '$fdescription', '$fsortorder')");
} else {
- $q->query("update ".TBL_RESOLUTION.
+ $db->query("update ".TBL_RESOLUTION.
" set resolution_name = '$fname', resolution_desc = '$fdescription',
sort_order = '$fsortorder' where resolution_id = '$resolutionid'");
}
@@ -67,11 +67,11 @@
}
function show_form($resolutionid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
extract($_pv);
if ($resolutionid && !$error) {
- $row = $q->grab("select * from ".TBL_RESOLUTION.
+ $row = $db->getRow("select * from ".TBL_RESOLUTION.
" where resolution_id = '$resolutionid'");
$t->set_var(array(
'action' => $STRING['edit'],
@@ -92,7 +92,7 @@
function list_items($resolutionid = 0, $error = '') {
- global $me, $q, $t, $STRING, $TITLE, $_gv;
+ global $me, $db, $t, $STRING, $TITLE, $_gv;
$t->set_file('content','resolutionlist.html');
$t->set_block('content','row','rows');
@@ -108,7 +108,7 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_RESOLUTION);
+ $nr = $db->getOne("select count(*) from ".TBL_RESOLUTION);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -119,13 +119,13 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query('select s.resolution_id, resolution_name, resolution_desc,'.
+ $rs = $db->limitQuery('select s.resolution_id, resolution_name, resolution_desc,'.
' sort_order, count(bug_id) as bug_count from '.TBL_RESOLUTION.
' s left join '.TBL_BUG.' using (resolution_id) group by s.resolution_id,'.
' resolution_name, resolution_desc, sort_order'.
- " order by $order $sort", $selrange, $llimit);
+ " order by $order $sort", $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['noresolutions']}</td></tr>");
return;
}
@@ -139,7 +139,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- severity.php 5 Mar 2002 23:54:15 -0000 1.18
+++ severity.php 17 Mar 2002 01:38:31 -0000 1.19
@@ -26,24 +26,24 @@
include '../include.php';
function del_item($severityid = 0) {
- global $q, $me;
+ global $db, $me;
if ($severityid) {
// Make sure we are going after a valid record
- $itemexists = $q->grab_field('select count(*) from '.TBL_SEVERITY.
+ $itemexists = $db->getOne('select count(*) from '.TBL_SEVERITY.
" where severity_id = $severityid");
// Are there any bugs tied to this one?
- $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
" where severity_id = $severityid");
if ($itemexists and !$bugcount) {
- $q->query('delete from '.TBL_SEVERITY." where severity_id = $severityid");
+ $db->query('delete from '.TBL_SEVERITY." where severity_id = $severityid");
}
}
header("Location: $me?");
}
function do_form($severityid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $db, $me, $_pv, $STRING;
extract($_pv);
$error = '';
@@ -55,11 +55,11 @@
if ($error) { list_items($severityid, $error); return; }
if (!$severityid) {
- $q->query("insert into ".TBL_SEVERITY.
+ $db->query("insert into ".TBL_SEVERITY.
" (severity_id, severity_name, severity_desc, sort_order, severity_color)
- values (".$q->nextid(TBL_SEVERITY).", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
+ values (".$db->nextId(TBL_SEVERITY).", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
} else {
- $q->query("update ".TBL_SEVERITY." set severity_name = '$fname',
+ $db->query("update ".TBL_SEVERITY." set severity_name = '$fname',
severity_desc = '$fdescription', sort_order = '$fsortorder',
severity_color = '$fcolor' where severity_id = '$severityid'");
}
@@ -67,10 +67,10 @@
}
function show_form($severityid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
if ($severityid && !$error) {
- $row = $q->grab("select * from ".TBL_SEVERITY.
+ $row = $db->getRow("select * from ".TBL_SEVERITY.
" where severity_id = '$severityid'");
$t->set_var(array(
'action' => $STRING['edit'],
@@ -95,7 +95,7 @@
function list_items($severityid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $db, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','severitylist.html');
$t->set_block('content','row','rows');
@@ -111,7 +111,7 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_SEVERITY);
+ $nr = $db->getOne("select count(*) from ".TBL_SEVERITY);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -122,14 +122,14 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query('select s.severity_id, severity_name, severity_desc,'.
+ $rs = $db->limitQuery('select s.severity_id, severity_name, severity_desc,'.
' severity_color, sort_order, count(bug_id) as bug_count from '.TBL_SEVERITY.
' s left join '.TBL_BUG.' using (severity_id) group by s.severity_id,'.
' severity_name, severity_desc, severity_color, sort_order'.
- " order by $order $sort", $selrange, $llimit);
+ " order by $order $sort", $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['noseverities']}</td></tr>");
return;
}
@@ -144,7 +144,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
((++$i % 2 == 0) ? '#dddddd' : ''),
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- status.php 5 Mar 2002 23:54:15 -0000 1.22
+++ status.php 17 Mar 2002 01:38:31 -0000 1.23
@@ -26,24 +26,24 @@
include '../include.php';
function del_item($statusid = 0) {
- global $q, $me;
+ global $db, $me;
if ($statusid) {
// Make sure we are going after a valid record
- $itemexists = $q->grab_field('select count(*) from '.TBL_STATUS.
+ $itemexists = $db->getOne('select count(*) from '.TBL_STATUS.
" where status_id = $statusid");
// Are there any bugs tied to this one?
- $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
" where status_id = $statusid");
if ($itemexists and !$bugcount) {
- $q->query('delete from '.TBL_STATUS." where status_id = $statusid");
+ $db->query('delete from '.TBL_STATUS." where status_id = $statusid");
}
}
header("Location: $me?");
}
function do_form($statusid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $db, $me, $_pv, $STRING;
extract($_pv);
$error = '';
@@ -55,11 +55,11 @@
if ($error) { list_items($statusid, $error); return; }
if (!$statusid) {
- $q->query("insert into ".TBL_STATUS.
+ $db->query("insert into ".TBL_STATUS.
" (status_id, status_name, status_desc, sort_order) values (".
- $q->nextid(TBL_STATUS).", '$fname', '$fdescription', '$fsortorder')");
+ $db->nextId(TBL_STATUS).", '$fname', '$fdescription', '$fsortorder')");
} else {
- $q->query("update ".TBL_STATUS.
+ $db->query("update ".TBL_STATUS.
" set status_name = '$fname', status_desc = '$fdescription',
sort_order = '$fsortorder' where status_id = '$statusid'");
}
@@ -67,11 +67,11 @@
}
function show_form($statusid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
extract($_pv);
if ($statusid && !$error) {
- $row = $q->grab("select * from ".TBL_STATUS.
+ $row = $db->getRow("select * from ".TBL_STATUS.
" where status_id = '$statusid'");
$t->set_var(array(
'action' => $STRING['edit'],
@@ -92,7 +92,7 @@
function list_items($statusid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $db, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','statuslist.html');
$t->set_block('content','row','rows');
@@ -108,7 +108,7 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_STATUS);
+ $nr = $db->getOne("select count(*) from ".TBL_STATUS);
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -119,12 +119,12 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query('select s.status_id, status_name, status_desc,'.
+ $rs = $db->limitQuery('select s.status_id, status_name, status_desc,'.
' sort_order, count(bug_id) as bug_count from '.TBL_STATUS.' s left join '.
TBL_BUG.' using (status_id) group by s.status_id, status_name, status_desc,'.
- " sort_order order by $order $sort", $selrange, $llimit);
+ " sort_order order by $order $sort", $llimit, $selrange);
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</td></tr>");
return;
}
@@ -138,7 +138,7 @@
sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- user.php 6 Mar 2002 04:17:54 -0000 1.40
+++ user.php 17 Mar 2002 01:38:31 -0000 1.41
@@ -26,7 +26,7 @@
include '../include.php';
function do_form($userid = 0) {
- global $q, $me, $_pv, $STRING, $now, $u;
+ global $db, $me, $_pv, $STRING, $now, $u;
$error = '';
// Validation
@@ -52,8 +52,8 @@
if (!$userid) {
if (ENCRYPT_PASS) $mpassword = md5($_pv['fpassword']);
else $mpassword = $_pv['fpassword'];
- $new_user_id = $q->nextid(TBL_AUTH_USER);
- $q->query('insert into '.TBL_AUTH_USER
+ $new_user_id = $db->nextId(TBL_AUTH_USER);
+ $db->query('insert into '.TBL_AUTH_USER
." (user_id, first_name, last_name, login, email, password, active,
created_by, created_date, last_modified_by, last_modified_date)
values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
@@ -63,19 +63,19 @@
if (isset($_pv['fusergroup']) and is_array($_pv['fusergroup']) and
$_pv['fusergroup'][0]) {
foreach ($_pv['fusergroup'] as $group) {
- $q->query("insert into ".TBL_USER_GROUP
+ $db->query("insert into ".TBL_USER_GROUP
." (user_id, group_id, created_by, created_date)
values ('$new_user_id' ,'$group', $u, $now)");
}
}
// And add to the user group
- $q->query("insert into ".TBL_USER_GROUP.
+ $db->query("insert into ".TBL_USER_GROUP.
" (user_id, group_id, created_by, created_date)
select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP.
" where group_name = 'User'");
} else {
if (ENCRYPT_PASS) {
- $oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
+ $oldpass = $db->getOne("select password from ".TBL_AUTH_USER
." where user_id = $userid");
if ($oldpass != $_pv['fpassword']) {
$pquery = "password = '".md5($_pv['fpassword'])."',";
@@ -85,19 +85,17 @@
} else {
$pquery = "password = '{$_pv['fpassword']}',";
}
- $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
+ $db->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
last_name = '{$_pv['flastname']}', login = '$login',
email = '{$_pv['femail']}', $pquery active = {$_pv['factive']}
where user_id = '$userid'");
// Update group memberships
// Get user's groups (without dropping the user group)
- $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
- .TBL_AUTH_GROUP.' g using (group_id) '
+ $user_groups = $db->getCol('select ug.group_id from '.
+ TBL_USER_GROUP.' ug left join '.TBL_AUTH_GROUP.' g using (group_id) '
." where user_id = $userid and group_name <> 'User'");
- while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
+
// Compute differences between old and new
if (!isset($user_groups) or !is_array($user_groups)) {
$user_groups = array();
@@ -112,13 +110,13 @@
if (count($remove_from)) {
foreach ($remove_from as $group) {
- $q->query('delete from '.TBL_USER_GROUP
+ $db->query('delete from '.TBL_USER_GROUP
." where user_id = $userid and group_id = $group");
}
}
if (count($add_to)) {
foreach ($add_to as $group) {
- $q->query("insert into ".TBL_USER_GROUP
+ $db->query("insert into ".TBL_USER_GROUP
." (user_id, group_id, created_by, created_date)
values ('$userid' ,'$group', $u, $now)");
}
@@ -128,17 +126,15 @@
}
function show_form($userid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $db, $me, $t, $_pv, $STRING;
if ($userid && !$error) {
- $row = $q->grab("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
+ $row = $db->getRow("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
// Get user's groups
- $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
- while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
+ $user_groups = $db->getCol('select group_id from '.TBL_USER_GROUP.
+ " where user_id = {$row['user_id']}");
$t->set_var(array(
'action' => $STRING['edit'],
@@ -151,7 +147,7 @@
'factive' => $row['active'] ? 'checked' : '',
'fusergroup' => build_select('group', $user_groups),
// Whether or not this user has admin rights
- 'hadadmin' => $q->grab_field('select count(*) from '.TBL_USER_GROUP.
+ 'hadadmin' => $db->getOne('select count(*) from '.TBL_USER_GROUP.
" where user_id = {$row['user_id']} and group_id = 1")
));
} else {
@@ -176,7 +172,7 @@
));
}
// The number of admins in the system
- $t->set_var('numadmins', $q->grab_field('select count(*) from '.TBL_USER_GROUP.
+ $t->set_var('numadmins', $db->getOne('select count(*) from '.TBL_USER_GROUP.
' where group_id = 1'));
// Show the login field only if login is not tied to email address
@@ -188,7 +184,7 @@
}
function list_items($userid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $db, $t, $_gv, $STRING, $TITLE;
$t->set_file('content', 'userlist.html');
$t->set_block('content', 'row', 'rows');
@@ -211,7 +207,7 @@
case 2 : $filter_query = ' where active = 0'; break;
default : $filter_query = '';
}
- $nr = $q->grab_field("select count(*) from ".TBL_AUTH_USER.$filter_query);
+ $nr = $db->getOne("select count(*) from ".TBL_AUTH_USER.$filter_query);
list($selrange, $llimit, $npages, $pages) = multipages($nr, $page,
"order=$order&sort=$sort&filter=$user_filter");
@@ -222,9 +218,9 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select user_id, first_name, last_name,
+ $rs = $db->limitQuery("select user_id, first_name, last_name,
email, login, created_date, active from ".TBL_AUTH_USER
- ."$filter_query order by $order $sort", $selrange, $llimit);
+ ."$filter_query order by $order $sort", $llimit, $selrange);
$headers = array(
'userid' => 'user_id',
@@ -237,11 +233,11 @@
sorting_headers($me, $headers, $order, $sort, "page=$page&filter=$user_filter");
- if (!$q->num_rows()) {
+ if (!$rs->numRows()) {
$t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
} else {
$i = 0;
- while ($row = $q->grab()) {
+ while ($rs->fetchInto($row)) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:36:46
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv3329
Modified Files:
functions.php
Log Message:
Added concat function for using PEAR::DB
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- functions.php 5 Mar 2002 23:55:28 -0000 1.6
+++ functions.php 17 Mar 2002 01:36:43 -0000 1.7
@@ -356,3 +356,22 @@
}
return $js;
}
+
+///
+/// Database concat
+function db_concat() {
+ $pieces = func_get_args();
+
+ switch(DB_TYPE) {
+ case 'mysql' : $retstr = 'concat('. delimit_list(', ', $pieces).')'; break;
+ case 'pgsql' :
+ case 'oci8' :
+ case 'sybase' :
+ case 'ibase' : $retstr = delimit_list(' || ', $pieces); break;
+ case 'fbsql' : $retstr = 'CONCAT('. delimit_list(', ', $pieces).')'; break;
+ default : $retstr = delimit_list(' + ', $pieces); break;
+ }
+ return $retstr
+}
+
+?>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-17 01:36:16
|
Update of /cvsroot/phpbt/phpbt/schemas
In directory usw-pr-cvs1:/tmp/cvs-serv3189
Modified Files:
mysql.in oci8.in pgsql.in
Log Message:
Changes for PEAR::DB -- completely untested. :)
Index: mysql.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mysql.in 26 Jan 2002 16:59:20 -0000 1.15
+++ mysql.in 17 Mar 2002 01:36:08 -0000 1.16
@@ -3,15 +3,6 @@
#
# $Id$
-CREATE TABLE TBL_ACTIVE_SESSIONS (
- sid varchar(32) NOT NULL default '',
- name varchar(32) NOT NULL default '',
- val text,
- changed varchar(14) NOT NULL default '',
- PRIMARY KEY (name,sid),
- KEY changed (changed)
-) TYPE=MyISAM;
-
CREATE TABLE TBL_ATTACHMENT (
attachment_id int(10) unsigned NOT NULL default '0',
bug_id int(10) unsigned NOT NULL default '0',
@@ -148,12 +139,6 @@
PRIMARY KEY (varname)
) TYPE=MyISAM;
-CREATE TABLE TBL_DB_SEQUENCE (
- seq_name varchar(127) NOT NULL default '',
- nextid int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (seq_name)
-) TYPE=MyISAM;
-
CREATE TABLE TBL_GROUP_PERM (
group_id int(10) unsigned NOT NULL default '0',
perm_id int(10) unsigned NOT NULL default '0',
@@ -261,13 +246,15 @@
(user_id, login, first_name, last_name, email, password)
values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL',
'OPTION_ADMIN_PASS');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_USER', 1);
+create table TBL_AUTH_USER_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_AUTH_USER_seq values (1);
# Start off with three user levels...
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_GROUP', 3);
+create table TBL_AUTH_GROUP_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_AUTH_GROUP_seq values (3);
# ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
@@ -333,7 +320,8 @@
INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/');
INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/');
INSERT INTO TBL_OS VALUES (31,'other',31,'');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_OS', 31);
+create table TBL_OS_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_OS_seq values (31);
INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1);
INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It\'s not a bug -- it\'s a feature!',2);
@@ -341,7 +329,8 @@
INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We\'ll get around to it later',4);
INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can\'t replicate the bug',5);
INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_RESOLUTION', 6);
+create table TBL_RESOLUTION_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_RESOLUTION_seq values (6);
INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada');
INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0');
@@ -350,7 +339,8 @@
INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa');
INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0');
INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_SEVERITY', 7);
+create table TBL_SEVERITY_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_SEVERITY_seq values (7);
INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1);
INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2);
@@ -359,5 +349,6 @@
INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5);
INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_STATUS', 7);
+create table TBL_STATUS_seq (id int unsigned auto_increment not null primary key);
+insert into TBL_STATUS_seq values (7);
Index: oci8.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/oci8.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- oci8.in 15 Mar 2002 23:05:46 -0000 1.1
+++ oci8.in 17 Mar 2002 01:36:10 -0000 1.2
@@ -1,12 +1,8 @@
-CREATE TABLE TBL_ACTIVE_SESSIONS (
- sid varchar2(32) default '' NOT NULL,
- name varchar2(32) default '' NOT NULL,
- val varchar2(4000) ,
- changed varchar2(14) default '' NOT NULL ,
- PRIMARY KEY (name, sid)
-) ;
-CREATE INDEX CHANGEDIDX ON TBL_ACTIVE_SESSIONS ( changed );
+-- Oracle database creation script
+-- This is a template for install.php -- not for creating the database!
+--
+-- $Id$
CREATE TABLE TBL_ATTACHMENT (
attachment_id number(10) default '0' NOT NULL,
@@ -145,12 +141,6 @@
PRIMARY KEY (varname)
) ;
-CREATE TABLE TBL_DB_SEQUENCE (
- seq_name varchar2(127) default '' NOT NULL,
- nextid number(10) default '0' NOT NULL,
- PRIMARY KEY (seq_name)
-) ;
-
CREATE TABLE TBL_GROUP_PERM (
group_id number(10) default '0' NOT NULL,
perm_id number(10) default '0' NOT NULL,
@@ -263,7 +253,7 @@
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_GROUP', 3);
+CREATE SEQUENCE TBL_AUTH_USER_seq START WITH 1;
-- ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
@@ -329,7 +319,7 @@
INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/');
INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/');
INSERT INTO TBL_OS VALUES (31,'other',31,'');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_OS', 31);
+CREATE SEQUENCE TBL_OS_seq START WITH 31;
INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1);
INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2);
@@ -337,7 +327,7 @@
INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4);
INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5);
INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_RESOLUTION', 6);
+CREATE SEQUENCE TBL_RESOLUTION_seq START WITH 6;
INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada');
INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0');
@@ -346,7 +336,7 @@
INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa');
INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0');
INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_SEVERITY', 7);
+CREATE SEQUENCE TBL_SEVERITY_seq START WITH 7;
INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1);
INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2);
@@ -355,4 +345,4 @@
INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5);
INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_STATUS', 7);
+CREATE SEQUENCE TBL_STATUS_seq START WITH 7;
Index: pgsql.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- pgsql.in 5 Mar 2002 21:52:06 -0000 1.17
+++ pgsql.in 17 Mar 2002 01:36:10 -0000 1.18
@@ -1,8 +1,5 @@
-- PostgreSQL database creation script
--- If you change the database name, make sure you change the DB_DATABASE
--- constant in config.php. Make sure you edit the TBL_AUTH_USER insert below.
---
-- This is a template for install.php -- not for creating the database!
--
-- $Id$
@@ -10,14 +7,6 @@
BEGIN;
-CREATE TABLE TBL_ACTIVE_SESSIONS (
- sid varchar(32) NOT NULL DEFAULT '',
- name varchar(32) NOT NULL DEFAULT '',
- val text,
- changed varchar(14) NOT NULL DEFAULT '',
- PRIMARY KEY (name,sid)
-);
-
CREATE TABLE TBL_ATTACHMENT (
attachment_id INT4 NOT NULL DEFAULT '0',
bug_id INT4 NOT NULL DEFAULT '0',
@@ -151,12 +140,6 @@
PRIMARY KEY (varname)
);
-CREATE TABLE TBL_DB_SEQUENCE (
- seq_name varchar(127) NOT NULL DEFAULT '',
- nextid INT4 NOT NULL DEFAULT '0',
- PRIMARY KEY (seq_name)
-);
-
CREATE TABLE TBL_GROUP_PERM (
group_id INT4 NOT NULL DEFAULT '0',
perm_id INT4 NOT NULL DEFAULT '0',
@@ -261,13 +244,13 @@
(user_id, login, first_name, last_name, email, password)
values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL',
'OPTION_ADMIN_PASS');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_USER', 1);
+CREATE SEQUENCE TBL_AUTH_USER_seq START 1;
-- Start off with three user levels...
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_GROUP', 3);
+CREATE SEQUENCE TBL_AUTH_GROUP_seq START 3;
-- ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
@@ -334,7 +317,7 @@
INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/');
INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/');
INSERT INTO TBL_OS VALUES (31,'other',31,'');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_OS', 31);
+CREATE SEQUENCE TBL_OS_seq START 31;
INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1);
INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It\'s not a bug -- it\'s a feature!',2);
@@ -342,7 +325,7 @@
INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We\'ll get around to it later',4);
INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can\'t replicate the bug',5);
INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_RESOLUTION', 6);
+CREATE SEQUENCE TBL_RESOLUTION_seq START 6;
INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada');
INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0');
@@ -351,7 +334,7 @@
INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa');
INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0');
INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa');
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_SEVERITY', 7);
+CREATE SEQUENCE TBL_SEVERITY_seq START 7;
INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1);
INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2);
@@ -360,7 +343,7 @@
INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5);
INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7);
-INSERT INTO TBL_DB_SEQUENCE values ('TBL_STATUS', 7);
+CREATE SEQUENCE TBL_STATUS_seq START 7;
--
|
|
From: Benjamin C. <bc...@us...> - 2002-03-15 23:05:48
|
Update of /cvsroot/phpbt/phpbt/schemas
In directory usw-pr-cvs1:/tmp/cvs-serv14399/schemas
Added Files:
oci8.in
Log Message:
Oracle schema courtesy of Liam Hoekenga
--- NEW FILE: oci8.in ---
CREATE TABLE TBL_ACTIVE_SESSIONS (
sid varchar2(32) default '' NOT NULL,
name varchar2(32) default '' NOT NULL,
val varchar2(4000) ,
changed varchar2(14) default '' NOT NULL ,
PRIMARY KEY (name, sid)
) ;
CREATE INDEX CHANGEDIDX ON TBL_ACTIVE_SESSIONS ( changed );
CREATE TABLE TBL_ATTACHMENT (
attachment_id number(10) default '0' NOT NULL,
bug_id number(10) default '0' NOT NULL,
file_name varchar2(255) default '' NOT NULL,
description varchar2(255) default '' NOT NULL,
file_size number(20) default '0' NOT NULL,
mime_type varchar2(30) default '' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (attachment_id)
) ;
CREATE TABLE TBL_AUTH_GROUP (
group_id number(10) default '0' NOT NULL,
group_name varchar2(80) default '' NOT NULL,
locked number(1) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
PRIMARY KEY (group_id)
) ;
CREATE TABLE TBL_AUTH_PERM (
perm_id number(10) default '0' NOT NULL,
perm_name varchar2(80) default '' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
PRIMARY KEY (perm_id)
) ;
CREATE TABLE TBL_AUTH_USER (
user_id number(10) default '0' NOT NULL,
login varchar2(40) default '' NOT NULL UNIQUE,
first_name varchar2(40) default '' NOT NULL,
last_name varchar2(40) default '' NOT NULL,
email varchar2(60) default '' NOT NULL,
password varchar2(40) default '' NOT NULL,
active number(3) default '1' ,
bug_list_fields varchar2(4000) default '' ,
created_by number(10) default '0' ,
created_date number(20) default '0' ,
last_modified_by number(10) default '0' ,
last_modified_date number(20) default '0' ,
PRIMARY KEY (user_id)
) ;
CREATE TABLE TBL_BUG (
bug_id number(10) default '0' NOT NULL,
title varchar2(100) default '' NOT NULL,
description varchar2(4000) NOT NULL ,
url varchar2(255) default '' NOT NULL,
severity_id number(3) default '0' NOT NULL,
priority number(3) default '0' NOT NULL,
status_id number(3) default '0' NOT NULL,
resolution_id number(3) default '0' NOT NULL,
assigned_to number(10) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
project_id number(10) default '0' NOT NULL,
version_id number(10) default '0' NOT NULL,
component_id number(10) default '0' NOT NULL,
os_id number(3) default '0' NOT NULL,
browser_string varchar2(255) default '' NOT NULL,
close_date number(20) default '0' NOT NULL,
PRIMARY KEY (bug_id)
) ;
CREATE TABLE TBL_BUG_CC (
bug_id number(10) default '0' NOT NULL,
user_id number(10) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (bug_id ,user_id)
) ;
CREATE TABLE TBL_BUG_GROUP (
bug_id number(10) default '0' NOT NULL,
group_id number(10) default '0' NOT NULL,
PRIMARY KEY (bug_id ,group_id)
) ;
CREATE INDEX GROUPIDX ON TBL_BUG_GROUP ( group_id );
CREATE TABLE TBL_BUG_HISTORY (
bug_id number(10) default '0' NOT NULL,
changed_field varchar2(20) default '' NOT NULL,
old_value varchar2(255) default '' NOT NULL,
new_value varchar2(255) default '' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0'
) ;
CREATE TABLE TBL_BUG_VOTE (
user_id number(10) default '0' NOT NULL,
bug_id number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (user_id , bug_id)
) ;
CREATE INDEX BUGIDX ON TBL_BUG_VOTE ( bug_id );
CREATE TABLE TBL_COMMENT (
comment_id number(10) default '0' NOT NULL,
bug_id number(10) default '0' NOT NULL,
comment_text varchar2(4000) NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (comment_id)
) ;
CREATE TABLE TBL_COMPONENT (
component_id number(10) default '0' NOT NULL,
project_id number(10) default '0' NOT NULL,
component_name varchar2(30) default '' NOT NULL,
component_desc varchar2(4000) NOT NULL,
owner number(10) default '0' NOT NULL,
active number(1) default '1' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
PRIMARY KEY (component_id)
) ;
CREATE TABLE TBL_CONFIGURATION (
varname varchar2(40) default '' NOT NULL,
varvalue varchar2(255) default '' ,
description varchar2(255) default '' NOT NULL,
vartype varchar2(20) default '' NOT NULL,
PRIMARY KEY (varname)
) ;
CREATE TABLE TBL_DB_SEQUENCE (
seq_name varchar2(127) default '' NOT NULL,
nextid number(10) default '0' NOT NULL,
PRIMARY KEY (seq_name)
) ;
CREATE TABLE TBL_GROUP_PERM (
group_id number(10) default '0' NOT NULL,
perm_id number(10) default '0' NOT NULL,
PRIMARY KEY (group_id ,perm_id)
) ;
CREATE INDEX PERMIDX ON TBL_GROUP_PERM ( perm_id );
CREATE TABLE TBL_OS (
os_id number(10) default '0' NOT NULL,
os_name varchar2(30) default '' NOT NULL,
sort_order number(3) default '0' NOT NULL,
regex varchar2(40) default '' ,
PRIMARY KEY (os_id)
) ;
CREATE TABLE TBL_PROJECT (
project_id number(10) default '0' NOT NULL,
project_name varchar2(30) default '' NOT NULL,
project_desc varchar2(4000) NOT NULL,
active number(1) default '1' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
PRIMARY KEY (project_id)
) ;
CREATE TABLE TBL_PROJECT_GROUP (
project_id number(10) default '0' NOT NULL,
group_id number(10) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (project_id ,group_id)
) ;
CREATE INDEX GROUPPROJIDX ON TBL_PROJECT_GROUP ( group_id );
CREATE TABLE TBL_RESOLUTION (
resolution_id number(10) default '0' NOT NULL,
resolution_name varchar2(30) default '' NOT NULL,
resolution_desc varchar2(4000) ,
sort_order number(3) default '0' NOT NULL,
PRIMARY KEY (resolution_id)
) ;
CREATE TABLE TBL_SAVED_QUERY (
saved_query_id number(10) default '0' NOT NULL,
user_id number(10) default '0' NOT NULL,
saved_query_name varchar2(40) default '' NOT NULL,
saved_query_string varchar2(4000) NOT NULL,
PRIMARY KEY (saved_query_id ,user_id)
) ;
CREATE TABLE TBL_SEVERITY (
severity_id number(10) default '0' NOT NULL,
severity_name varchar2(30) default '' NOT NULL,
severity_desc varchar2(4000) NOT NULL,
sort_order number(3) default '0' NOT NULL,
severity_color varchar2(10) default '#FFFFFF' NOT NULL,
PRIMARY KEY (severity_id)
) ;
CREATE TABLE TBL_STATUS (
status_id number(10) default '0' NOT NULL,
status_name varchar2(30) default '' NOT NULL,
status_desc varchar2(4000) NOT NULL ,
sort_order number(3) default '0' NOT NULL,
PRIMARY KEY (status_id)
) ;
CREATE TABLE TBL_USER_GROUP (
user_id number(10) default '0' NOT NULL,
group_id number(10) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (user_id ,group_id)
) ;
CREATE INDEX GROUPUSERIDX ON TBL_USER_GROUP ( group_id );
CREATE TABLE TBL_USER_PERM (
user_id number(10) default '0' NOT NULL,
perm_id number(10) default '0' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
PRIMARY KEY (user_id ,perm_id)
) ;
CREATE INDEX PERMUSERIDX ON TBL_USER_PERM ( perm_id );
CREATE TABLE TBL_VERSION (
version_id number(10) default '0' NOT NULL,
project_id number(10) default '0' NOT NULL,
version_name varchar2(10) default '' NOT NULL,
active number(1) default '1' NOT NULL,
created_by number(10) default '0' NOT NULL,
created_date number(20) default '0' NOT NULL,
last_modified_by number(10) default '0' NOT NULL,
last_modified_date number(20) default '0' NOT NULL,
PRIMARY KEY (version_id)
) ;
INSERT INTO TBL_AUTH_USER
(user_id, login, first_name, last_name, email, password)
values (1, 'OPTION_ADMIN_EMAIL', 'System', 'Admin', 'OPTION_ADMIN_EMAIL',
'OPTION_ADMIN_PASS');
INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_USER', 1);
-- Start off with three user levels...
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1);
INSERT INTO TBL_DB_SEQUENCE values ('TBL_AUTH_GROUP', 3);
-- ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug');
-- Admins can do all the admin stuff and users can edit bugs
INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1);
INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (2, 2);
-- And user_id 1 is an admin and a user
INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 1);
INSERT INTO TBL_USER_GROUP (user_id, group_id) VALUES (1, 2);
INSERT INTO TBL_CONFIGURATION VALUES ('INSTALL_URL','OPTION_INSTALL_URL','The base URL of the phpBugTracker installation','string');
INSERT INTO TBL_CONFIGURATION VALUES ('JPGRAPH_PATH','','If not in the include path','string');
INSERT INTO TBL_CONFIGURATION VALUES ('CVS_WEB','http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/','Location of your cvs web interface (see format_comments() in bug.php)','string');
INSERT INTO TBL_CONFIGURATION VALUES ('ADMIN_EMAIL','OPTION_PHPBT_EMAIL','The email address used in correspondence from the bug tracker','string');
INSERT INTO TBL_CONFIGURATION VALUES ('ENCRYPT_PASS','OPTION_ENCRYPT_PASS','Whether to store passwords encrypted. <b>Warning:</b> Changing this after users have been created will result in their being unable to login.','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('USE_JPGRAPH','','Whether to show some reports as images','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('MASK_EMAIL','1','Should email addresses have . changed to dot and @ changed to at ?','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('HIDE_EMAIL','1','Should email addresses be hidden for those not logged in?','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('USE_SEVERITY_COLOR','1','Should the query list use the severity colors as the row background color (like SourceForge)','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_IS_LOGIN','1','Whether to use email addresses as logins','bool');
INSERT INTO TBL_CONFIGURATION VALUES ('STRICT_UPDATING', '0', 'Only the bug reporter, bug owner, managers, and admins can change a bug', 'bool');
INSERT INTO TBL_CONFIGURATION VALUES ('NEW_ACCOUNTS_DISABLED', '0', 'Only admins can create new user accounts - newaccount.php is disabled', 'bool');
INSERT INTO TBL_CONFIGURATION VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string');
INSERT INTO TBL_CONFIGURATION VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string');
INSERT INTO TBL_CONFIGURATION VALUES ('ATTACHMENT_PATH','attachments','Sub-dir of the INSTALLPATH - Needs to be writeable by the web process','string');
INSERT INTO TBL_CONFIGURATION VALUES ('THEME','default','Which set of templates to use','multi');
INSERT INTO TBL_CONFIGURATION VALUES ('ATTACHMENT_MAX_SIZE','2097152','Maximum size (in bytes) of an attachment. This will not override the settings in php.ini if php.ini has a lower limit.','string');
INSERT INTO TBL_CONFIGURATION VALUES ('DATE_FORMAT','m-d-Y','See the <a href="http://www.php.net/date" target="_new">date page</a> in the PHP manual for more info','string');
INSERT INTO TBL_CONFIGURATION VALUES ('TIME_FORMAT','g:i A','See the <a href="http://www.php.net/date" target="_new">date page</a> in the PHP manual for more info','string');
INSERT INTO TBL_CONFIGURATION VALUES ('LANGUAGE','en','The language file to use for warning and error messages','multi');
INSERT INTO TBL_OS VALUES (1,'All',1,'');
INSERT INTO TBL_OS VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/');
INSERT INTO TBL_OS VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/');
INSERT INTO TBL_OS VALUES (4,'Windows 98',4,'/Mozilla.*\\(Win98.*\\)/');
INSERT INTO TBL_OS VALUES (5,'Windows ME',5,'');
INSERT INTO TBL_OS VALUES (6,'Windows 2000',6,'/Mozilla.*Windows NT 5.*\\)/');
INSERT INTO TBL_OS VALUES (7,'Windows NT',7,'/Mozilla.*\\(Windows.*NT/');
INSERT INTO TBL_OS VALUES (8,'Mac System 7',8,'');
INSERT INTO TBL_OS VALUES (9,'Mac System 7.5',9,'');
INSERT INTO TBL_OS VALUES (10,'Mac System 7.6.1',10,'');
INSERT INTO TBL_OS VALUES (11,'Mac System 8.0',11,'');
INSERT INTO TBL_OS VALUES (12,'Mac System 8.5',12,'/Mozilla.*\\(.*;.*; 68K.*\\)/');
INSERT INTO TBL_OS VALUES (13,'Mac System 8.6',13,'/Mozilla.*\\(.*;.*; PPC.*\\)/');
INSERT INTO TBL_OS VALUES (14,'Mac System 9.0',14,'');
INSERT INTO TBL_OS VALUES (15,'Mac OS X',15,'');
INSERT INTO TBL_OS VALUES (16,'Linux',16,'/Mozilla.*\\(.*;.*; Linux.*\\)/');
INSERT INTO TBL_OS VALUES (17,'BSDI',17,'/Mozilla.*\\(.*;.*; BSD\\/OS.*\\)/');
INSERT INTO TBL_OS VALUES (18,'FreeBSD',18,'/Mozilla.*\\(.*;.*; FreeBSD.*\\)/');
INSERT INTO TBL_OS VALUES (19,'NetBSD',19,'');
INSERT INTO TBL_OS VALUES (20,'OpenBSD',20,'');
INSERT INTO TBL_OS VALUES (21,'AIX',21,'/Mozilla.*\\(.*;.*; AIX.*\\)/');
INSERT INTO TBL_OS VALUES (22,'BeOS',22,'');
INSERT INTO TBL_OS VALUES (23,'HP-UX',23,'/Mozilla.*\\(.*;.*; HP-UX.*\\)/');
INSERT INTO TBL_OS VALUES (24,'IRIX',24,'/Mozilla.*\\(.*;.*; IRIX.*\\)/');
INSERT INTO TBL_OS VALUES (25,'Neutrino',25,'');
INSERT INTO TBL_OS VALUES (26,'OpenVMS',26,'');
INSERT INTO TBL_OS VALUES (27,'OS/2',27,'');
INSERT INTO TBL_OS VALUES (28,'OSF/1',28,'/Mozilla.*\\(.*;.*; OSF.*\\)/');
INSERT INTO TBL_OS VALUES (29,'Solaris',29,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/');
INSERT INTO TBL_OS VALUES (30,'SunOS',30,'/Mozilla.*\\(.*;.*; SunOS.*\\)/');
INSERT INTO TBL_OS VALUES (31,'other',31,'');
INSERT INTO TBL_DB_SEQUENCE values ('TBL_OS', 31);
INSERT INTO TBL_RESOLUTION VALUES (1,'Fixed','Bug was eliminated',1);
INSERT INTO TBL_RESOLUTION VALUES (2,'Not a bug','It''s not a bug -- it''s a feature!',2);
INSERT INTO TBL_RESOLUTION VALUES (3,'Won''t Fix','This bug will stay',3);
INSERT INTO TBL_RESOLUTION VALUES (4,'Deferred','We''ll get around to it later',4);
INSERT INTO TBL_RESOLUTION VALUES (5,'Works for me','Can''t replicate the bug',5);
INSERT INTO TBL_RESOLUTION VALUES (6,'Duplicate','',6);
INSERT INTO TBL_DB_SEQUENCE values ('TBL_RESOLUTION', 6);
INSERT INTO TBL_SEVERITY VALUES (1,'Unassigned','Default bug creation',1,'#dadada');
INSERT INTO TBL_SEVERITY VALUES (2,'Idea','Ideas for further development',2,'#dad0d0');
INSERT INTO TBL_SEVERITY VALUES (3,'Feature Request','Requests for specific features',3,'#dacaca');
INSERT INTO TBL_SEVERITY VALUES (4,'Annoyance','Cosmetic problems or bugs not affecting performance',4,'#dac0c0');
INSERT INTO TBL_SEVERITY VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa');
INSERT INTO TBL_SEVERITY VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0');
INSERT INTO TBL_SEVERITY VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa');
INSERT INTO TBL_DB_SEQUENCE values ('TBL_SEVERITY', 7);
INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1);
INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2);
INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3);
INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4);
INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5);
INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7);
INSERT INTO TBL_DB_SEQUENCE values ('TBL_STATUS', 7);
|
|
From: Benjamin C. <bc...@us...> - 2002-03-14 19:37:50
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv30545/templates/default Modified Files: upgrade.html Log Message: Changes for 0.7.2 Index: upgrade.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/upgrade.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- upgrade.html 13 Mar 2002 17:55:36 -0000 1.6 +++ upgrade.html 14 Mar 2002 19:37:44 -0000 1.7 @@ -6,7 +6,7 @@ <div align="center"> <br> <br> - This script will upgrade your database from version 0.6.x to version 0.7.1 + This script will upgrade your database from version 0.6.x to version 0.7.2 of phpBugTracker. <br> <br> |
|
From: Benjamin C. <bc...@us...> - 2002-03-14 19:37:50
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv30545 Modified Files: CHANGELOG UPGRADING Log Message: Changes for 0.7.2 Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- CHANGELOG 13 Mar 2002 17:55:33 -0000 1.46 +++ CHANGELOG 14 Mar 2002 19:37:44 -0000 1.47 @@ -1,3 +1,6 @@ +-- 0.7.2 -- 14 Mar 2002 +: Bugs were fixed with project restrictions and front-page summary info. + -- 0.7.1 -- 13 Mar 2002 : Bugs were fixed with installation and upgrading. Index: UPGRADING =================================================================== RCS file: /cvsroot/phpbt/phpbt/UPGRADING,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- UPGRADING 13 Mar 2002 17:55:35 -0000 1.8 +++ UPGRADING 14 Mar 2002 19:37:44 -0000 1.9 @@ -1,4 +1,4 @@ -Upgrading from 0.6.x to 0.7.1 +Upgrading from 0.6.x to 0.7.2 ----------------------------- A new table, bug_vote, has been added, and new configuration variables have |
|
From: Benjamin C. <bc...@us...> - 2002-03-14 19:36:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv30101
Modified Files:
include.php
Log Message:
Hopefully the last fix for project restrictions
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- include.php 13 Mar 2002 17:44:02 -0000 1.97
+++ include.php 14 Mar 2002 19:36:00 -0000 1.98
@@ -252,10 +252,13 @@
// Check to see if we have projects that shouldn't be visible to the user
$restricted_projects = '0';
if (!$perm->have_perm('Admin')) {
+ $viewable_projects = delimit_list(',',
+ $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ " where group_id in (".delimit_list(',', $auth->auth['group_ids']).")"));
+ $viewable_projects = $viewable_projects ? $viewable_projects : '0';
$matching_projects = delimit_list(',',
$q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
- " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).
- ") group by project_id"));
+ " where project_id not in ($viewable_projects) group by project_id"));
if ($matching_projects) {
$restricted_projects .= ",$matching_projects";
}
|
|
From: Benjamin C. <bc...@us...> - 2002-03-14 16:08:04
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv31923
Modified Files:
index.php
Log Message:
Fixed a bug with the closed bugs list
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- index.php 5 Mar 2002 22:11:47 -0000 1.17
+++ index.php 14 Mar 2002 16:01:20 -0000 1.18
@@ -133,7 +133,7 @@
}
$q->query('select b.bug_id, title from '.TBL_BUG.' b, '.TBL_BUG_HISTORY.
" h where project_id not in ($restricted_projects) and b.bug_id = h.bug_id".
- " and changed_field = 'Status' and new_value = 'Closed'".
+ " and changed_field = 'status' and new_value = 'Closed'".
' order by h.created_date desc limit 5');
if (!$q->num_rows()) {
$t->set_var('closerows', $STRING['nobugs']);
|
|
From: Benjamin C. <bc...@us...> - 2002-03-13 18:08:17
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv19963
Modified Files:
include.php
Log Message:
Kill runtime quotes and tweak the login form destination
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- include.php 11 Mar 2002 18:22:17 -0000 1.96
+++ include.php 13 Mar 2002 17:44:02 -0000 1.97
@@ -22,6 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
+ini_set("magic_quotes_runtime", 0);
+
// Where are we?
define ('INSTALL_PATH', dirname(__FILE__));
@@ -121,7 +123,8 @@
include INSTALL_PATH.'/languages/'.LANGUAGE.'.php';
$me = $HTTP_SERVER_VARS['PHP_SELF'];
-$me2 = $HTTP_SERVER_VARS['REQUEST_URI'];
+$me2 = !empty($HTTP_SERVER_VARS['REQUEST_URI']) ? $HTTP_SERVER_VARS['REQUEST_URI'] :
+ $HTTP_SERVER_VARS['SCRIPT_NAME'].'?'.$HTTP_SERVER_VARS['QUERY_STRING'];
$selrange = 30;
$now = time();
$_gv =& $HTTP_GET_VARS;
|
|
From: Benjamin C. <bc...@us...> - 2002-03-13 18:08:08
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv23579/templates/default Modified Files: upgrade.html Log Message: Updated for 0.7.1 Index: upgrade.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/upgrade.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- upgrade.html 7 Mar 2002 00:40:30 -0000 1.5 +++ upgrade.html 13 Mar 2002 17:55:36 -0000 1.6 @@ -6,7 +6,7 @@ <div align="center"> <br> <br> - This script will upgrade your database from version 0.6.x to version 0.7.0 + This script will upgrade your database from version 0.6.x to version 0.7.1 of phpBugTracker. <br> <br> |
|
From: Benjamin C. <bc...@us...> - 2002-03-13 18:08:06
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv23579 Modified Files: CHANGELOG UPGRADING Log Message: Updated for 0.7.1 Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- CHANGELOG 6 Mar 2002 00:06:07 -0000 1.45 +++ CHANGELOG 13 Mar 2002 17:55:33 -0000 1.46 @@ -1,4 +1,7 @@ --- 0.7.0 -- +-- 0.7.1 -- 13 Mar 2002 +: Bugs were fixed with installation and upgrading. + +-- 0.7.0 -- 11 Mar 2002 : Removed the requirement for register_globals = on in PHP settings. : Added dynamic select boxes to the bug form for changing component and version information when selecting a different project. Index: UPGRADING =================================================================== RCS file: /cvsroot/phpbt/phpbt/UPGRADING,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- UPGRADING 11 Mar 2002 16:26:11 -0000 1.7 +++ UPGRADING 13 Mar 2002 17:55:35 -0000 1.8 @@ -1,4 +1,4 @@ -Upgrading from 0.6.x to 0.7.0 +Upgrading from 0.6.x to 0.7.1 ----------------------------- A new table, bug_vote, has been added, and new configuration variables have |
|
From: Benjamin C. <bc...@us...> - 2002-03-13 18:08:03
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18994
Modified Files:
install.php
Log Message:
Turn off runtime quotes
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- install.php 13 Mar 2002 16:34:50 -0000 1.13
+++ install.php 13 Mar 2002 17:40:18 -0000 1.14
@@ -31,6 +31,8 @@
$_gv =& $HTTP_GET_VARS;
$_pv =& $HTTP_POST_VARS;
+ini_set("magic_quotes_runtime", 0); // runtime quotes will kill the included sql
+
if (!empty($_pv)) {
$tables = array(
'/^#.*/' => '',
|
|
From: Benjamin C. <bc...@us...> - 2002-03-13 16:49:24
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv4611 Modified Files: se.php Log Message: Index: se.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/se.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- se.php 1 Mar 2002 00:41:31 -0000 1.11 +++ se.php 13 Mar 2002 16:49:20 -0000 1.12 @@ -1,6 +1,6 @@ <?php -// strings-se.php - Swedish strings and titles +// se.php - Swedish strings and titles // Translation by Patrik Grip-Jansson // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group @@ -33,7 +33,7 @@ 'noprojects' => 'Hittade inga projekt', 'totalbugs' => 'Totalt antal buggar', 'giveemail' => 'Skriv in en giltig e-postadress', - 'givelogin' => 'Please enter a login', + 'givelogin' => 'Ange användarnamn', 'loginused' => 'Användarnamnet är redan taget', 'newacctsubject' => 'phpBugTracker inloggning', 'newacctmessage' => "Ditt lösenord i phpBugTracker är %s", @@ -47,8 +47,8 @@ 'noversions' => 'Inga versioner funna', 'nocomponents' => 'Inga komponenter funna', 'nostatuses' => 'Ingen status hittades', - 'noseverities' => 'No severities found', - 'givepassword' => 'Var god skriv in ditt lösenord', + 'noseverities' => 'Inga graderingar funna', + 'givepassword' => 'Skriv in ditt lösenord', 'nousers' => 'Inga användare hittades', 'bugbadperm' => 'Du kan inte ändra på den här buggen', 'bugbadnum' => 'Den buggen existerar inte', @@ -59,21 +59,21 @@ 'dupe_attachment' => 'Den bilagan finns redan med i buggen', 'give_attachment' => 'Ange vilken fil du vill skicka in', 'no_attachment_save_path' => 'Kunde inte hitta någon plats att lagra filen på', - 'attachment_path_not_writeable' => 'Kunde inte spara filen i den angivna sökvägen för sparningar', + 'attachment_path_not_writeable' => 'Kunde inte spara filen på platsen som angivits för fillagring', 'attachment_move_error' => 'Ett fel uppstod när den inskickade filen skulle flyttas', 'bad_attachment' => 'Bilagan existerar inte', 'attachment_too_large' => 'Filen du angav är större än '.number_format(ATTACHMENT_MAX_SIZE).' bytes', - 'bad_permission' => 'Du har inte den behövliga behörigheten för att använda den funktionen', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', - 'previous_bug' => 'Previous', - 'next_bug' => 'Next', - 'already_voted' => 'You have already voted for this bug', - 'too_many_votes' => 'You have reached the maximum number of votes per user', - 'no_votes' => 'There are no votes for this bug', + 'bad_permission' => 'Du har inte behörighet för att använda den funktionen', + 'project_only_all_groups' => 'Du kan inte välja grupper när "Alla grupper" är vald', + 'previous_bug' => 'Föregående', + 'next_bug' => 'Nästa', + 'already_voted' => 'Du har redan röstat på den här buggen', + 'too_many_votes' => 'Du har överskridit maxantal röster per användare', + 'no_votes' => 'Det har inte lagts några röster på denna bugg', 'user_filter' => array( - 0 => 'All users', - 1 => 'Active users', - 2 => 'Inactive users') + 0 => 'Alla användare', + 1 => 'Aktiva användare', + 2 => 'Inaktiva användare') ); // Page titles @@ -93,11 +93,11 @@ 'os' => 'Operativsystem', 'resolution' => 'Uppföljning', 'status' => 'Status', - 'severity' => 'Severity', + 'severity' => 'Gradering', 'user' => 'Användare', 'home' => 'Hem', 'reporting' => 'Rapportering', - 'group' => 'Groups' + 'group' => 'Grupper' ); ?> |
|
From: Benjamin C. <bc...@us...> - 2002-03-13 16:36:31
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv458
Modified Files:
upgrade.php
Log Message:
Argh, problem with query on postgres
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- upgrade.php 11 Mar 2002 16:41:14 -0000 1.9
+++ upgrade.php 13 Mar 2002 16:36:28 -0000 1.10
@@ -29,7 +29,7 @@
global $q;
$upgraded = $q->grab_field('select varvalue from '.TBL_CONFIGURATION.
- ' where varname = "PROMOTE_VOTES"');
+ " where varname = 'PROMOTE_VOTES'");
if (!$upgraded) {
// Add the bug_vote table and insert the new configuration options
if (DB_TYPE == 'pgsql') {
|
|
From: Benjamin C. <bc...@us...> - 2002-03-13 16:34:54
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv32169 Modified Files: install.php Log Message: Fixes a bug reported by drak0 Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- install.php 5 Mar 2002 21:35:32 -0000 1.12 +++ install.php 13 Mar 2002 16:34:50 -0000 1.13 @@ -44,6 +44,7 @@ '/TBL_BUG_CC/' => $_pv['tbl_prefix'].'bug_cc', '/TBL_BUG_GROUP/' => $_pv['tbl_prefix'].'bug_group', '/TBL_BUG_HISTORY/' => $_pv['tbl_prefix'].'bug_history', + '/TBL_BUG_VOTE/' => $_pv['tbl_prefix'].'bug_vote', '/TBL_BUG/' => $_pv['tbl_prefix'].'bug', '/TBL_COMMENT/' => $_pv['tbl_prefix'].'comment', '/TBL_COMPONENT/' => $_pv['tbl_prefix'].'component', |
|
From: Benjamin C. <bc...@us...> - 2002-03-12 20:59:10
|
Update of /cvsroot/phpbt/phpbt/languages
In directory usw-pr-cvs1:/tmp/cvs-serv23477/languages
Added Files:
cz.php
Log Message:
Czech translation from Michal Soukup
--- NEW FILE: cz.php ---
<?php
// strings-cz.php - Czech strings and titles
// ------------------------------------------------------------------------
// Copyright (c) 2001 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
// phpBugTracker is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// phpBugTracker is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
// $Id: cz.php,v 1.1 2002/03/12 20:59:07 bcurtis Exp $
$STRING = array(
'lang_charset' => 'us-ascii',
'nouser' => 'Tento uivatel neexistuje',
'dupeofself' => 'BUG nemùe být shodný se sám se sebou',
'nobug' => 'Tento BUG neexistuje',
'givesummary' => 'Prosím vlote souhrn',
'givedesc' => 'Prosím vlote popis',
'noprojects' => 'Projekt nebyl nalezen',
'totalbugs' => 'Celkovì chyb',
'giveemail' => 'Prosím vlote správnou e-mailovou adresu',
'givelogin' => 'prosím vlote login (uivatelské jméno)',
'loginused' => 'Tento login ji uívá nìkdo jiný',
'newacctsubject' => 'phpBugTracker Pøihláení',
'newacctmessage' => "Váe phpBugTracker heslo je %s",
'nobugs' => 'Nenalezeny ádné chyby',
'givename' => 'Prosím vlote jméno',
'edit' => 'Upravit',
'addnew' => 'Pøidat',
'nooses' => 'Nenalezen OS',
'giveinitversion' => 'Prosím vlote poèáteèní verzi projektu ',
'giveversion' => 'Prosím vlote verzi',
'noversions' => 'Verze nenalezena',
'nocomponents' => 'Komponenta nenalezena',
'nostatuses' => 'Status nebyl nalezen',
'noseverities' => 'Dùleitost nenalezena',
'givepassword' => 'Prosím vlote heslo',
'nousers' => 'Uivatel(é) nenalezen(i)',
'bugbadperm' => 'Nemùete zmìnit BUG',
'bugbadnum' => 'Tenhle BUG neexistuje',
'datecollision' => 'Nìkdo aktualizoval BUG od Vaí poslední návtìvy. Do informací o BUGu byli zaneseny nejnovìjí zmìny',
'passwordmatch' => 'Hesla nesouhlasí --prosím zadejte je znova',
'nobughistory' => 'Tento BUG nemá hystorii',
'logintomodify' => 'Musíte být zalogován pro upravu tohoto BUGu',
'dupe_attachment' => 'Pøíloha pro tento BUG je ji nahrána',
'give_attachment' => 'Prosím vyberte soubor pro upload',
'no_attachment_save_path' => 'Cesta k uloenému souboru nenalezena',
'attachment_path_not_writeable' => 'Nelze vytvoøit soubor na zadané cestì',
'attachment_move_error' => 'Nastala chyba pøi pøesouvání nahraného souboru',
'bad_attachment' => 'Tato pøíloha neexistuje',
'attachment_too_large' => 'Vámi specifikovaný soubor je vìtí ne '.number_format(ATTACHMENT_MAX_SIZE).' bytù',
'bad_permission' => 'Nemáte práva na poadovanou funkci',
'project_only_all_groups' => 'Nelze vybrat specifickou skupoinu kdy jsou vybrány vechny skupiny',
'previous_bug' => 'Pøedchozí',
'next_bug' => 'Následující',
'already_voted' => 'Ji jste hlasoval k tomuto BUGu',
'too_many_votes' => 'Dosáhl jste maximálního poètu hlasù na jednoho uivatele',
'no_votes' => 'Nikdo jetì nehlasoval',
'user_filter' => array(
0 => 'Vichni uivatelé',
1 => 'Aktivní uivatelé',
2 => 'Neaktivní uivatelé')
);
// Page titles
$TITLE = array(
'enterbug' => 'Vlote BUG',
'editbug' => 'Upravte BUG',
'newaccount' => 'Vytvoøit nový úèet',
'bugquery' => 'BUG dotaz',
'buglist' => 'Seznam BUGù',
'addcomponent' => 'Pøidat komponentu',
'editcomponent' => 'Editovat komponentu',
'addproject' => 'Pøidat projekt',
'editproject' => 'Editovat projekt',
'addversion' => 'Pøidat verzi',
'editversion' => 'Upravit verzi',
'project' => 'Projekty',
'os' => 'Operaèní systémy',
'resolution' => 'Rozliení',
'status' => 'Statusy',
'severity' => 'Dùleitosti',
'user' => 'Uivatelé',
'home' => 'Domù',
'reporting' => 'Hláení',
'group' => 'Skupiny'
);
?>
|
|
From: Ben C. <php...@be...> - 2002-03-12 17:56:26
|
Subject line says it all. Feel free to report (or fix) any bugs. :) |