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: Ulf E. <ulf...@us...> - 2005-08-22 21:04:50
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25691/phpbt Modified Files: CHANGELOG Log Message: Updated the CHANGLEOG Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- CHANGELOG 3 Aug 2005 12:32:31 -0000 1.70 +++ CHANGELOG 22 Aug 2005 21:04:39 -0000 1.71 @@ -1,3 +1,12 @@ +-- 1.x -- +: Moved priority levels into a table +: Changed the 'Assignable' bit to a group permission +: Added sort-order to components and versions +: Added support to bookmark/monitor a set of bugs +: Added a simple UI to edit group permissions +: Added support to (re)edit a query +: Added support for sending smtp mail + -- 1.0 -- 3 Aug 2005 : Added links from project summary on home page (Phil Davis). : Added display of the bug ids a bug blocks. |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:54:52
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23647/phpbt Modified Files: bug.php config-dist.php Log Message: Added support to set envelope sender Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.142 retrieving revision 1.143 diff -u -r1.142 -r1.143 --- bug.php 22 Aug 2005 20:50:23 -0000 1.142 +++ bug.php 22 Aug 2005 20:54:43 -0000 1.143 @@ -322,7 +322,7 @@ ($newbug ? 'New' : 'Changed').' - '. stripslashes((!empty($cf['title']) ? $cf['title'] : $buginfo['title']))); if (SMTP_EMAIL) { - $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS); + $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS, SMTP_SENDER); } $mail->send($maillist, SMTP_EMAIL ? 'smtp' : 'mail'); } Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- config-dist.php 22 Aug 2005 20:50:23 -0000 1.33 +++ config-dist.php 22 Aug 2005 20:54:43 -0000 1.34 @@ -78,5 +78,7 @@ define('SMTP_AUTH', false); define('SMTP_AUTH_USER', ""); define('SMTP_AUTH_PASS', ""); +// define('SMTP_SENDER', SMTP_AUTH_USER."@".SMTP_HELO); +define('SMTP_SENDER', null); ?> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:54:52
|
Update of /cvsroot/phpbt/phpbt/inc/htmlMimeMail In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23647/phpbt/inc/htmlMimeMail Modified Files: htmlMimeMail.php smtp.php Log Message: Added support to set envelope sender Index: htmlMimeMail.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/htmlMimeMail/htmlMimeMail.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- htmlMimeMail.php 5 Dec 2004 16:36:14 -0000 1.3 +++ htmlMimeMail.php 22 Aug 2005 20:54:43 -0000 1.4 @@ -1,774 +1,776 @@ -<?php -/** -* Filename.......: class.html.mime.mail.inc -* Project........: HTML Mime mail class -* Last Modified..: Date: 2002/07/24 13:14:10 -* CVS Revision...: Revision: 1.4 -* Copyright......: 2001, 2002 Richard Heyes -*/ - -require_once(dirname(__FILE__) . '/mimePart.php'); - [...1519 lines suppressed...] + + if (!$this->is_built) { + $this->buildMessage(); + } + + // Return path ? + if (isset($this->return_path)) { + $headers[] = 'Return-Path: ' . $this->return_path; + } + + // Get flat representation of headers + foreach ($this->headers as $name => $value) { + $headers[] = $name . ': ' . $value; + } + $headers[] = 'To: ' . implode(', ', $recipients); + + return implode(CRLF, $headers) . CRLF . CRLF . $this->output; + } +} // End of class. +?> Index: smtp.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/htmlMimeMail/smtp.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- smtp.php 25 Oct 2004 12:07:05 -0000 1.2 +++ smtp.php 22 Aug 2005 20:54:43 -0000 1.3 @@ -26,6 +26,7 @@ var $auth; var $user; var $pass; + var $sender; /** * Constructor function. Arguments: @@ -57,6 +58,7 @@ $this->auth = FALSE; $this->user = ''; $this->pass = ''; + $this->sender = null; $this->errors = array(); foreach($params as $key => $value){ @@ -127,7 +129,10 @@ return FALSE; } - $this->mail($this->from); + $envelope_sender = $this->from; + if (!is_null($this->sender)) + $envelope_sender = $this->sender; + $this->mail($envelope_sender); if(is_array($this->recipients)) foreach($this->recipients as $value) $this->rcpt($value); |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:54:52
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23647/phpbt/inc Modified Files: functions.php Log Message: Added support to set envelope sender Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- functions.php 22 Aug 2005 20:50:23 -0000 1.60 +++ functions.php 22 Aug 2005 20:54:43 -0000 1.61 @@ -618,7 +618,7 @@ } if (SMTP_EMAIL) { - $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS); + $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS, SMTP_SENDER); } $retval = $mail->send($recipient, SMTP_EMAIL ? 'smtp' : 'mail'); |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:50:32
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22660/phpbt/inc Modified Files: functions.php Log Message: RFE #1068977 - Add SMTP Server, User and Password Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- functions.php 22 Aug 2005 20:40:08 -0000 1.59 +++ functions.php 22 Aug 2005 20:50:23 -0000 1.60 @@ -592,32 +592,38 @@ } // mailer with use of quoted-printable encoding (if configured so) -function qp_mail($to, $subject = 'No subject', $body, $headers = '') { +function qp_mail($to, $subject = 'No subject', $body, $from = ADMIN_EMAIL) { global $STRING; - $subject="=?".CHARSET."?B?".base64_encode($subject)."?="; + require_once('./inc/htmlMimeMail/htmlMimeMail.php'); + $mail = new htmlMimeMail(); + $mail->setSubject($subject); + $mail->setFrom($from); + $recipient[] = $to; - if ($headers != '') { - $headers .= "\n"; - // There have to be no newline at the end of $headers + if (SEND_MIME_EMAIL) { + // If configured to send MIME encoded emails + if (false/*HTML_EMAIL*/) { + $mail->setHtmlEncoding("quoted-printable"); + $mail->setHtml($body); + } + else { + $mail->setTextEncoding("quoted-printable"); + $mail->setText($body); + } } - - if (false/*HTML_EMAIL*/) { - $headers .= "Content-Type: text/html; charset=\"".CHARSET."\"\r\nContent-Transfer-Encoding: "; - } else { - $headers .= "Content-Type: text/plain; charset=\"".CHARSET."\"\r\nContent-Transfer-Encoding: "; + else { + $mail->setTextEncoding("8bit"); + $mail->setText($body); } - // If configured to send MIME encoded emails - if (SEND_MIME_EMAIL) { - $retval = mail ($to, $subject, qp_enc($body), $headers. - "quoted-printable\nMIME-Version: 1.0"); - } else { - $retval = mail ($to, $subject, $body, $headers. - "8bit"); + if (SMTP_EMAIL) { + $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS); } - // Returns true if mail is eccepted for delivery, otherwise return false + $retval = $mail->send($recipient, SMTP_EMAIL ? 'smtp' : 'mail'); + + // Returns true if mail is accepted for delivery, otherwise return false return ($retval); } |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:50:31
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22660/phpbt Modified Files: bug.php config-dist.php include.php newaccount.php Log Message: RFE #1068977 - Add SMTP Server, User and Password Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.141 retrieving revision 1.142 diff -u -r1.141 -r1.142 --- bug.php 22 Aug 2005 20:30:56 -0000 1.141 +++ bug.php 22 Aug 2005 20:50:23 -0000 1.142 @@ -321,7 +321,10 @@ $mail->setSubject("[Bug {$buginfo['bug_id']}] ". ($newbug ? 'New' : 'Changed').' - '. stripslashes((!empty($cf['title']) ? $cf['title'] : $buginfo['title']))); - $mail->send($maillist); + if (SMTP_EMAIL) { + $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS); + } + $mail->send($maillist, SMTP_EMAIL ? 'smtp' : 'mail'); } } Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- config-dist.php 22 Aug 2005 20:30:56 -0000 1.32 +++ config-dist.php 22 Aug 2005 20:50:23 -0000 1.33 @@ -71,4 +71,12 @@ define('PEAR_PATH', '{PEAR_PATH}'); // Set this to '/some/path/' to not use system-wide PEAR require_once (dirname(__FILE__).'/inc/auth.php'); +define('SMTP_EMAIL', false); +define('SMTP_HOST', "localhost"); +define('SMTP_PORT', 25); +define('SMTP_HELO', null); +define('SMTP_AUTH', false); +define('SMTP_AUTH_USER', ""); +define('SMTP_AUTH_PASS', ""); + ?> Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.138 retrieving revision 1.139 diff -u -r1.138 -r1.139 --- include.php 22 Aug 2005 20:44:16 -0000 1.138 +++ include.php 22 Aug 2005 20:50:23 -0000 1.139 @@ -193,7 +193,7 @@ qp_mail($email, translate("phpBugTracker Login"), sprintf(translate("Your phpBugTracker password is %s"), $password), - sprintf("From: %s", ADMIN_EMAIL)); + ADMIN_EMAIL); $t->assign('loginerror', '<div class="result">'.translate("Your password has been emailed to you").'</div>'); $emailsuccess = true; Index: newaccount.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- newaccount.php 25 Oct 2004 12:06:58 -0000 1.33 +++ newaccount.php 22 Aug 2005 20:50:23 -0000 1.34 @@ -64,7 +64,7 @@ qp_mail($_POST['email'], translate("phpBugTracker Login"), sprintf(translate("Your phpBugTracker password is %s"), $password), - sprintf("From: %s", ADMIN_EMAIL)); + ADMIN_EMAIL); $t->render('newaccountsuccess.html', translate("New account created")); } @@ -72,6 +72,8 @@ function show_form($error = '') { global $t, $_POST; + $t->assign('error', $error); + if (NEW_ACCOUNTS_DISABLED) { $t->render('newaccount-disabled.html'); } else { |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:44:23
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21276/phpbt Modified Files: include.php query.php Log Message: RFE #784058 - show number of comments, attachments and/or votes in buglist Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.137 retrieving revision 1.138 diff -u -r1.137 -r1.138 --- include.php 22 Aug 2005 20:30:56 -0000 1.137 +++ include.php 22 Aug 2005 20:44:16 -0000 1.138 @@ -109,7 +109,10 @@ 'component_name' => 'Component', 'os_name' => 'OS', 'browser_string' => 'Browser', - 'close_date' => 'Closed Date' + 'close_date' => 'Closed Date', + 'comments' => 'Comments', + 'attachments' => 'Attachments', + 'votes' => 'Votes' ); $default_db_fields = array('bug_id', 'title', 'reporter', 'owner', Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- query.php 22 Aug 2005 20:40:08 -0000 1.104 +++ query.php 22 Aug 2005 20:44:16 -0000 1.105 @@ -298,7 +298,10 @@ 'component_name' => 'component.component_name', 'os_name' => 'os.os_name', 'browser_string' => 'browser_string', - 'close_date' => 'close_date' + 'close_date' => 'close_date', + 'comments' => 'count(distinct comment.comment_id) as comments', + 'attachments' => 'count(distinct attachment.attachment_id) as attachments', + 'votes' => 'count(distinct vote.user_id) as votes' ); $db_headers = array( @@ -324,7 +327,10 @@ 'site_name' => 'site.sort_order', 'browser_string' => 'browser_string', 'resolution_name' => 'resolution.sort_order', - 'close_date' => 'close_date' + 'close_date' => 'close_date', + 'comments' => 'comments', + 'attachments' => 'attachments', + 'votes' => 'votes' ); extract($_GET); @@ -348,7 +354,7 @@ $order = $_SESSION['queryinfo']['order']; $sort = $_SESSION['queryinfo']['sort']; } else { - $order = 'bug_id'; + $order = 'b.bug_id'; $sort = 'asc'; } } |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:44:23
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21276/phpbt/inc/db Modified Files: mysql.php Log Message: RFE #784058 - show number of comments, attachments and/or votes in buglist Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- mysql.php 22 Aug 2005 20:30:56 -0000 1.24 +++ mysql.php 22 Aug 2005 20:44:16 -0000 1.25 @@ -77,11 +77,17 @@ 'and b.component_id = c.component_id and b.project_id = p.project_id '. 'and b.status_id = st.status_id', 'bug-prev-next' => 'select b.bug_id, reporter.login as reporter, '. - 'owner.login as owner '. + 'owner.login as owner, '. + 'count(distinct comment.comment_id) as comments, '. + 'count(distinct attachment.attachment_id) as attachments, '. + 'count(distinct vote.user_id) as votes '. '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 '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. @@ -157,6 +163,9 @@ '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 '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_COMMENT.' comment on b.bug_id = comment.bug_id '. + 'left join '.TBL_ATTACHMENT.' attachment on b.bug_id = attachment.bug_id '. + 'left join '.TBL_BUG_VOTE.' vote on b.bug_id = vote.bug_id '. 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:40:16
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20444/phpbt Modified Files: query.php Log Message: RFE #711560 - Edit query capability Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- query.php 22 Aug 2005 20:30:56 -0000 1.103 +++ query.php 22 Aug 2005 20:40:08 -0000 1.104 @@ -35,7 +35,7 @@ } } -function show_query() { +function show_query($edit = false) { global $db, $t, $u; if ($u != 'nobody') { @@ -44,6 +44,39 @@ $db->getAll("select * from ".TBL_SAVED_QUERY." where user_id = '$u'")); } + if ($edit) { + extract($_GET); + $t->assign('project', isset($projects) ? $projects : null); + $t->assign('version', isset($versions) ? $versions : null); + $t->assign('component', isset($components) ? $components : null); + $t->assign('status', isset($status) ? $status : null); + $t->assign('resolution', isset($resolution) ? $resolution : null); + $t->assign('os', isset($os) ? $os : null); + $t->assign('priority', isset($priority) ? $priority : null); + $t->assign('severity', isset($severity) ? $severity : null); + $t->assign('database', isset($database) ? $database : null); + $t->assign('site', isset($site) ? $site : null); + $t->assign('emailsearch1', isset($emailsearch1) ? $emailsearch1 : null); + $t->assign('closedinversion', isset($closedinversion) ? $closedinversion : null); + $t->assign('tobeclosedinversion', isset($tobeclosedinversion) ? $tobeclosedinversion : null); + $t->assign('order', isset($order) ? $order : null); + $t->assign('sort', isset($sort) ? $sort : null); + $t->assign('emailsearch1', isset($emailsearch1) ? $emailsearch1 : null); + $t->assign('email1', isset($email1) ? $email1 : null); + $t->assign('emailtype1', isset($emailtype1) ? $emailtype1 : null); + $t->assign('emailfield1', isset($emailfield1) ? $emailfield1 : null); + $t->assign('title', isset($title) ? $title : null); + $t->assign('title_type', isset($title_type) ? $title_type : null); + $t->assign('description', isset($description) ? $description : null); + $t->assign('description_type', isset($description_type) ? $description_type : null); + $t->assign('url', isset($url) ? $url : null); + $t->assign('url_type', isset($url_type) ? $url_type : null); + $t->assign('start_date', isset($start_date) ? $start_date : null); + $t->assign('end_date', isset($end_date) ? $end_date : null); + $t->assign('closed_start_date', isset($closed_start_date) ? $closed_start_date : null); + $t->assign('closed_end_date', isset($closed_end_date) ? $closed_end_date : null); + } + // Show the advanced query form if (!empty($_GET['form']) and $_GET['form'] == 'advanced') { $t->render('queryform.html', translate("Query Bugs")); @@ -125,7 +158,7 @@ } // Email field(s) - if (!empty($email1)) { + if (!empty($email1) && !empty($emailfield1)) { switch($emailtype1) { case 'like' : $econd = "like '%$email1%'"; break; case 'rlike' : @@ -425,6 +458,7 @@ if ($auth->is_authenticated()) list_items($assignedto, $reportedby, $open, $bookmarked); else show_query(); break; + case 'edit' : show_query(true); break; default : show_query(); break; } else list_items($assignedto, $reportedby, $open, $bookmarked); |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:40:16
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20444/phpbt/inc Modified Files: functions.php Log Message: RFE #711560 - Edit query capability Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- functions.php 22 Aug 2005 20:21:42 -0000 1.58 +++ functions.php 22 Aug 2005 20:40:08 -0000 1.59 @@ -107,8 +107,7 @@ break; case 'group': if ($project) { // If we are building for project admin page - if (is_array($selected) && (!count($selected) or (count($selected) && in_array(0, $selected))) or - !isset($selected) or $selected == 0) { + if (!is_array($selected) or !count($selected) or (count($selected) && in_array(0, $selected))) { $sel = ' selected'; } else { $sel = ''; @@ -138,8 +137,10 @@ case 'version': $rs = $db->query($queries[$box]); while ($rs->fetchInto($row)) { - if ($selected == $row[$box.'_id'] and $selected != '') { + if (is_array($selected) && count($selected) && in_array($row[$box.'_id'], $selected)) { $sel = ' selected'; + } elseif ($selected == $row[$box.'_id'] and $selected != '') { + $sel = ' selected'; } else { $sel = ''; } @@ -153,6 +154,8 @@ if ($selected == '' and isset($row['Regex']) and preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) { $sel = ' selected'; + } elseif (is_array($selected) && count($selected) && in_array($row[$box.'_id'], $selected)) { + $sel = ' selected'; } elseif ($selected == $row[$box.'_id']) { $sel = ' selected'; } else { @@ -166,7 +169,7 @@ $rs = $db->query("select DISTINCT u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_GROUP_PERM." gp, ".TBL_AUTH_PERM." p where u.active > 0 and u.user_id = ug.user_id and ug.group_id = gp.group_id and gp.perm_id = p.perm_id and p.perm_name = 'Assignable' order by login"); while ($rs->fetchInto($row)) { // either singular matches, or array matches are acceptable - if (($selected == $row['user_id']) || (is_array($selected) && in_array($row['user_id'], $selected))) { + if (($selected == $row['user_id']) || (is_array($selected) && count($selected) && in_array($row['user_id'], $selected))) { $sel = ' selected'; } else { $sel = ''; @@ -285,7 +288,9 @@ default : $deadarray = $select[$box]; while(list($val,$item) = each($deadarray)) { - if ($selected == $val and $selected != '') { + if (is_array($selected) && count($selected) && in_array($val, $selected)) { + $sel = ' selected'; + } elseif ($selected == $val and $selected != '') { $sel = ' selected'; } else { $sel = ''; |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:40:16
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20444/phpbt/templates/default Modified Files: buglist.html queryform-simple.html queryform.html Log Message: RFE #711560 - Edit query capability Index: buglist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/buglist.html,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- buglist.html 22 Aug 2005 19:44:47 -0000 1.15 +++ buglist.html 22 Aug 2005 20:40:08 -0000 1.16 @@ -20,7 +20,7 @@ <?php foreach ($bugs[$i] as $var => $val) { if ($var == 'bug_link_id') $bugid = $val; - elseif ($var != 'severity_color') echo '<td>'.format_bug_col($val, $var, $bugid, $i).'</td>'; + elseif ($var != 'severity_color' && $var != 'priority_color') echo '<td>'.format_bug_col($val, $var, $bugid, $i).'</td>'; } ?> </tr> @@ -33,3 +33,19 @@ <a href="query.php?xl=1"><?php echo translate("Download to spreadsheet"); ?></a> </div> <?php } ?> +<div align="left"> + <a href="query.php?op=edit<?php + $paramstr = ''; + foreach ($_GET as $k => $v) { + $$k = $v; + if ($k == 'op') continue; + if (is_array($v)) { + foreach ($v as $value) { + $paramstr .= "&{$k}[]=$value"; + } + } else { + $paramstr .= "&$k=$v"; + } + } + echo $paramstr; ?>"><?php echo translate("Edit this query"); ?></a> +</div> Index: queryform-simple.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform-simple.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- queryform-simple.html 22 Aug 2005 19:44:47 -0000 1.13 +++ queryform-simple.html 22 Aug 2005 20:40:08 -0000 1.14 @@ -51,7 +51,7 @@ <td valign="top"> <select name="projects" onChange="updateMenus(this.form)"> <option value=''><?php echo translate("All"); ?></option> - <?php build_select('project'); ?> + <?php build_select('project', $project); ?> </select> </td> </tr> @@ -60,6 +60,7 @@ <td valign="top"> <select name="versions"> <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('version', $version, $project); ?> </select> </td> </tr> @@ -68,6 +69,7 @@ <td valign="top"> <select name="components"> <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('component', $component, $project); ?> </select> </td> </tr> @@ -75,7 +77,7 @@ <td valign="top"><b><?php echo translate("Status"); ?>:</b></td> <td valign="top"> <select name="status[]" multiple size="7"> - <?php build_select('status'); ?> + <?php build_select('status', $status); ?> </select> </td> </tr> @@ -83,25 +85,25 @@ <td valign="top"><b><?php echo translate("Sort by"); ?>:</b></td> <td valign="top"> <select name="order"> - <option value="bug_id"> + <option <?php if ($order == 'bug_id') echo "selected"; ?> value="bug_id"> <?php echo translate("Bug number"); ?> </option> - <option selected value="severity.sort_order"> + <option <?php if (!$order || $order == 'severity.sort_order') echo "selected"; ?> value="severity.sort_order"> <?php echo translate("Severity"); ?> </option> - <option value="reporter"> + <option <?php if ($order == 'reporter') echo "selected"; ?> value="reporter"> <?php echo translate("Reporter"); ?> </option> - <option value="status.sort_order"> + <option <?php if ($order == 'status.sort_order') echo "selected"; ?> value="status.sort_order"> <?php echo translate("Status"); ?> </option> - <option value="priority.sort_order"> + <option <?php if ($order == 'priority') echo "selected"; ?> value="priority.sort_order"> <?php echo translate("Priority"); ?> </option> </select> <select name="sort"> - <option selected value="asc"><?php echo translate("Ascending"); ?></option> - <option value="desc"><?php echo translate("Descending"); ?></option> + <option <?php if (!$sort || $sort == 'asc') echo "selected"; ?> value="asc"><?php echo translate("Ascending"); ?></option> + <option <?php if ($sort == 'desc') echo "selected"; ?> value="desc"><?php echo translate("Descending"); ?></option> </select> </td> </tr> @@ -119,6 +121,12 @@ <input type="hidden" name="savedqueryoverride" value="0"> <input type="reset" value="<?php echo translate("Reset to default query"); ?>"> <input type="submit"> + </form> + + <form method="get" name="clear" action="query.php"> + <input type="hidden" name="op" value="query"> + <input type="submit" value="<?php echo translate("Clear All Fields"); ?>"> + </form> <?php if ($querycount) { ?> <br><br> <b><?php echo translate("Saved Queries"); ?></b> @@ -134,6 +142,5 @@ ?> <?php } ?> - </form> <br> <a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=query&form=advanced"><?php echo translate("Go to the advanced query page"); ?></a> Index: queryform.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform.html,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- queryform.html 22 Aug 2005 19:44:47 -0000 1.23 +++ queryform.html 22 Aug 2005 20:40:08 -0000 1.24 @@ -67,35 +67,35 @@ </tr><tr> <td align="left" valign="top"> <select name="status[]" multiple size="7"> - <?php echo build_select('status'); ?> + <?php echo build_select('status', $status); ?> </select> </td> <td align="left" valign="top"> <select name="resolution[]" multiple size="7"> <option value="0"><?php echo translate("None"); ?></option> - <?php build_select('resolution'); ?> + <?php build_select('resolution', $resolution); ?> </select> </td> <td align="left" valign="top"> <select name="os[]" multiple size="7"> - <?php build_select('os'); ?> + <?php build_select('os', $os); ?> </select> </td> <td align="left" valign="top"> <select name="priority[]" multiple size="7"> - <?php build_select('priority'); ?> + <?php build_select('priority', $priority); ?> </select></td> <td align="left" valign="top"> <select name="severity[]" multiple size="7"> - <?php build_select('severity'); ?> + <?php build_select('severity', $severity); ?> </select></td> <td align="left" valign="top"> <select name="database[]" multiple size="7"> - <?php build_select('database'); ?> + <?php build_select('database', $database); ?> </select></td> <td align="left" valign="top"> <select name="site[]" multiple size="7"> - <?php build_select('site'); ?> + <?php build_select('site', $site); ?> </select></td> </tr> </table> @@ -108,22 +108,23 @@ <tr> <td rowspan="2" valign="top"> <select name="emailsearch1"> - <option value="email"><?php echo translate("Email"); ?></option> - <option value="login"><?php echo translate("Login"); ?></option> + <option <?php if (!$emailsearch1 || $emailsearch1 == 'email') echo "selected"; ?> value="email"><?php echo translate("Email"); ?></option> + <option <?php if ($emailsearch1 == 'login') echo "selected"; ?> value="login"><?php echo translate("Login"); ?></option> </select>: - <input name="email1" size="30" value=""> <?php echo translate("matching as"); ?> ++ <input name="email1" size="30" value="<?php echo $email1; ?>"> <?php echo translate("matching as"); ?> <select name="emailtype1"> - <option value="rlike"><?php echo translate("regexp"); ?></option> - <option value="not rlike"><?php echo translate("not regexp"); ?></option> - <option selected value="like"><?php echo translate("substring"); ?></option> - <option value="="><?php echo translate("exact"); ?></option> + <option <?php if ($emailtype1 == 'rlike') echo "selected"; ?> value="rlike"><?php echo translate("regexp"); ?></option> + <option <?php if ($emailtype1 == 'not rlike') echo "selected"; ?> value="not rlike"><?php echo translate("not regexp"); ?></option> + <option <?php if (!$emailtype1 || $emailtype1 == 'like') echo "selected"; ?> value="like"><?php echo translate("substring"); ?></option> + <option <?php if ($emailtype1 == '=') echo "selected"; ?> value="="><?php echo translate("exact"); ?></option> </select></td> - <td><input type="checkbox" - name="emailfield1[]" value="owner" - checked><?php echo translate("Assigned To"); ?></td> + <td><input type="checkbox" name="emailfield1[]" value="owner" + <?php if (!$emailfield1 || (count($emailfield1) && in_array("owner", $emailfield1))) echo "checked"; ?>> + <?php echo translate("Assigned To"); ?></td> </tr><tr> - <td><input type="checkbox" name="emailfield1[]" - value="reporter"><?php echo translate("Reporter"); ?></td> + <td><input type="checkbox" name="emailfield1[]" value="reporter" + <?php if (count($emailfield1) && in_array("reporter", $emailfield1)) echo "checked"; ?>> + <?php echo translate("Reporter"); ?></td> </tr> </table></td> </tr> @@ -133,45 +134,45 @@ <table border="0"> <tr> <td align="right"><?php echo translate("Summary"); ?>:</td> - <td><input name="title" size="30" value=""></td> + <td><input name="title" size="30" value="<?php echo $title; ?>"></td> <td><select name="title_type"> - <option value="like" selected><?php echo translate("substring"); ?></option> - <option value="rlike"><?php echo translate("regexp"); ?></option> - <option value="not rlike"><?php echo translate("not regexp"); ?></option> + <option value="like" <?php if (!$title_type || $title_type == 'like') echo "selected"; ?>><?php echo translate("substring"); ?></option> + <option value="rlike" <?php if ($title_type == 'rlike') echo "selected"; ?>><?php echo translate("regexp"); ?></option> + <option value="not rlike" <?php if ($title_type == 'not rlike') echo "selected"; ?>><?php echo translate("not regexp"); ?></option> </select></td> </tr><tr> <td align="right"><?php echo translate("A description entry"); ?>:</td> - <td><input name="description" size="30" value=""></td> + <td><input name="description" size="30" value="<?php echo $description; ?>"></td> <td><select name="description_type"> - <option value="like" selected><?php echo translate("substring"); ?></option> - <option value="rlike"><?php echo translate("regexp"); ?></option> - <option value="not rlike"><?php echo translate("not regexp"); ?></option> + <option value="like" <?php if (!$description_type || $description_type == 'like') echo "selected"; ?>><?php echo translate("substring"); ?></option> + <option value="rlike" <?php if ($description_type == 'rlike') echo "selected"; ?>><?php echo translate("regexp"); ?></option> + <option value="not rlike" <?php if ($description_type == 'not rlike') echo "selected"; ?>><?php echo translate("not regexp"); ?></option> </select></td> </tr><tr> <td align="right"><?php echo translate("URL"); ?>:</td> - <td><input name="url" size="30" value=""></td> + <td><input name="url" size="30" value="<?php echo $url; ?>"></td> <td><select name="url_type"> - <option value="like" selected><?php echo translate("substring"); ?></option> - <option value="rlike"><?php echo translate("regexp"); ?></option> - <option value="not rlike"><?php echo translate("not regexp"); ?></option> + <option value="like" <?php if (!$url_type || $url_type == 'like') echo "selected"; ?>><?php echo translate("substring"); ?></option> + <option value="rlike" <?php if ($url_type == 'rlike') echo "selected"; ?>><?php echo translate("regexp"); ?></option> + <option value="not rlike" <?php if ($url_type == 'not rlike') echo "selected"; ?>><?php echo translate("not regexp"); ?></option> </select></td> </tr><tr> <td align="right"> <?php echo translate("Created Date Range"); ?>: </td> <td colspan="2"> - <input type="text" name="start_date" size="11"> + <input type="text" name="start_date" size="11" value="<?php echo $start_date; ?>"> <?php echo translate("to"); ?> - <input type="text" name="end_date" size="11"> + <input type="text" name="end_date" size="11" value="<?php echo $end_date; ?>"> </td> </tr><tr> <td align="right"> <?php echo translate("Closed Date Range"); ?>: </td> <td colspan="2"> - <input type="text" name="closed_start_date" size="11"> + <input type="text" name="closed_start_date" size="11" value="<?php echo $closed_start_date; ?>"> <?php echo translate("to"); ?> - <input type="text" name="closed_end_date" size="11"> + <input type="text" name="closed_end_date" size="11" value="<?php echo $closed_end_date; ?>"> </td> </tr> </table> @@ -181,37 +182,64 @@ <td><b><?php echo translate("Project"); ?>:</b></td> <td><select name="projects" onChange="updateMenus(this.form)"> <option value=''><?php echo translate("All"); ?></option> - <?php build_select('project'); ?> + <?php build_select('project', $project); ?> </select> </td> </tr><tr> <td><b><?php echo translate("Version"); ?>:</b></td> - <td><select name="versions"><option value=''><?php echo translate("All"); ?></option></select></td> + <td><select name="versions"> + <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('version', $version, $project); ?> + </select> + </td> </tr><tr> <td><b><?php echo translate("Closed in Version"); ?>:</b></td> - <td><select name="closedinversion"><option value=''><?php echo translate("All"); ?></option></select></td> + <td><select name="closedinversion"> + <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('version', $closedinversion, $project); ?> + </select> + </td> </tr><tr> <td><b><?php echo translate("To be Closed in Version"); ?>:</b></td> - <td><select name="tobeclosedinversion"><option value=''><?php echo translate("All"); ?></option></select></td> + <td><select name="tobeclosedinversion"> + <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('version', $tobeclosedinversion, $project); ?> + </select> + </td> </tr><tr> <td><b><?php echo translate("Component"); ?>:</b></td> - <td><select name="components"><option value=''><?php echo translate("All"); ?></option></select></td> + <td><select name="components"> + <option value=''><?php echo translate("All"); ?></option> + <?php if ($project) build_select('component', $component, $project); ?> + </select> + </td> </tr> </table> <hr align="left" width="100%"> <input type="hidden" name="op" value="doquery"> + <input type="hidden" name="form" value="advanced"> <input type="hidden" name="savedqueryoverride" value="0"> <b><?php echo translate("Sort By"); ?>:</b> <select name="order"> - <option value="bug_id"><?php echo translate("Bug number"); ?></option> - <option selected value="severity.sort_order"><?php echo translate("Severity"); ?></option> - <option value="reporter.login"><?php echo translate("Reporter"); ?></option> - <option value="status.sort_order"><?php echo translate("Status"); ?></option> - <option value="priority.sort_order"><?php echo translate("Priority"); ?></option> + <option <?php if ($order == 'bug_id') echo "selected"; ?> value="bug_id"> + <?php echo translate("Bug number"); ?> + </option> + <option <?php if (!$order || $order == 'severity.sort_order') echo "selected"; ?> value="severity.sort_order"> + <?php echo translate("Severity"); ?> + </option> + <option <?php if ($order == 'reporter') echo "selected"; ?> value="reporter"> + <?php echo translate("Reporter"); ?> + </option> + <option <?php if ($order == 'status.sort_order') echo "selected"; ?> value="status.sort_order"> + <?php echo translate("Status"); ?> + </option> + <option <?php if ($order == 'priority') echo "selected"; ?> value="priority"> + <?php echo translate("Priority"); ?> + </option> </select> <select name="sort"> - <option selected value="asc"><?php echo translate("Ascending"); ?></option> - <option value="desc"><?php echo translate("Descending"); ?></option> + <option <?php if (!$sort || $sort == 'asc') echo "selected"; ?> value="asc"><?php echo translate("Ascending"); ?></option> + <option <?php if ($sort == 'desc') echo "selected"; ?> value="desc"><?php echo translate("Descending"); ?></option> </select> </nobr> <br><br> @@ -223,6 +251,14 @@ <?php } ?> <input type="reset" value="<?php echo translate("Reset to default query"); ?>"> <input type="submit"> +</form> + +<form method="get" name="clear" action="query.php"> + <input type="hidden" name="op" value="query"> + <input type="hidden" name="form" value="advanced"> + <input type="submit" value="<?php echo translate("Clear All Fields"); ?>"> +</form> + <?php if ($querycount) { ?> <br><br> <b><?php echo translate("Saved Queries"); ?></b> @@ -238,6 +274,5 @@ ?> <?php } ?> -</form> <br> <a href="query.php?op=query"><?php echo translate("Go to the simple query page"); ?></a> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:31:05
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18132/phpbt/inc/db Modified Files: mysql.php Log Message: Added support to bookmark/monitor a set of bugs Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- mysql.php 22 Aug 2005 20:21:42 -0000 1.23 +++ mysql.php 22 Aug 2005 20:30:56 -0000 1.24 @@ -67,20 +67,22 @@ '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 '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. - TBL_PRIORITY.' priority, '.TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. 'where bug_id = %s and b.project_id not in (%s) '. + TBL_PRIORITY.' priority, '.TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. 'where b.bug_id = %s and b.project_id not in (%s) '. 'and b.severity_id = sv.severity_id '. 'and b.priority = priority.priority_id '. 'and b.os_id = os.os_id and b.version_id = v.version_id '. 'and b.component_id = c.component_id and b.project_id = p.project_id '. 'and b.status_id = st.status_id', - 'bug-prev-next' => 'select bug_id, reporter.login as reporter, '. + 'bug-prev-next' => 'select b.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 '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -95,17 +97,19 @@ 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id and %s '. 'and b.site_id = site.site_id '. - 'and bug_id <> %s '. - 'order by %s %s, bug_id asc', + 'and b.bug_id <> %s '. + 'GROUP BY b.bug_id '. + 'order by %s %s, b.bug_id asc', 'bug-show-bug' => '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 '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_SITE.' site, '. TBL_PRIORITY.' prio '. - 'where bug_id = %s and b.project_id not in (%s) '. + 'where b.bug_id = %s and b.project_id not in (%s) '. 'and b.site_id = site.site_id '. 'and b.severity_id = sv.severity_id and b.status_id = st.status_id ', 'and b.priority = prio.priority_id', @@ -118,6 +122,10 @@ 'where active = 1 and (pg.project_id is null or pg.group_id in (%s)) '. 'group by p.project_id, p.project_name '. 'order by project_name', + 'include-template-bookmark' => "SELECT sum(CASE WHEN s.status_id in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". + "sum(CASE WHEN s.status_id not in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) ". + "from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id), ". + TBL_BOOKMARK." w where w.user_id=%s AND w.bug_id = b.bug_id", 'include-template-owner' => "SELECT sum(CASE WHEN s.status_id ". "in (".OPEN_BUG_STATUSES.") THEN 1 ELSE 0 END ) , ". "sum(CASE WHEN s.status_id ". @@ -141,13 +149,15 @@ 'query-list-bugs-count' => '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 ', + 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id ', 'query-list-bugs-count-join' => 'where ', 'query-list-bugs' => 'select %s '. '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 '. 'left join '.TBL_AUTH_USER.' lastmodifier on b.last_modified_by = lastmodifier.user_id '. + 'left join '.TBL_BOOKMARK.' bookmark on b.bug_id = bookmark.bug_id '. 'left join '.TBL_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id '. 'left join '.TBL_DATABASE.' on b.database_id = '.TBL_DATABASE.'.database_id '. 'left join '.TBL_VERSION.' version2 on b.to_be_closed_in_version_id = version2.version_id '. @@ -161,7 +171,8 @@ 'and b.site_id = site.site_id and b.version_id = version.version_id '. 'and b.component_id = component.component_id '. 'and b.project_id = project.project_id %s '. - 'order by %s %s, bug_id asc', + 'GROUP BY b.bug_id '. + 'order by %s %s, b.bug_id asc', 'report-resbyeng-1' => 'select email as "Assigned To", '. 'sum(case when resolution_id = 0 then 1 else 0 end) as "Open"', 'report-resbyeng-2' => "select resolution_name, ", |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:31:05
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18132/phpbt/templates/default Modified Files: bugdisplay.html wrap.html Log Message: Added support to bookmark/monitor a set of bugs Index: bugdisplay.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- bugdisplay.html 20 Jul 2005 18:12:34 -0000 1.49 +++ bugdisplay.html 22 Aug 2005 20:30:56 -0000 1.50 @@ -235,6 +235,11 @@ </table> </form> <div align="center" class="bugdisplaylinks"> +<?php if (!$already_bookmarked) { ?> + <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=addbookmark&bugid=<?php echo $bug_id; ?>"><?php echo translate("Bookmark this bug"); ?></a></b> | +<?php } else { ?> + <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=delbookmark&bugid=<?php echo $bug_id; ?>"><?php echo translate("Remove bookmark for this bug"); ?></a></b> | +<?php } ?> <?php if (!empty($error['vote'])) echo "<div class=\"error\">{$error['vote']}</div>" ?> <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=vote&bugid=<?php echo $bug_id; ?>" onClick="if (<?php echo $already_voted; ?>) { alert ('<?php echo translate("You have already voted for this bug"); ?>'); return false; }"><?php echo translate("Vote for this bug"); ?></a></b> | <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=viewvotes&bugid=<?php echo $bug_id; ?>"><?php echo translate("View votes"); ?> (<?php echo $num_votes; ?>)</a></b> | Index: wrap.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/wrap.html,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- wrap.html 20 Jul 2005 18:01:34 -0000 1.31 +++ wrap.html 22 Aug 2005 20:30:56 -0000 1.32 @@ -50,6 +50,7 @@ <?php } else { ?> <?php echo translate("Bugs assigned to me"); ?>: <a href="query.php?op=mybugs&assignedto=1&open=1" title="Open"><?php echo $owner_open ?></a> / <a href="query.php?op=mybugs&assignedto=1&open=0" title="Closed"><?php echo $owner_closed ?></a> | <?php echo translate("Bugs reported by me"); ?>: <a href="query.php?op=mybugs&reportedby=1&open=1" title="Open"><?php echo $reporter_open ?></a> / <a href="query.php?op=mybugs&reportedby=1&open=0" title="Closed"><?php echo $reporter_closed ?></a> + | <?php echo translate("Bookmarked bugs"); ?>: <a href="query.php?op=mybugs&bookmarked=1&open=1" title="Open"><?php echo $bookmarks_open ?></a> / <a href="query.php?op=mybugs&bookmarked=1&open=0" title="Closed"><?php echo $bookmarks_closed ?></a> | <a href="user.php"><?php echo translate("Personal Page"); ?></a> | <a href="logout.php"><?php echo translate("Logout"), " ", $_SESSION["uname"]; ?></a> <?php } ?> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:31:05
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18132/phpbt Modified Files: bug.php config-dist.php include.php install.php query.php Log Message: Added support to bookmark/monitor a set of bugs Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.140 retrieving revision 1.141 diff -u -r1.140 -r1.141 --- bug.php 22 Aug 2005 19:44:46 -0000 1.140 +++ bug.php 22 Aug 2005 20:30:56 -0000 1.141 @@ -75,6 +75,33 @@ } /// +/// Add (or remove) a bookmark for this bug +function bookmark_bug($bug_id, $add) { + global $u, $db, $now; + + if ($add) { + // Check that the user hasn't bookmarked this bug + if (!$db->getOne("select count(*) from ".TBL_BOOKMARK." where bug_id = $bug_id and user_id = $u")) { + // Add bookmark + $db->query("insert into ".TBL_BOOKMARK." (user_id, bug_id) values ($u, $bug_id)"); + } + } + else { + // Check that the user has bookmarked this bug + if ($db->getOne("select count(*) from ".TBL_BOOKMARK." where bug_id = $bug_id and user_id = $u")) { + // Remove bookmark + $db->query("delete from ".TBL_BOOKMARK." where user_id=$u and bug_id=$bug_id"); + } + } + if (isset($_POST['pos'])) { + $posinfo = "&pos={$_POST['pos']}"; + } else { + $posinfo = ''; + } + header("Location: bug.php?op=show&bugid=$bug_id$posinfo"); +} + +/// /// Beautify the bug comments function format_comments($comments) { global $me; @@ -638,6 +665,7 @@ $t->assign(array( 'error' => $error, 'already_voted' => $db->getOne("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bugid and user_id = $u"), + 'already_bookmarked' => $db->getOne("select count(*) from ".TBL_BOOKMARK." where bug_id = $bugid and user_id = $u"), 'num_votes' => $db->getOne("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bugid"), 'bug_dependencies' => $bug_dependencies, 'bug_blocks' => $bug_blocks @@ -720,6 +748,12 @@ case 'viewvotes': vote_view(check_id($_GET['bugid'])); break; + case 'addbookmark': + bookmark_bug(check_id($_GET['bugid']), true); + break; + case 'delbookmark': + bookmark_bug(check_id($_GET['bugid']), false); + break; } } else { header("Location: query.php"); Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- config-dist.php 22 Aug 2005 19:44:46 -0000 1.31 +++ config-dist.php 22 Aug 2005 20:30:56 -0000 1.32 @@ -64,6 +64,7 @@ define ('TBL_PROJECT_PERM', TBL_PREFIX.'project_perm'); define ('TBL_DATABASE', TBL_PREFIX.'database_server'); define ('TBL_SITE', TBL_PREFIX.'site'); +define ('TBL_BOOKMARK', TBL_PREFIX.'bookmark'); define ('ONEDAY', 86400); Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.136 retrieving revision 1.137 diff -u -r1.136 -r1.137 --- include.php 22 Aug 2005 19:44:46 -0000 1.136 +++ include.php 22 Aug 2005 20:30:56 -0000 1.137 @@ -220,11 +220,15 @@ $db->getRow(sprintf($QUERY['include-template-owner'], $u), DB_FETCHMODE_ORDERED); list($reporter_open, $reporter_closed) = $db->getRow(sprintf($QUERY['include-template-reporter'], $u), DB_FETCHMODE_ORDERED); + list($bookmarks_open, $bookmarks_closed) = + $db->getRow(sprintf($QUERY['include-template-bookmark'], $u), DB_FETCHMODE_ORDERED); $t->assign(array( 'owner_open' => $owner_open ? $owner_open : 0, 'owner_closed' => $owner_closed ? $owner_closed : 0, 'reporter_open' => $reporter_open ? $reporter_open : 0, 'reporter_closed' => $reporter_closed ? $reporter_closed : 0, + 'bookmarks_open' => $bookmarks_open ? $bookmarks_open : 0, + 'bookmarks_closed' => $bookmarks_closed ? $bookmarks_closed : 0, 'perm' => $perm, )); } Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- install.php 22 Aug 2005 19:44:46 -0000 1.49 +++ install.php 22 Aug 2005 20:30:56 -0000 1.50 @@ -125,6 +125,7 @@ '/TBL_PROJECT_PERM/' => $_POST['tbl_prefix'].'project_perm', '/TBL_DATABASE/' => $_POST['tbl_prefix'].'database_server', '/TBL_SITE/' => $_POST['tbl_prefix'].'site', + '/TBL_BOOKMARK/' => $_POST['tbl_prefix'].'bookmark', '/OPTION_ADMIN_EMAIL/' => $_POST['admin_login'], '/OPTION_ADMIN_PASS/' => $_POST['encrypt_pass'] ? md5($_POST['admin_pass']) : $_POST['admin_pass'], '/OPTION_PHPBT_EMAIL/' => $_POST['phpbt_email'], Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.102 retrieving revision 1.103 diff -u -r1.102 -r1.103 --- query.php 22 Aug 2005 19:44:46 -0000 1.102 +++ query.php 22 Aug 2005 20:30:56 -0000 1.103 @@ -53,7 +53,7 @@ } -function build_query($assignedto, $reportedby, $open) { +function build_query($assignedto, $reportedby, $open, $bookmarked) { global $db, $perm, $restricted_projects; $paramstr = ''; @@ -70,11 +70,13 @@ } // Open bugs assigned to the user -- a hit list - if ($assignedto || $reportedby) { + if ($assignedto || $reportedby || $bookmarked) { $query[] = 'b.status_id '.($open ? '' : 'not '). 'in ('.OPEN_BUG_STATUSES.')'; if ($assignedto) { $query[] = "assigned_to = {$_SESSION['uid']}"; + } else if ($bookmarked) { + $query[] = "b.bug_id = bookmark.bug_id AND bookmark.user_id = {$_SESSION['uid']}"; } else { $query[] = "b.created_by = {$_SESSION['uid']}"; } @@ -237,11 +239,11 @@ } } -function list_items($assignedto = 0, $reportedby = 0, $open = 0) { +function list_items($assignedto = 0, $reportedby = 0, $open = 0, $bookmarked = 0) { global $me, $db, $t, $select, $u, $default_db_fields, $all_db_fields, $QUERY; $query_db_fields = array( - 'bug_id' => 'bug_id', + 'bug_id' => 'b.bug_id', 'title' => 'title', 'description' => 'description', 'url' => 'url', @@ -267,7 +269,7 @@ ); $db_headers = array( - 'bug_id' => 'bug_id', + 'bug_id' => 'b.bug_id', 'title' => 'title', 'description' => 'description', 'url' => 'url', @@ -327,13 +329,13 @@ if (empty($_SESSION['queryinfo']['query']) or isset($op)) { list($_SESSION['queryinfo']['query'], $paramstr) = - build_query($assignedto, $reportedby, $open); + build_query($assignedto, $reportedby, $open, $bookmarked); } $desired_fields = !empty($_SESSION['db_fields']) ? $_SESSION['db_fields'] : $default_db_fields; - $query_fields = array('bug_id as bug_link_id', + $query_fields = array('b.bug_id as bug_link_id', 'severity.severity_color', 'priority.priority_color'); foreach ($desired_fields as $field) { $query_fields[] = $query_db_fields[$field]; @@ -400,6 +402,7 @@ $reportedby = !empty($_GET['reportedby']) ? $_GET['reportedby'] : 0; $assignedto = !empty($_GET['assignedto']) ? $_GET['assignedto'] : 0; $open = !empty($_GET['open']) ? $_GET['open'] : 0; +$bookmarked = !empty($_GET['bookmarked']) ? $_GET['bookmarked'] : 0; // Make sure the page variable is numeric, if it's populated if (!empty($_GET['page'])) $_GET['page'] = preg_replace('/[^0-9]/', '', $_GET['page']); @@ -419,11 +422,11 @@ else show_query(); break; case 'mybugs' : - if ($auth->is_authenticated()) list_items($assignedto, $reportedby, $open); + if ($auth->is_authenticated()) list_items($assignedto, $reportedby, $open, $bookmarked); else show_query(); break; default : show_query(); break; } -else list_items($assignedto, $reportedby, $open); +else list_items($assignedto, $reportedby, $open, $bookmarked); ?> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:31:05
|
Update of /cvsroot/phpbt/phpbt/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18132/phpbt/schemas Modified Files: mysql.in Log Message: Added support to bookmark/monitor a set of bugs Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- mysql.in 22 Aug 2005 20:21:42 -0000 1.48 +++ mysql.in 22 Aug 2005 20:30:56 -0000 1.49 @@ -287,6 +287,11 @@ PRIMARY KEY (site_id) ) TYPE=MyISAM; +CREATE TABLE TBL_BOOKMARK ( + user_id int(10) unsigned NOT NULL default '0', + bug_id int(10) unsigned NOT NULL default '0' +) TYPE=MyISAM; + # # -- Insert initial data -- # |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:21:51
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589/phpbt/inc Modified Files: functions.php Log Message: Added sort_order to TBL_COMPONENT and TBL_VERSION Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- functions.php 22 Aug 2005 20:11:49 -0000 1.57 +++ functions.php 22 Aug 2005 20:21:42 -0000 1.58 @@ -88,8 +88,8 @@ " and ". ($selected ? " (active > 0 or project_id in (".$db->quote($selected)."))" : 'active > 0'). " order by {$box}_name", - 'component' => $querystart." where project_id = ".$db->quote($project)." and active = 1 order by {$box}_name", - 'version' => $querystart." where project_id = ".$db->quote($project)." and active = 1 order by {$box}_id desc", + 'component' => $querystart." where project_id = ".$db->quote($project)." and active = 1 order by sort_order, {$box}_name", + 'version' => $querystart." where project_id = ".$db->quote($project)." and active = 1 order by sort_order, {$box}_id desc", 'database' => $querystart.$querymid ); } |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:21:51
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589/phpbt/templates/default/admin Modified Files: component-edit.html project-add.html project-edit.html version-edit.html Log Message: Added sort_order to TBL_COMPONENT and TBL_VERSION Index: component-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/component-edit.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- component-edit.html 20 Jul 2005 18:01:35 -0000 1.9 +++ component-edit.html 22 Aug 2005 20:21:42 -0000 1.10 @@ -53,6 +53,14 @@ </td> </tr> <tr> + <td align="right" valign="top"> + <?php echo translate("Sort Order"); ?>: + </td> + <td> + <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> + </td> + </tr> + <tr> <td valign="top"> <?php echo translate("Active"); ?>: </td> Index: project-add.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-add.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- project-add.html 20 Jul 2005 18:01:35 -0000 1.8 +++ project-add.html 22 Aug 2005 20:21:42 -0000 1.9 @@ -90,10 +90,21 @@ </tr> <tr> <td valign="top"> + <table> + <tr> + <td> <?php echo translate("Initial Version"); ?>: <br> <input type="text" size="30" maxlength="30" name="version_name" value="<?php echo stripslashes(htmlspecialchars($version_name)); ?>"> </td> + <td> + <?php echo translate("Sort Order"); ?>: + <br> + <input type="text" size="3" maxlength="3" name="version_sortorder" value="<?php echo $version_sortorder; ?>"> + </td> + </tr> + </table> + </td> </tr> </table> </td> @@ -110,10 +121,20 @@ </tr> <tr> <td valign="top"> + <table> + <tr> + <td> <?php echo translate("Initial Component Name"); ?>: <br> <input type="text" size="30" maxlength="30" name="component_name" value="<?php echo stripslashes(htmlspecialchars($component_name)); ?>"> </td> + <td> + <?php echo translate("Sort Order"); ?>: + <br> + <input type="text" size="3" maxlength="3" name="component_sortorder" value="<?php echo $component_sortorder; ?>"> + </td> + </tr> + </table> </tr> <tr> <td valign="top"> Index: project-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-edit.html,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- project-edit.html 25 Oct 2004 12:07:03 -0000 1.14 +++ project-edit.html 22 Aug 2005 20:21:42 -0000 1.15 @@ -101,6 +101,7 @@ <th><?php echo translate("Version"); ?></th> <th><?php echo translate("Created"); ?></th> <th><?php echo translate("Active"); ?></th> + <th><?php echo translate("Sort Order"); ?></th> <th><?php echo translate("Delete"); ?></th> </tr> <?php for ($i = 0, $count = count($versions); $i < $count; $i++) { ?> @@ -108,6 +109,7 @@ <td><a href="project.php?op=edit_version&id=<?php echo $versions[$i]['version_id']; ?>" onClick="popupVersion(<?php echo $versions[$i]['version_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($versions[$i]['version_name'])); ?></a></td> <td align="center"><?php echo date(DATE_FORMAT, $versions[$i]['created_date']); ?></td> <td align="center"><?php echo $versions[$i]['active'] ? translate("Yes") : translate("No"); ?></td> + <td align="center"><?php echo $versions[$i]['sort_order']; ?></td> <td align="center"><?php if(!$versions[$i]['bug_count']) { ?><a href="project.php?op=del_version&id=<?php echo $versions[$i]['version_id']; ?>&project_id=<?php echo $project_id; ?>"><?php echo translate("Delete"); ?></a><?php } ?></td> </tr> <?php } ?> @@ -127,6 +129,7 @@ <th><?php echo translate("Component"); ?></th> <th><?php echo translate("Created"); ?></th> <th><?php echo translate("Active"); ?></th> + <th><?php echo translate("Sort Order"); ?></th> <th><?php echo translate("Delete"); ?></th> </tr> <?php for ($i = 0, $count = count($components); $i < $count; $i++) { ?> @@ -134,6 +137,7 @@ <td><a href="project.php?op=edit_component&id=<?php echo $components[$i]['component_id']; ?>" onClick="popupComponent(<?php echo $components[$i]['component_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($components[$i]['component_name'])); ?></a></td> <td align="center"><?php echo date(DATE_FORMAT, $components[$i]['created_date']); ?></td> <td align="center"><?php echo $components[$i]['active'] ? translate("Yes") : translate("No"); ?></td> + <td align="center"><?php echo $components[$i]['sort_order']; ?></td> <td align="center"><?php if(!$components[$i]['bug_count']) { ?><a href="project.php?op=del_component&id=<?php echo $components[$i]['component_id']; ?>&project_id=<?php echo $project_id; ?>"><?php echo translate("Delete"); ?></a><?php } ?></td> </tr> <?php } ?> Index: version-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/version-edit.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- version-edit.html 20 Jul 2005 18:01:35 -0000 1.9 +++ version-edit.html 22 Aug 2005 20:21:42 -0000 1.10 @@ -29,6 +29,14 @@ </td> </tr> <tr> + <td align="right" valign="top"> + <?php echo translate("Sort Order"); ?>: + </td> + <td> + <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> + </td> + </tr> + <tr> <td valign="top"> <?php echo translate("Active"); ?>: </td> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:21:51
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589/phpbt/admin Modified Files: project.php Log Message: Added sort_order to TBL_COMPONENT and TBL_VERSION Index: project.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- project.php 25 Oct 2004 12:06:59 -0000 1.47 +++ project.php 22 Aug 2005 20:21:42 -0000 1.48 @@ -52,10 +52,11 @@ extract($_POST); if (!isset($active)) $active = 0; + if (empty($sort_order)) $sort_order = 0; if (!$version_id) { - $db->query('insert into '.TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$db->nextId(TBL_VERSION).", $project_id, ".$db->quote(stripslashes($version_name)).", $active, $u, $now)"); + $db->query('insert into '.TBL_VERSION." (version_id, project_id, version_name, active, sort_order, created_by, created_date) values (".$db->nextId(TBL_VERSION).", $project_id, ".$db->quote(stripslashes($version_name)).", $active, $sort_order, $u, $now)"); } else { - $db->query('update '.TBL_VERSION." set project_id = $project_id, version_name = ".$db->quote(stripslashes($version_name)).", active = $active where version_id = '$version_id'"); + $db->query('update '.TBL_VERSION." set project_id = $project_id, version_name = ".$db->quote(stripslashes($version_name)).", active = $active, sort_order = $sort_order where version_id = '$version_id'"); } if ($use_js) { $t->render('edit-submit.html'); @@ -111,10 +112,11 @@ extract($_POST); if (!$owner) $owner = 0; if (!$active) $active = 0; + if (empty($sort_order)) $sort_order = 0; if (!$component_id) { - $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 (".$db->nextId(TBL_COMPONENT).", $project_id, ".$db->quote(stripslashes($component_name)).", ".$db->quote(stripslashes($component_desc)).", $owner, $active, $u, $now, $u, $now)"); + $db->query('insert into '.TBL_COMPONENT." (component_id, project_id, component_name, component_desc, owner, active, sort_order, created_by, created_date, last_modified_by, last_modified_date) values (".$db->nextId(TBL_COMPONENT).", $project_id, ".$db->quote(stripslashes($component_name)).", ".$db->quote(stripslashes($component_desc)).", $owner, $active, $sort_order, $u, $now, $u, $now)"); } else { - $db->query('update '.TBL_COMPONENT." set component_name = ".$db->quote(stripslashes($component_name)).', component_desc = '.$db->quote(stripslashes($component_desc)).", owner = $owner, active = $active, last_modified_by = $u, "."last_modified_date = $now where component_id = $component_id"); + $db->query('update '.TBL_COMPONENT." set component_name = ".$db->quote(stripslashes($component_name)).', component_desc = '.$db->quote(stripslashes($component_desc)).", owner = $owner, active = $active, sort_order = $sort_order, last_modified_by = $u, "."last_modified_date = $now where component_id = $component_id"); } if ($use_js) { $t->render('edit-submit.html'); @@ -173,11 +175,13 @@ extract($_POST); if (!isset($active)) $active = 0; + if (empty($version_sortorder)) $version_sortorder = 0; + if (empty($component_sortorder)) $component_sortorder = 0; if (!$projectid) { $projectid = $db->nextId(TBL_PROJECT); $db->query('insert into '.TBL_PROJECT." (project_id, project_name, project_desc, active, created_by, created_date) values ($projectid , ".$db->quote(stripslashes($project_name)).", ".$db->quote(stripslashes($project_desc)).", $active, $u, $now)"); - $db->query('insert into '.TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$db->nextId(TBL_VERSION).", $projectid, ".$db->quote(stripslashes($version_name)).", 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 (".$db->nextId(TBL_COMPONENT).", $projectid, ".$db->quote(stripslashes($component_name)).", ".$db->quote(stripslashes($component_desc)).", $owner, 1, $u, $now, $u, $now)"); + $db->query('insert into '.TBL_VERSION." (version_id, project_id, version_name, active, sort_order, created_by, created_date) values (".$db->nextId(TBL_VERSION).", $projectid, ".$db->quote(stripslashes($version_name)).", 1, $version_sortorder, $u, $now)"); + $db->query('insert into '.TBL_COMPONENT." (component_id, project_id, component_name, component_desc, owner, active, sort_order, created_by, created_date, last_modified_by, last_modified_date) values (".$db->nextId(TBL_COMPONENT).", $projectid, ".$db->quote(stripslashes($component_name)).", ".$db->quote(stripslashes($component_desc)).", $owner, 1, $component_sortorder, $u, $now, $u, $now)"); } else { $db->query('update '.TBL_PROJECT." set project_name = ".$db->quote(stripslashes($project_name)).", project_desc = ".$db->quote(stripslashes($project_desc)).", active = $active where project_id = $projectid"); } @@ -294,6 +298,7 @@ 'name' => 'project_name', 'description' => 'project_desc', 'active' => 'active', + 'sortorder' => 'sort_order', 'createdby' => 'created_by', 'createddate' => 'created_date' ); |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:21:51
|
Update of /cvsroot/phpbt/phpbt/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589/phpbt/schemas Modified Files: mysql.in Log Message: Added sort_order to TBL_COMPONENT and TBL_VERSION Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- mysql.in 22 Aug 2005 19:58:25 -0000 1.47 +++ mysql.in 22 Aug 2005 20:21:42 -0000 1.48 @@ -134,6 +134,7 @@ component_desc text NOT NULL, owner int(10) unsigned NOT NULL default '0', active tinyint(1) NOT NULL default '1', + sort_order tinyint(3) unsigned NOT NULL default '0', created_by int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', last_modified_by int(10) unsigned NOT NULL default '0', @@ -264,6 +265,7 @@ project_id int(10) unsigned NOT NULL default '0', version_name char(30) NOT NULL default '', active tinyint(1) NOT NULL default '1', + sort_order tinyint(3) unsigned NOT NULL default '0', created_by int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', last_modified_by int(10) unsigned NOT NULL default '0', |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:21:51
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16589/phpbt/inc/db Modified Files: mysql.php Log Message: Added sort_order to TBL_COMPONENT and TBL_VERSION Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- mysql.php 22 Aug 2005 19:58:25 -0000 1.22 +++ mysql.php 22 Aug 2005 20:21:42 -0000 1.23 @@ -174,12 +174,12 @@ 'group by assigned_to, u.email', 'join-where' => 'where', 'admin-list-components' => 'select c.component_id, component_name, '. - 'c.created_date, active, count(bug_id) as bug_count '. + 'c.created_date, active, sort_order, count(bug_id) as bug_count '. 'from '.TBL_COMPONENT.' c left join '.TBL_BUG.' b using(component_id) '. 'where c.project_id = %s '. 'group by c.component_id, c.component_name, c.created_date, c.active', 'admin-list-versions' => 'select v.version_id, version_name, '. - 'v.created_date, active, count(bug_id) as bug_count '. + 'v.created_date, active, sort_order, count(bug_id) as bug_count '. 'from '.TBL_VERSION.' v left join '.TBL_BUG.' b using(version_id) '. 'where v.project_id = %s '. 'group by v.version_id, v.version_name, v.created_date, v.active', |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:11:58
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14068/templates/default/admin Modified Files: userlist.html Log Message: Introduced a group filter in the userlist page. Index: userlist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/userlist.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- userlist.html 25 Oct 2004 12:07:03 -0000 1.12 +++ userlist.html 22 Aug 2005 20:11:49 -0000 1.13 @@ -8,12 +8,14 @@ <table border="0" width="100%"> <tr> <td valign="top"> - <b> <?php echo $page_title; ?></b> - <a href="user.php?op=edit&user_id=0&filter=<?php echo $filter; ?>" onClick="popupUser(0); return false;"><?php echo translate("Add new user"); ?></a> + <b> <?php echo $page_title; ?></b> - <a href="user.php?op=edit&user_id=0&userfilter=<?php echo $userfilter; ?>&groupfilter=<?php echo $groupfilter; ?>" onClick="popupUser(0); return false;"><?php echo translate("Add new user"); ?></a> <hr size="1"> <form> <div align="center"> - <select name="filter" onChange="document.location.href='user.php?filter=' + this.options[this.selectedIndex].value"> - <?php build_select('user_filter', $filter); ?></select> + <select name="groupfilter" onChange="document.location.href='user.php?groupfilter=' + this.options[this.selectedIndex].value<?php echo " + '&userfilter=".$userfilter."'"; ?>"> + <?php build_select('group', $groupfilter, 1); ?></select> + <select name="userfilter" onChange="document.location.href='user.php?<?php echo 'groupfilter='.$groupfilter; ?>&userfilter=' + this.options[this.selectedIndex].value"> + <?php build_select('user_filter', $userfilter); ?></select> <input type="submit" value="<?php echo translate("Filter"); ?>"> </div> </form> @@ -26,7 +28,7 @@ </tr> <?php for ($i = 0, $count = count($users); $i < $count; $i++) { ?> <tr> - <td><a href="user.php?op=edit&user_id=<?php echo $users[$i]['user_id']; ?>&filter=<?php echo $filter; ?>" onClick="popupUser(<?php echo $users[$i]['user_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($users[$i]['login'])); ?></a></td> + <td><a href="user.php?op=edit&user_id=<?php echo $users[$i]['user_id']; ?>&userfilter=<?php echo $userfilter; ?>&groupfilter=<?php echo $groupfilter; ?>" onClick="popupUser(<?php echo $users[$i]['user_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($users[$i]['login'])); ?></a></td> <td align="center"><?php echo stripslashes(htmlspecialchars($users[$i]['first_name'].' '.$users[$i]['last_name'])); ?></td> <td align="center"><?php echo $users[$i]['created_date'] ? date(DATE_FORMAT, $users[$i]['created_date']) : ''; ?></td> <td align="center"><?php echo $users[$i]['active'] ? translate("Yes") : translate("No"); ?></td> |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:11:58
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14068/inc Modified Files: functions.php Log Message: Introduced a group filter in the userlist page. Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- functions.php 22 Aug 2005 19:58:25 -0000 1.56 +++ functions.php 22 Aug 2005 20:11:49 -0000 1.57 @@ -107,7 +107,8 @@ break; case 'group': if ($project) { // If we are building for project admin page - if (!count($selected) or (count($selected) && in_array(0, $selected))) { + if (is_array($selected) && (!count($selected) or (count($selected) && in_array(0, $selected))) or + !isset($selected) or $selected == 0) { $sel = ' selected'; } else { $sel = ''; @@ -116,7 +117,8 @@ } $rs = $db->query($queries[$box]); while ($rs->fetchInto($row)) { - if (count($selected) && in_array($row[$box.'_id'], $selected)) { + if (is_array($selected) && count($selected) && in_array($row[$box.'_id'], $selected) or + $selected == $row[$box.'_id'] and $selected != '') { $sel = ' selected'; } else { $sel = ''; |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:11:57
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14068/admin Modified Files: user.php Log Message: Introduced a group filter in the userlist page. Index: user.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- user.php 25 Oct 2004 12:06:59 -0000 1.50 +++ user.php 22 Aug 2005 20:11:49 -0000 1.51 @@ -114,7 +114,7 @@ if ($_POST['use_js']) { $t->render('edit-submit.html'); } else { - header("Location: $me?filter={$_POST['filter']}"); + header("Location: $me?userfilter={$_POST['userfilter']}&groupfilter={$_POST['groupfilter']}"); } } @@ -161,20 +161,28 @@ } $page = isset($_GET['page']) ? $_GET['page'] : 1; - $user_filter = isset($_GET['filter']) ? $_GET['filter'] : 0; + $user_filter = isset($_GET['userfilter']) ? $_GET['userfilter'] : 0; + $group_filter = isset($_GET['groupfilter']) ? $_GET['groupfilter'] : 0; - $filter_query = ''; - if (isset($_GET['filter'])) switch($_GET['filter']) { - case 1 : $filter_query = ' where active = 1'; break; - case 2 : $filter_query = ' where active = 0'; break; - default : $filter_query = ''; + $filter_user = ''; + $filter_group = ''; + if (isset($_GET['userfilter'])) switch($_GET['userfilter']) { + case 1 : $filter_user = ' and u.active = 1'; break; + case 2 : $filter_user = ' and u.active = 0'; break; } - $nr = $db->getOne("select count(*) from ".TBL_AUTH_USER.$filter_query); + if (isset($_GET['groupfilter'])) { + if ((int)$_GET['groupfilter'] > 0) { + $filter_group = ' and ug.group_id = '.(int)$_GET['groupfilter']; + } + } + $nr = $db->getOne("select count(distinct u.user_id) from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug where u.user_id = ug.user_id".$filter_user.$filter_group); list($selrange, $llimit) = multipages($nr, $page, - "order=$order&sort=$sort&filter=$user_filter"); + "order=$order&sort=$sort&userfilter=$user_filter&groupfilter=$group_filter"); - $t->assign('users', $db->getAll($db->modifyLimitQuery("select user_id, first_name, last_name, email, login, created_date, active from ".TBL_AUTH_USER."$filter_query order by $order $sort", $llimit, $selrange))); + $t->assign('users', $db->getAll($db->modifyLimitQuery("select distinct u.user_id, u.first_name, u.last_name, u.email, u.login, u.created_date, u.active". + " from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug where u.user_id = ug.user_id $filter_user $filter_group". + " order by $order $sort", $llimit, $selrange))); $headers = array( 'userid' => 'user_id', @@ -185,9 +193,10 @@ 'active' => 'active', 'date' => 'created_date'); - sorting_headers($me, $headers, $order, $sort, "page=$page&filter=$user_filter"); + sorting_headers($me, $headers, $order, $sort, "page=$page&userfilter=$user_filter&groupfilter=$group_filter"); - $t->assign('filter', $user_filter); + $t->assign('userfilter', $user_filter); + $t->assign('groupfilter', $group_filter); $t->render('userlist.html', translate("User List")); } |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:04:13
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12023/admin Modified Files: group.php Log Message: Added a simple UI to edit group permissions Index: group.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/group.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- group.php 22 Aug 2005 19:58:25 -0000 1.14 +++ group.php 22 Aug 2005 20:04:05 -0000 1.15 @@ -50,10 +50,17 @@ if ($error) { show_form($groupid, $error); return; } if (!$groupid) { - $db->query("insert into ".TBL_AUTH_GROUP." (group_id, group_name, created_by, created_date, last_modified_by, last_modified_date) values (".$db->nextId(TBL_AUTH_GROUP).", ".$db->quote(stripslashes($group_name)).", $u, $now, $u, $now)"); + $groupid = $db->nextId(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 (".$groupid.", ".$db->quote(stripslashes($group_name)).", $u, $now, $u, $now)"); } else { $db->query("update ".TBL_AUTH_GROUP." set group_name = ".$db->quote(stripslashes($group_name)).", last_modified_by = $u, last_modified_date = $now where group_id = '$groupid'"); } + + $db->query("delete from ".TBL_GROUP_PERM." where group_id = '$groupid'"); + foreach ($perms as $permid) { + $db->query("insert into ".TBL_GROUP_PERM." (group_id, perm_id) values ($groupid, $permid)"); + } + if ($use_js) { $t->render('edit-submit.html', '', 'wrap-popup.html'); } else { @@ -64,11 +71,15 @@ function show_form($groupid = 0, $error = '') { global $db, $me, $t; + $group_perms = array(); if ($groupid && !$error) { $t->assign($db->getRow("select * from ".TBL_AUTH_GROUP." where group_id = '$groupid'")); + $group_perms = $db->getCol("select distinct perm_id from ".TBL_GROUP_PERM." where group_id = $groupid"); } else { $t->assign($_POST); } + $t->assign('perms', $db->getAll("select * from ".TBL_AUTH_PERM)); + $t->assign('group_perms', $group_perms); $t->assign('error', $error); $t->render('group-edit.html', translate("Edit Group"), (!empty($_GET['use_js']) ? 'wrap-popup.html' : 'wrap.html')); } |
|
From: Ulf E. <ulf...@us...> - 2005-08-22 20:04:13
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12023/templates/default/admin Modified Files: group-edit.html grouplist.html Log Message: Added a simple UI to edit group permissions Index: group-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/group-edit.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- group-edit.html 22 Aug 2005 19:58:26 -0000 1.9 +++ group-edit.html 22 Aug 2005 20:04:05 -0000 1.10 @@ -35,6 +35,22 @@ </tr> <tr> <td align="right" valign="top"> + Permissions: + </td> + </tr> + <?php foreach($perms as $p) { ?> + <tr> + <td align="right" valign="top"> + <input type="checkbox" name="perms[]" value="<?php echo $p['perm_id']; ?>" + <?php if (is_array($group_perms) && in_array($p['perm_id'], $group_perms)) echo "checked"; ?>> + </td> + <td> + <?php echo $p['perm_name']; ?> + </td> + </tr> + <?php } ?> + <tr> + <td align="right" valign="top"> </td> <td> Index: grouplist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/grouplist.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- grouplist.html 22 Aug 2005 19:58:26 -0000 1.9 +++ grouplist.html 22 Aug 2005 20:04:05 -0000 1.10 @@ -3,7 +3,7 @@ var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>'; function popupGroup(id) { - window.open(me + '?op=edit&use_js=1&group_id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1'); + window.open(me + '?op=edit&use_js=1&group_id='+id, 'ewin', 'dependent=yes,width=250,height=250,scrollbars=1'); } // --> </script> |