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: Ben C. <php...@be...> - 2001-11-24 20:55:46
|
I'm away from home until the middle of next week, so I'll look into this more when I'm back and can play with it on my machine. On Sun, Nov 18, 2001 at 11:53:26PM +0100, Javier Sixto wrote: > Hello Ben, > I was testing web install whith Mysql (i will test after for pgsql), and > got some problems to make it work ..here is a little sumury :-) > > -> I haven't set phplib on my include path, so install.php doesn't find > include files : template.inc, and db_'.$_pv['db_type'].'.inc .. > i have changed it . > > ->On each errors o lost all data of form . > ->Email check seems to return false for any entry (hum, strange ) > ->I use mozilla on linux to test this install, and when all checks ar > ok, mozilla asks for saving config.php. > ->I save config.php on server > ->I got an error on index.php page (i have added phplib dir on config.php) > *Fatal error*: Cannot instantiate non-existent class: in > */home/httpd/virtualhosts/phpbt/phplib-7.2d/php/session.inc* on line *374* > > Any ideas ;-) > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Benjamin C. <bc...@us...> - 2001-11-24 17:51:59
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv8333
Modified Files:
bug.php
Log Message:
Hide possible errors from is_readable
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- bug.php 2001/11/19 16:49:20 1.62
+++ bug.php 2001/11/24 17:51:56 1.63
@@ -655,7 +655,7 @@
} else {
$j = 0;
while ($att = $q->grab()) {
- if (is_readable(INSTALL_PATH.'/'.ATTACHMENT_PATH."/{$row['project_id']}/$bugid-{$att['file_name']}")) {
+ 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')) {
$action .= " | <a href='attachment.php?del={$att['attachment_id']}' onClick=\"return confirm('Are you sure you want to delete this attachment?');\">Delete</a>";
|
|
From: Benjamin C. <bc...@us...> - 2001-11-24 17:50:56
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv8083
Modified Files:
query.php
Log Message:
Code cleanup
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- query.php 2001/11/23 05:08:59 1.43
+++ query.php 2001/11/24 17:50:53 1.44
@@ -334,7 +334,9 @@
$reportedby = !empty($_gv['reportedby']) ? $_gv['reportedby'] : 0;
$assignedto = !empty($_gv['assignedto']) ? $_gv['assignedto'] : 0;
-if ($op) switch($op) {
+$open = !empty($_gv['open']) ? $_gv['open'] : 0;
+
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'query' : show_query(); break;
case 'doquery' : $queryinfo['query'] = ''; list_items(); break;
case 'delquery' : delete_saved_query($queryid); break;
|
|
From: Benjamin C. <bc...@us...> - 2001-11-24 17:43:56
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv6602 Modified Files: CHANGELOG Log Message: Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- CHANGELOG 2001/11/14 04:11:02 1.29 +++ CHANGELOG 2001/11/24 17:43:53 1.30 @@ -3,6 +3,8 @@ : Moved session and auth classes into the package. : Added Previous and Next links for moving to other bugs in the bug list from the bug display page. +: Added quick query links from the bug summary table on the home page (when + not using jpgraph). -- 0.5.1 -- 11 Nov 2001 : Fixed a bug (introduced in 0.5.0) with severity color not being pulled in |
|
From: Alessandro P. (T. / J578) <al...@ti...> - 2001-11-24 16:34:22
|
It would be nice to add a "back to bug-list" link on the top of the bug-edit page. What d'you think of this? Bye, Alessandro -- Alessandro "TXM" Pisani - al...@ti... - ICQ #2209087 INWO Project coordinator http://www.inwoproject.f2s.com "I will carry you through, hicking and screaming, and in the end you will thank me" - Tyler Durden [from "Fight Club"] |
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:10:47
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18718
Modified Files:
include.php
Log Message:
Code cleanup and getting ready for adodb conversion
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- include.php 2001/11/19 16:49:20 1.77
+++ include.php 2001/11/23 05:10:44 1.78
@@ -92,6 +92,10 @@
$q = new dbclass;
+//include INSTALL_PATH.'/'.INCLUDE_PATH.'inc/adodb/adodb.inc.php';
+//$db =& ADONewConnection(DB_TYPE);
+//$db->PConnect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
+
// Set up the configuration variables
$q->query('select varname, varvalue from '.TBL_CONFIGURATION);
while (list($k, $v) = $q->grab()) {
@@ -231,7 +235,7 @@
);
$text = '';
- if (in_array($box, $cfgDatabase)) {
+ if (isset($cfgDatabase[$box])) {
$querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
$queries = array(
'group' => $querystart.' where group_name <> \'User\' order by group_name',
@@ -390,9 +394,8 @@
srand((double)microtime()*1000000);
$vowels = array("a", "e", "i", "o", "u");
- $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr",
-
- "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
+ $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
+ $password = '';
$num_vowels = count($vowels);
$num_cons = count($cons);
|
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:09:02
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18405
Modified Files:
query.php
Log Message:
Code cleanup
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- query.php 2001/11/14 14:28:06 1.42
+++ query.php 2001/11/23 05:08:59 1.43
@@ -126,7 +126,7 @@
if (!empty($flags)) $query[] = '('.delimit_list(' or ',$flags).')';
// Email field(s)
- if ($email1) {
+ if (isset($email1)) {
switch($emailtype1) {
case 'like' : $econd = "like '%$email1%'"; break;
case 'rlike' :
@@ -139,7 +139,7 @@
// Text search field(s)
foreach(array('title','description','url') as $searchfield) {
- if ($$searchfield) {
+ if (isset($$searchfield)) {
switch (${$searchfield."_type"}) {
case 'like' : $cond = "like '%".$$searchfield."%'"; break;
case 'rlike' : $cond = "rlike '".$$searchfield."'"; break;
@@ -151,9 +151,9 @@
if (!empty($fields)) $query[] = '('.delimit_list(' or ',$fields).')';
// Project/Version/Component
- if ($projects) {
- $proj[] = "bug.project_id = $projects";
- if ($versions) $proj[] = "bug.version_id = $versions";
+ if (isset($projects)) {
+ $proj[] = "b.project_id = $projects";
+ if ($versions) $proj[] = "b.version_id = $versions";
if ($components) $proj[] = "component_id = $components";
$query[] = '('.delimit_list(' and ',$proj).')';
}
@@ -240,7 +240,7 @@
'description' => 'description',
'url' => 'url',
'severity_name' => 'severity.sort_order',
- 'priority' => 'bug.priority',
+ 'priority' => 'b.priority',
'status_name' => 'status.sort_order',
'owner' => 'owner',
'reporter' => 'reporter',
|
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:06:55
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv18071/templates/default
Modified Files:
index.html
Log Message:
Code cleanup and added links to query page for each type of bug status
Index: index.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/index.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.html 2001/08/03 03:53:20 1.2
+++ index.html 2001/11/23 05:06:52 1.3
@@ -29,7 +29,7 @@
</tr>
<!-- BEGIN row -->
<tr>
- <td>{status}</td>
+ <td><a href="query.php?op=doquery&status[]={statid}">{status}</a></td>
<td align="center">{count}</td>
</tr>
<!-- END row -->
|
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:06:55
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18071
Modified Files:
index.php
Log Message:
Code cleanup and added links to query page for each type of bug status
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- index.php 2001/11/13 03:53:04 1.12
+++ index.php 2001/11/23 05:06:52 1.13
@@ -42,15 +42,18 @@
while ($row = $q->grab()) {
$stats[$row['status_id']]['count'] = $row['count'];
}
- foreach ($stats as $stat) {
+ $total = 0;
+ foreach ($stats as $statid => $stat) {
$t->set_var(array(
+ 'statid' => $statid,
'status' => $stat['name'],
- 'count' => $stat['count'] ? $stat['count'] : 0
+ 'count' => isset($stat['count']) ? $stat['count'] : 0
));
- $total += $stat['count'];
+ $total += isset($stat['count']) ? $stat['count'] : 0;
$t->parse('rows','row',true);
}
$t->set_var(array(
+ 'statid' => delimit_list('&status[]=', array_keys($stats)),
'status' => "<b>{$STRING['totalbugs']}</b>",
'count' => $total ? "<b>$total</b>" : 0
));
|
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:04:18
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17781
Modified Files:
config.php
Log Message:
Cleanup
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- config.php 2001/11/13 03:53:01 1.16
+++ config.php 2001/11/23 05:04:15 1.17
@@ -62,8 +62,8 @@
define ('ONEDAY', 86400);
require_once (PHPLIB_PATH.'db_'.DB_TYPE.'.inc');
-require_once ('inc/session.php');
-require_once ('inc/auth.php');
-require_once ('inc/template.php');
+require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/session.php');
+require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/auth.php');
+require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/template.php');
?>
|
|
From: Benjamin C. <bc...@us...> - 2001-11-23 05:02:44
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv17517
Modified Files:
configure.php
Log Message:
Code cleanup
Index: configure.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- configure.php 2001/11/13 03:53:04 1.2
+++ configure.php 2001/11/23 05:02:41 1.3
@@ -42,6 +42,7 @@
$t->set_block('row', 'selectblock', 'select');
$t->set_block('row', 'radioblock', 'radio');
+ $i = 0;
$q->query('select * from '.TBL_CONFIGURATION);
while ($row = $q->grab()) {
$t->set_var($row);
@@ -88,7 +89,7 @@
$perm->check('Admin');
-if ($submit) {
+if (isset($_pv['submit'])) {
save_options();
}
list_options();
|
|
From: Benjamin C. <bc...@us...> - 2001-11-22 05:14:36
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv18210
Modified Files:
os.php project.php resolution.php severity.php status.php
user.php
Log Message:
Code cleanup
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- os.php 2001/11/13 03:53:04 1.16
+++ os.php 2001/11/22 05:14:33 1.17
@@ -26,8 +26,10 @@
include INCLUDE_PATH.'include.php';
function do_form($osid = 0) {
- global $q, $me, $fname, $fregex, $fsortorder, $STRING;
+ global $q, $me, $_pv, $STRING;
+ extract($_pv);
+ $error = '';
// Validation
if (!$fname = trim($fname))
$error = $STRING['givename'];
@@ -42,9 +44,9 @@
}
function show_form($osid = 0, $error = '') {
- global $q, $me, $t, $fname, $fregex, $fsortorder, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
- #$t->set_file('content','osform.html');
+ extract($_pv);
if ($osid && !$error) {
$row = $q->grab("select * from ".TBL_OS." where os_id = '$osid'");
$t->set_var(array(
@@ -58,20 +60,29 @@
'action' => $osid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
'fosid' => $osid,
- 'fname' => $fname,
- 'fregex' => $fregex,
- 'fsortorder' => $fsortorder));
+ 'fname' => isset($fname) ? $fname : '',
+ 'fregex' => isset($fregex) ? $fregex : '',
+ 'fsortorder' => isset($fsortorder) ? $fsortorder : ''));
}
}
function list_items($osid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','oslist.html');
$t->set_block('content','row','rows');
- if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ if (empty($_gv['order'])) {
+ $order = 'sort_order';
+ $sort = 'asc';
+ } else {
+ $order = $_gv['order'];
+ $sort = $_gv['sort'];
+ }
+
+ $page = isset($_gv['page']) ? $_gv['page'] : 0;
+
$nr = $q->query("select count(*) from ".TBL_OS." where os_id = '$osid' order by $order $sort");
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
@@ -99,6 +110,7 @@
sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
@@ -118,11 +130,11 @@
$perm->check('Admin');
-if ($op) switch($op) {
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'edit' : list_items($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- project.php 2001/11/13 03:53:04 1.25
+++ project.php 2001/11/22 05:14:33 1.26
@@ -28,6 +28,7 @@
function save_version($versionid = 0) {
global $q, $me, $_pv, $STRING, $now, $u;
+ $error = '';
// Validation
if (!$_pv['vf_version'] = trim($_pv['vf_version']))
$error['version'] = $STRING['giveversion'];
@@ -66,7 +67,7 @@
$t->set_var(array(
'vf_error' => $error,
'versionid' => $versionid,
- 'vf_version' => $vf_version,
+ 'vf_version' => isset($vf_version) ? $vf_version : '',
'vf_active' => isset($vf_active) && !$vf_active ? '' : ' checked',
'vf_action' => $versionid ? $STRING['edit'] : $STRING['addnew']));
}
@@ -81,6 +82,7 @@
return;
}
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
@@ -97,6 +99,7 @@
function save_component($componentid = 0) {
global $q, $me, $_pv, $u, $STRING, $now;
+ $error = '';
// Validation
if (!$_pv['cf_name'] = trim($_pv['cf_name']))
$error['component'] = $STRING['givename'];
@@ -143,9 +146,9 @@
$t->set_var(array(
'cf_error' => $error,
'componentid' => $componentid,
- 'cf_name' => $cf_name,
- 'cf_description' => $cf_description,
- 'cf_owner' => build_select('owner', $cf_owner),
+ 'cf_name' => isset($cf_name) ? $cf_name : '',
+ 'cf_description' => isset($cf_description) ? $cf_description : '',
+ 'cf_owner' => build_select('owner', (isset($cf_owner) ? $cf_owner : '')),
'cf_active' => (isset($cf_active) and !$cf_active) ? '' : 'checked',
'cf_action' => $componentid ? $STRING['edit'] : $STRING['addnew']));
}
@@ -160,14 +163,14 @@
return;
}
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
'compid' => $row['component_id'],
'compname' => $row['component_name'],
- 'compdesc' => stripslashes($row['project_desc']),
- 'owner' => $row['Owner'],
+ 'compdesc' => stripslashes($row['component_desc']),
'compactive' => $row['active'] ? 'Y' : 'N',
'createdby' => $row['created_by'],
'compdate' => date(DATE_FORMAT,$row['created_date']),
@@ -256,8 +259,10 @@
} else {
$t->set_file('content','project-add.html');
}
- show_version($_gv['versionid'], $error['version']);
- show_component($_gv['componentid'], $error['component']);
+ show_version((isset($_gv['versionid']) ? $_gv['versionid'] : 0),
+ (isset($error['version']) ? $error['version'] : ''));
+ show_component((isset($_gv['componentid']) ? $_gv['componentid'] : 0),
+ (isset($error['component']) ? $error['component'] : ''));
}
function list_projects() {
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- resolution.php 2001/11/13 03:53:04 1.17
+++ resolution.php 2001/11/22 05:14:33 1.18
@@ -26,8 +26,10 @@
include INCLUDE_PATH.'include.php';
function do_form($resolutionid = 0) {
- global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
+ global $q, $me, $_pv, $STRING;
+ extract($_pv);
+ $error = '';
// Validation
if (!$fname = trim($fname))
$error = $STRING['givename'];
@@ -48,8 +50,9 @@
}
function show_form($resolutionid = 0, $error = '') {
- global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
+ extract($_pv);
if ($resolutionid && !$error) {
$row = $q->grab("select * from ".TBL_RESOLUTION.
" where resolution_id = '$resolutionid'");
@@ -64,20 +67,29 @@
'action' => $resolutionid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
'fresolutionid' => $resolutionid,
- 'fname' => $fname,
- 'fdescription' => $fdescription,
- 'fsortorder' => $fsortorder));
+ 'fname' => isset($fname) ? $fname : '',
+ 'fdescription' => isset($fdescription) ? $fdescription : '',
+ 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
}
}
function list_items($resolutionid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+ global $me, $q, $t, $STRING, $TITLE, $_gv;
$t->set_file('content','resolutionlist.html');
$t->set_block('content','row','rows');
- if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ if (empty($_gv['order'])) {
+ $order = 'sort_order';
+ $sort = 'asc';
+ } else {
+ $order = $_gv['order'];
+ $sort = $_gv['sort'];
+ }
+
+ $page = isset($_gv['page']) ? $_gv['page'] : 0;
+
$nr = $q->query("select count(*) from ".TBL_RESOLUTION.
" where resolution_id = '$resolutionid' order by $order $sort");
@@ -106,6 +118,7 @@
sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
@@ -125,11 +138,11 @@
$perm->check('Admin');
-if ($op) switch($op) {
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'edit' : list_items($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- severity.php 2001/11/13 03:53:04 1.13
+++ severity.php 2001/11/22 05:14:33 1.14
@@ -26,8 +26,10 @@
include INCLUDE_PATH.'include.php';
function do_form($severityid = 0) {
- global $q, $me, $fname, $fdescription, $fsortorder, $fcolor, $STRING;
+ global $q, $me, $_pv, $STRING;
+ extract($_pv);
+ $error = '';
// Validation
if (!$fname = trim($fname))
$error = $STRING['givename'];
@@ -65,23 +67,32 @@
'action' => $severityid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
'fseverityid' => $severityid,
- 'fname' => $_pv['fname'] ? stripslashes($_pv['fname']) : '',
- 'fdescription' => $_pv['fdescription'] ?
+ 'fname' => isset($_pv['fname']) ? stripslashes($_pv['fname']) : '',
+ 'fdescription' => isset($_pv['fdescription']) ?
stripslashes($_pv['fdescription']) : '',
- 'fsortorder' => $_pv['fsortorder'] ? $_pv['fsortorder'] : '',
- 'fcolor' => $_pv['fcolor'] ? $_pv['fcolor'] : ''
+ 'fsortorder' => isset($_pv['fsortorder']) ? $_pv['fsortorder'] : '',
+ 'fcolor' => isset($_pv['fcolor']) ? $_pv['fcolor'] : ''
));
}
}
function list_items($severityid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $me;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','severitylist.html');
$t->set_block('content','row','rows');
- if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ if (empty($_gv['order'])) {
+ $order = 'sort_order';
+ $sort = 'asc';
+ } else {
+ $order = $_gv['order'];
+ $sort = $_gv['sort'];
+ }
+
+ $page = isset($_gv['page']) ? $_gv['page'] : 0;
+
$nr = $q->query("select count(*) from ".TBL_SEVERITY.
" where severity_id = '$severityid' order by $order $sort");
@@ -112,6 +123,7 @@
sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
@@ -132,11 +144,11 @@
$perm->check('Admin');
-if ($op) switch($op) {
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'edit' : list_items($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- status.php 2001/11/13 03:53:04 1.17
+++ status.php 2001/11/22 05:14:33 1.18
@@ -26,8 +26,10 @@
include INCLUDE_PATH.'include.php';
function do_form($statusid = 0) {
- global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
+ global $q, $me, $_pv, $STRING;
+ extract($_pv);
+ $error = '';
// Validation
if (!$fname = trim($fname))
$error = $STRING['givename'];
@@ -48,8 +50,9 @@
}
function show_form($statusid = 0, $error = '') {
- global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
+ extract($_pv);
if ($statusid && !$error) {
$row = $q->grab("select * from ".TBL_STATUS.
" where status_id = '$statusid'");
@@ -64,20 +67,29 @@
'action' => $statusid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
'fstatusid' => $statusid,
- 'fname' => $fname,
- 'fdescription' => $fdescription,
- 'fsortorder' => $fsortorder));
+ 'fname' => isset($fname) ? $fname : '',
+ 'fdescription' => isset($fdescription) ? $fdescription : '',
+ 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
}
}
function list_items($statusid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
$t->set_file('content','statuslist.html');
$t->set_block('content','row','rows');
- if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ if (empty($_gv['order'])) {
+ $order = 'sort_order';
+ $sort = 'asc';
+ } else {
+ $order = $_gv['order'];
+ $sort = $_gv['sort'];
+ }
+
+ $page = isset($_gv['page']) ? $_gv['page'] : 0;
+
$nr = $q->query("select count(*) from ".TBL_STATUS.
" where status_id = '$statusid' order by $order $sort");
@@ -106,6 +118,7 @@
sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
@@ -125,11 +138,11 @@
$perm->check('Admin');
-if ($op) switch($op) {
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'edit' : list_items($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- user.php 2001/11/13 03:53:04 1.32
+++ user.php 2001/11/22 05:14:33 1.33
@@ -28,6 +28,7 @@
function do_form($userid = 0) {
global $q, $me, $_pv, $STRING, $now, $u;
+ $error = '';
// Validation
if (!LOGIN_IS_EMAIL && !$_pv['flogin'] = trim($_pv['flogin'])) {
$error = $STRING['givelogin'];
@@ -144,15 +145,19 @@
$t->set_var(array(
'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
- 'fuserid' => $_pv['userid'],
- 'flogin' => $_pv['flogin'],
- 'ffirstname' => stripslashes($_pv['firstname']),
- 'flastname' => stripslashes($_pv['flastname']),
- 'femail' => $_pv['femail'],
- 'fpassword' => $_pv['fpassword'] ? $_pv['fpassword'] : genpassword(10),
+ 'fuserid' => $userid,
+ 'flogin' => isset($_pv['flogin']) ? $_pv['flogin'] : '',
+ 'ffirstname' => isset($_pv['firstname']) ?
+ stripslashes($_pv['firstname']) : '',
+ 'flastname' => isset($_pv['flastname']) ?
+ stripslashes($_pv['flastname']) : '',
+ 'femail' => isset($_pv['femail']) ? $_pv['femail'] : '',
+ 'fpassword' => isset($_pv['fpassword']) ? $_pv['fpassword'] :
+ genpassword(10),
'factive' => isset($_pv['factive']) ? ($_pv['factive'] ? 'checked' : '')
: 'checked',
- 'fusergroup' => build_select('group', $_pv['fusergroup'])
+ 'fusergroup' => build_select('group', (isset($_pv['fusergroup']) ?
+ $_pv['fusergroup'] : array()))
));
}
@@ -165,13 +170,22 @@
}
function list_items($userid = 0, $error = '') {
- global $me, $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
$t->set_file('content', 'userlist.html');
$t->set_block('content', 'row', 'rows');
$t->set_block('content', 'loginentryarea', 'loginarea');
- if (!$order) { $order = 'login'; $sort = 'asc'; }
+ if (empty($_gv['order'])) {
+ $order = 'login';
+ $sort = 'asc';
+ } else {
+ $order = $_gv['order'];
+ $sort = $_gv['sort'];
+ }
+
+ $page = isset($_gv['page']) ? $_gv['page'] : 0;
+
$nr = $q->grab_field("select count(*) from ".TBL_AUTH_USER);
list($selrange, $llimit, $npages, $pages) = multipages($nr, $page,
@@ -203,6 +217,7 @@
sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
@@ -224,11 +239,11 @@
$perm->check('Admin');
-if ($op) switch($op) {
+if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'edit' : list_items($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content', 'wrap', 'main'));
|
|
From: Benjamin C. <bc...@us...> - 2001-11-19 16:49:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv8327
Modified Files:
bug.php include.php newaccount.php
Log Message:
Code cleanup
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- bug.php 2001/11/14 14:28:06 1.61
+++ bug.php 2001/11/19 16:49:20 1.62
@@ -427,23 +427,26 @@
'TITLE' => $TITLE['enterbug'],
'error' => $error,
'bugid' => $bugid,
- 'title' => stripslashes($title),
- 'description' => stripslashes($description),
- 'url' => $url ? $url : 'http://',
- 'urllabel' => $url ? "<a href='$url'>URL</a>" : 'URL',
- 'severity' => build_select('severity',$severity),
- 'priority' => build_select('priority',$priority),
- 'status' => build_select('status',$status),
- 'resolution' => build_select('resolution',$resolution),
- 'assignedto' => $assignedto,
- 'createdby' => $createdby,
- 'createddate' => $createddate,
- 'lastmodifieddate' => $lastmodifieddate,
+ 'title' => isset($title) ? stripslashes($title) : '',
+ 'description' => isset($description) ? stripslashes($description) : '',
+ 'url' => isset($url) ? $url : 'http://',
+ 'urllabel' => isset($url) ? "<a href='$url'>URL</a>" : 'URL',
+ 'severity' => build_select('severity',(isset($severity) ? $severity : 0)),
+ 'priority' => build_select('priority',(isset($priority) ? $priority : 0)),
+ 'status' => build_select('status',(isset($status) ? $status : 0)),
+ 'resolution' => build_select('resolution',
+ (isset($resolution) ? $resolution : 0)),
+ 'assignedto' => isset($assignedto) ? $assignedto : '',
+ 'createdby' => isset($createdby),
+ 'createddate' => isset($createddate),
+ 'lastmodifieddate' => isset($lastmodifieddate),
'project' => $project,
'projectname' => $projectname,
- 'version' => build_select('version',$version,$project),
- 'component' => build_select('component',$component,$project),
- 'os' => build_select('os',$os)));
+ 'version' => build_select('version',
+ (isset($version) ? $version : 0),$project),
+ 'component' => build_select('component',
+ (isset($component) ? $component : 0),$project),
+ 'os' => build_select('os',(isset($os) ? $os : 0))));
}
}
@@ -586,7 +589,8 @@
$t->set_block('content','attrow','attrows');
$t->set_unknowns('remove');
- list($prevlink, $nextlink) = prev_next_links($bugid, $_gv['pos']);
+ list($prevlink, $nextlink) = prev_next_links($bugid,
+ isset($_gv['pos']) ? $_gv['pos'] : 0);
$t->set_var(array(
'statuserr' => isset($error['status']) ? $error['status'].'<br><br>' : '',
'bugid' => $bugid,
@@ -599,7 +603,7 @@
'priority' => build_select('priority',$row['priority']),
'status' => $row['status_name'],
'resolution' => !empty($row['resolution_name']) ? $row['resolution_name'] : '',
- 'owner' => maskemail($row['owner']),
+ 'owner' => isset($row['owner']) ? maskemail($row['owner']) : '',
'reporter' => maskemail($row['reporter']),
'createddate' => date(DATE_FORMAT,$row['created_date']),
'createdtime' => date(TIME_FORMAT,$row['created_date']),
@@ -618,7 +622,7 @@
'prevlink' => $prevlink,
'nextlink' => $nextlink,
'prevnextsep' => $prevlink && $nextlink ? ' | ' : '',
- 'pos' => $_gv['pos']
+ 'pos' => isset($_gv['pos']) ? $_gv['pos'] : 0
));
switch($row['status_name']) {
case 'Unconfirmed' :
@@ -705,7 +709,7 @@
}
function show_projects() {
- global $me, $q, $t, $project, $STRING;
+ global $me, $q, $t, $project, $STRING, $TITLE;
// Show only active projects with at least one component
$q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
@@ -747,7 +751,7 @@
case 'history' : show_history($bugid); break;
case 'add' :
$perm->check('Editbug');
- if ($project) show_form();
+ if (isset($_gv['project'])) show_form();
else show_projects();
break;
case 'show' : show_bug($bugid); break;
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- include.php 2001/11/14 14:28:06 1.76
+++ include.php 2001/11/19 16:49:20 1.77
@@ -271,7 +271,7 @@
case 'os' :
$q->query("select {$box}_id, {$box}_name, regex from ".TBL_OS." order by sort_order");
while ($row = $q->grab()) {
- if ($value == '' and $row['Regex'] and
+ if ($value == '' and isset($row['Regex']) and
preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
elseif ($value == $row[$box.'_id']) $sel = ' selected';
else $sel = '';
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- newaccount.php 2001/11/13 03:53:04 1.21
+++ newaccount.php 2001/11/19 16:49:20 1.22
@@ -77,10 +77,12 @@
$t->set_block('content', 'loginentryarea', 'loginarea');
$t->set_var(array(
'error' => $error,
- 'login' => stripslashes($_pv['login']),
- 'email' => $_pv['email'],
- 'firstname' => stripslashes($_pv['firstname']),
- 'lastname' => stripslashes($_pv['lastname'])
+ 'login' => isset($_pv['login']) ? stripslashes($_pv['login']) : '',
+ 'email' => isset($_pv['email']) ? $_pv['email'] : '',
+ 'firstname' => isset($_pv['firstname']) ? stripslashes($_pv['firstname'])
+ : '',
+ 'lastname' => isset($_pv['lastname']) ? stripslashes($_pv['lastname'])
+ : ''
));
// Show the login field if necessary
@@ -94,7 +96,7 @@
$t->set_file('wrap','wrap.html');
$t->set_var('TITLE',$TITLE['newaccount']);
-if ($_pv['createaccount']) do_form();
+if (isset($_pv['createaccount'])) do_form();
else show_form();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Javier S. <js...@si...> - 2001-11-18 22:54:35
|
Hello Ben, I was testing web install whith Mysql (i will test after for pgsql), and got some problems to make it work ..here is a little sumury :-) -> I haven't set phplib on my include path, so install.php doesn't find include files : template.inc, and db_'.$_pv['db_type'].'.inc .. i have changed it . ->On each errors o lost all data of form . ->Email check seems to return false for any entry (hum, strange ) ->I use mozilla on linux to test this install, and when all checks ar ok, mozilla asks for saving config.php. ->I save config.php on server ->I got an error on index.php page (i have added phplib dir on config.php) *Fatal error*: Cannot instantiate non-existent class: in */home/httpd/virtualhosts/phpbt/phplib-7.2d/php/session.inc* on line *374* Any ideas ;-) |
|
From: Benjamin C. <bc...@us...> - 2001-11-14 14:28:09
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv7707
Modified Files:
bug.php include.php query.php user.php
Log Message:
Code cleanup
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- bug.php 2001/11/14 04:39:23 1.60
+++ bug.php 2001/11/14 14:28:06 1.61
@@ -27,7 +27,8 @@
///
/// Beautify the bug comments
function format_comments($comments) {
-
+ global $me;
+
// Set up the regex replacements
$patterns = array(
'/(bug)[[:space:]]*(#?)([0-9]+)/i', // matches bug #nn
@@ -447,7 +448,7 @@
}
function show_bug_printable($bugid) {
- global $q, $t, $select;
+ global $q, $t, $select, $TITLE;
if (!is_numeric($bugid) or
!$row = $q->grab('select b.*, reporter.login as reporter,
@@ -478,7 +479,7 @@
'severity' => $row['severity_name'],
'priority' => $select['priority'][$row['priority']],
'status' => $row['status_name'],
- 'resolution' => $row['resolution_name'] ? $row['resolution_name'] : '',
+ 'resolution' => !empty($row['resolution_name']) ? $row['resolution_name'] : '',
'owner' => maskemail($row['owner']),
'reporter' => maskemail($row['reporter']),
'createddate' => date(DATE_FORMAT,$row['created_date']),
@@ -500,8 +501,6 @@
} else {
while ($row = $q->grab()) {
$t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'trclass' => $i % 2 ? '' : 'alt',
'rdescription' => nl2br(format_comments(
htmlspecialchars($row['comment_text']))),
'rreporter' => maskemail($row['login']),
@@ -562,8 +561,8 @@
return array($prevlink, $nextlink);
}
-function show_bug($bugid = 0, $error = '') {
- global $q, $me, $t, $project, $STRING, $u, $perm, $_gv;
+function show_bug($bugid = 0, $error = array()) {
+ global $q, $me, $t, $project, $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
@@ -589,7 +588,7 @@
list($prevlink, $nextlink) = prev_next_links($bugid, $_gv['pos']);
$t->set_var(array(
- 'statuserr' => $error['status'] ? $error['status'].'<br><br>' : '',
+ 'statuserr' => isset($error['status']) ? $error['status'].'<br><br>' : '',
'bugid' => $bugid,
'TITLE' => "{$TITLE['editbug']} #$bugid",
'title' => stripslashes($row['title']),
@@ -599,7 +598,7 @@
'severity' => build_select('severity',$row['severity_id']),
'priority' => build_select('priority',$row['priority']),
'status' => $row['status_name'],
- 'resolution' => $row['resolution_name'] ? $row['resolution_name'] : '',
+ 'resolution' => !empty($row['resolution_name']) ? $row['resolution_name'] : '',
'owner' => maskemail($row['owner']),
'reporter' => maskemail($row['reporter']),
'createddate' => date(DATE_FORMAT,$row['created_date']),
@@ -650,6 +649,7 @@
if (!$q->num_rows()) {
$t->set_var('attrows', '<tr><td colspan="5" align="center">No attachments</td></tr>');
} else {
+ $j = 0;
while ($att = $q->grab()) {
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>";
@@ -688,6 +688,7 @@
if (!$q->num_rows()) {
$t->set_var('rows','');
} else {
+ $i = 1;
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- include.php 2001/11/14 04:58:06 1.75
+++ include.php 2001/11/14 14:28:06 1.76
@@ -143,7 +143,7 @@
function pparse($target, $handle, $append = false) {
global $auth, $perm, $q;
- $u = $auth->auth['uid'];
+ $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');
@@ -435,8 +435,8 @@
/// Return a delimited list if there is more than one element in $ary, otherwise
/// return the lone element as the list
function delimit_list($delimiter, $ary) {
- if ($ary[1]) return join($delimiter, $ary);
- elseif ($ary[0]) return ($ary[0]);
+ if (isset($ary[1])) return join($delimiter, $ary);
+ elseif (isset($ary[0])) return ($ary[0]);
else return '';
}
@@ -464,7 +464,7 @@
// Begin every page with a page_open
if (!defined('NO_AUTH')) {
page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
- $u = $auth->auth['uid'];
+ $u = isset($auth->auth['uid']) ? $auth->auth['uid'] : 0;
}
// Check to see if the user is trying to login
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- query.php 2001/11/14 04:58:06 1.41
+++ query.php 2001/11/14 14:28:06 1.42
@@ -194,7 +194,7 @@
$queryinfo['order'] = $order;
$queryinfo['sort'] = $sort;
- if (!$queryinfo['query'] or $op) {
+ if (empty($queryinfo['query']) or $op) {
$queryinfo['query'] = build_query($assignedto, $reportedby, $open);
}
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- user.php 2001/11/13 03:53:04 1.17
+++ user.php 2001/11/14 14:28:06 1.18
@@ -75,7 +75,7 @@
$t->set_var(array(
'column_name' => $field,
'column_title' => $title,
- 'checked' => $checked[$field] ? 'checked' : ''
+ 'checked' => !empty($checked[$field]) ? 'checked' : ''
));
$t->parse('list_rows', 'column_list_row', true);
}
@@ -84,7 +84,7 @@
$t->set_file('wrap', 'wrap.html');
$perm->check_group('User');
-if ($do) switch ($do) {
+if (isset($_pv['do'])) switch ($_pv['do']) {
case 'changepassword' : change_password($_pv['pass1'], $_pv['pass2']); break;
case 'changecolumnlist' : change_bug_list_columns($_pv['column_list']); break;
default : show_preferences_form();
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 14:28:09
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv7707/inc
Modified Files:
auth.php
Log Message:
Code cleanup
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- auth.php 2001/11/13 03:48:38 1.1
+++ auth.php 2001/11/14 14:28:06 1.2
@@ -43,7 +43,7 @@
}
function is_authenticated() {
- if ($this->auth['uid'] &&
+ if (isset($this->auth['uid']) && $this->auth['uid'] &&
($this->lifetime <= 0 || time() < $this->auth['exp'])) {
return $this->auth['uid'];
} else {
@@ -81,10 +81,10 @@
function unauth() {
$this->auth['uid'] = 0;
- $this->auth['perm'] = '';
+ $this->auth['perm'] = array();
$this->auth['exp'] = 0;
- $this->auth['group'] = '';
- $this->auth['db_fields'] = '';
+ $this->auth['group'] = array();
+ $this->auth['db_fields'] = array();
}
}
@@ -108,18 +108,18 @@
global $auth;
// Administrators always pass
- if ($auth->auth[$auth_var]['Admin']) {
+ if (isset($auth->auth[$auth_var]['Admin'])) {
return true;
}
if (is_array($reqs)) {
foreach ($reqs as $req) {
- if (!$auth->auth[$auth_var][$req]) {
+ if (!isset($auth->auth[$auth_var][$req])) {
return false;
}
}
} else {
- if (!$auth->auth[$auth_var][$reqs]) {
+ if (!isset($auth->auth[$auth_var][$reqs])) {
return false;
}
}
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:58:09
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv728/inc
Modified Files:
session.php
Log Message:
Code cleanup
Index: session.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/session.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- session.php 2001/11/13 03:48:39 1.1
+++ session.php 2001/11/14 04:58:06 1.2
@@ -482,8 +482,8 @@
*/
function set_tokenname(){
- $this->name = ("" == $this->cookiename) ? $this->classname : $this->cookiename;
- session_name ($this->name);
+ //$this->name = ("" == $this->cookiename) ? $this->classname : $this->cookiename;
+ session_name ($this->classname);
if (!$this->cookie_domain) {
$this->cookie_domain = get_cfg_var ("session.cookie_domain");
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:58:09
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv728
Modified Files:
include.php query.php
Log Message:
Code cleanup
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- include.php 2001/11/13 03:53:02 1.74
+++ include.php 2001/11/14 04:58:06 1.75
@@ -220,7 +220,7 @@
global $q, $select;
//create hash to map tablenames
- $cfgDatabase=array(
+ $cfgDatabase = array(
'group' => TBL_AUTH_GROUP,
'project' => TBL_PROJECT,
'component' => TBL_COMPONENT,
@@ -231,16 +231,18 @@
);
$text = '';
- $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
- $queries = array(
- 'group' => $querystart.' where group_name <> \'User\' order by group_name',
- 'severity' => $querystart.' where sort_order > 0 order by sort_order',
- 'status' => $querystart.' where sort_order > 0 order by sort_order',
- 'resolution' => $querystart.' where sort_order > 0 order by sort_order',
- 'project' => $querystart." where active > 0 order by {$box}_name",
- 'component' => $querystart." where project_id = $project order by {$box}_name",
- 'version' => $querystart." where project_id = $project order by {$box}_name"
- );
+ if (in_array($box, $cfgDatabase)) {
+ $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
+ $queries = array(
+ 'group' => $querystart.' where group_name <> \'User\' order by group_name',
+ 'severity' => $querystart.' where sort_order > 0 order by sort_order',
+ 'status' => $querystart.' where sort_order > 0 order by sort_order',
+ 'resolution' => $querystart.' where sort_order > 0 order by sort_order',
+ 'project' => $querystart." where active > 0 order by {$box}_name",
+ 'component' => $querystart." where project_id = $project order by {$box}_name",
+ 'version' => $querystart." where project_id = $project order by {$box}_name"
+ );
+ }
switch($box) {
case 'group' :
@@ -344,6 +346,7 @@
function multipages($nr, $page, $urlstr) {
global $me, $selrange;
+ $pages = '';
if (!$page) $page = 1;
if ($page == 'all') {
$selrange = $nr;
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- query.php 2001/11/14 04:11:02 1.40
+++ query.php 2001/11/14 04:58:06 1.41
@@ -36,6 +36,7 @@
global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE, $u;
$nq = new dbclass;
+ $js = '';
$t->set_file('content','queryform.html');
$t->set_block('content', 'savequeryblock', 'sqblock');
@@ -117,12 +118,12 @@
}
} else {
// Select boxes
- if ($status) $flags[] = 'b.status_id in ('.delimit_list(',',$status).')';
- if ($resolution) $flags[] = 'b.resolution_id in ('.delimit_list(',',$resolution).')';
- if ($os) $flags[] = 'b.os_id in ('.delimit_list(',',$os).')';
- if ($priority) $flags[] = 'b.priority in ('.delimit_list(',',$priority).')';
- if ($severity) $flags[] = 'b.severity_id in ('.delimit_list(',',$severity).')';
- if ($flags) $query[] = '('.delimit_list(' or ',$flags).')';
+ if (!empty($status)) $flags[] = 'b.status_id in ('.delimit_list(',',$status).')';
+ if (!empty($resolution)) $flags[] = 'b.resolution_id in ('.delimit_list(',',$resolution).')';
+ if (!empty($os)) $flags[] = 'b.os_id in ('.delimit_list(',',$os).')';
+ if (!empty($priority)) $flags[] = 'b.priority in ('.delimit_list(',',$priority).')';
+ if (!empty($severity)) $flags[] = 'b.severity_id in ('.delimit_list(',',$severity).')';
+ if (!empty($flags)) $query[] = '('.delimit_list(' or ',$flags).')';
// Email field(s)
if ($email1) {
@@ -137,7 +138,7 @@
}
// Text search field(s)
- foreach(array('title','tescription','url') as $searchfield) {
+ foreach(array('title','description','url') as $searchfield) {
if ($$searchfield) {
switch (${$searchfield."_type"}) {
case 'like' : $cond = "like '%".$$searchfield."%'"; break;
@@ -147,7 +148,7 @@
$fields[] = "$searchfield $cond";
}
}
- if ($fields) $query[] = '('.delimit_list(' or ',$fields).')';
+ if (!empty($fields)) $query[] = '('.delimit_list(' or ',$fields).')';
// Project/Version/Component
if ($projects) {
@@ -158,9 +159,11 @@
}
}
- if ($query) $querystring = delimit_list(' and ',$query);
- return $querystring;
- if (!$sess->is_registered('querystring')) $sess->register('querystring');
+ if (!empty($query)) {
+ return delimit_list(' and ',$query);
+ } else {
+ return '';
+ }
}
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
@@ -301,7 +304,7 @@
case 'reporter' :
case 'owner' :
case 'lastmodifier' :
- $coldata = maskemail($row[$field]);
+ $coldata = !empty($row[$field]) ? maskemail($row[$field]) : '';
$td_extra = 'class="center"';
break;
case 'priority' :
@@ -309,7 +312,7 @@
$td_extra = 'class="center"';
break;
default :
- $coldata = $row[$field];
+ $coldata = !empty($row[$field]) ? $row[$field] : '';
$td_extra = 'class="center"';
break;
}
@@ -329,6 +332,8 @@
$t->set_file('wrap','wrap.html');
+$reportedby = !empty($_gv['reportedby']) ? $_gv['reportedby'] : 0;
+$assignedto = !empty($_gv['assignedto']) ? $_gv['assignedto'] : 0;
if ($op) switch($op) {
case 'query' : show_query(); break;
case 'doquery' : $queryinfo['query'] = ''; list_items(); break;
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:39:27
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv30279/templates/default
Modified Files:
bugdisplay.html
Log Message:
Keep the prev|next working after updating a bug
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- bugdisplay.html 2001/11/14 04:11:02 1.11
+++ bugdisplay.html 2001/11/14 04:39:24 1.12
@@ -1,6 +1,7 @@
<form action="bug.php?op=update&bugid={bugid}" method="post">
<input type="hidden" name="projectid" value="{projectid}">
<input type="hidden" name="last_modified_date" value="{lastmodifieddate}">
+<input type="hidden" name="pos" value="{pos}">
<table border="0" width="640">
<tr>
<td>Bug <b>#{bugid}</b></td>
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:39:27
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv30279
Modified Files:
bug.php
Log Message:
Keep the prev|next working after updating a bug
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- bug.php 2001/11/14 04:11:02 1.59
+++ bug.php 2001/11/14 04:39:23 1.60
@@ -356,7 +356,7 @@
if ($changedfields or $comments) {
do_changedfields($u, $buginfo, $changedfields, $comments);
}
- header("Location: bug.php?op=show&bugid=$bugid");
+ header("Location: bug.php?op=show&bugid=$bugid&pos=$pos");
}
function do_form($bugid = 0) {
@@ -618,7 +618,8 @@
'developer_list' => build_select('owner'),
'prevlink' => $prevlink,
'nextlink' => $nextlink,
- 'prevnextsep' => $prevlink && $nextlink ? ' | ' : ''
+ 'prevnextsep' => $prevlink && $nextlink ? ' | ' : '',
+ 'pos' => $_gv['pos']
));
switch($row['status_name']) {
case 'Unconfirmed' :
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:11:05
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv25957
Modified Files:
CHANGELOG bug.php query.php
Log Message:
Added Previous and Next links for moving to other bugs in the bug list from the bug display page. The links don't show up when searching with no query parameters, and I'm thinking that may be the way it should be
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- CHANGELOG 2001/11/12 03:16:20 1.28
+++ CHANGELOG 2001/11/14 04:11:02 1.29
@@ -1,3 +1,9 @@
+-- 0.6.0 --
+: Fixed a bug with old queries being retained when submitting a new query.
+: Moved session and auth classes into the package.
+: Added Previous and Next links for moving to other bugs in the bug list
+ from the bug display page.
+
-- 0.5.1 -- 11 Nov 2001
: Fixed a bug (introduced in 0.5.0) with severity color not being pulled in
with the bug list database query.
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- bug.php 2001/11/13 03:53:00 1.58
+++ bug.php 2001/11/14 04:11:02 1.59
@@ -512,10 +512,58 @@
}
}
}
+
+///
+/// Grab the links for the previous and next bugs in the list
+function prev_next_links($bugid, $pos) {
+ global $q, $queryinfo;
+
+ if (!isset($queryinfo['query']) || !$queryinfo['query']) {
+ return array('', '');
+ }
+
+ $prevlink = $nextlink = '';
+ if ($pos) {
+ $offset = $pos - 1;
+ $limit = 2;
+ } else {
+ $offset = $pos;
+ $limit = 1;
+ }
+ $q->limit_query('select bug_id 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_RESOLUTION.' resolution on b.resolution_id = resolution.resolution_id, '.
+ TBL_SEVERITY.' severity, '.TBL_STATUS.' status, '.TBL_OS.' os, '.
+ TBL_VERSION.' version, '.TBL_COMPONENT.' component, '.TBL_PROJECT.' project
+ where b.severity_id = severity.severity_id and b.status_id = status.status_id
+ 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 {$queryinfo['query']} and bug_id <> $bugid
+ order by {$queryinfo['order']} {$queryinfo['sort']}", $limit, $offset);
+
+ $firstid = $q->grab_field();
+ $secondid = $q->grab_field();
+ if ($pos) {
+ if ($firstid) {
+ $prevlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos - 1).'\'>Previous</a>';
+ }
+ if ($secondid) {
+ $nextlink = "<a href='bug.php?op=show&bugid=$secondid&pos=".($pos + 1).'\'>Next</a>';
+ }
+ } else {
+ if ($firstid) {
+ $nextlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos + 1).'\'>Next</a>';
+ }
+ }
+
+ return array($prevlink, $nextlink);
+}
function show_bug($bugid = 0, $error = '') {
- global $q, $me, $t, $project, $STRING, $u, $perm;
+ global $q, $me, $t, $project, $STRING, $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
@@ -538,6 +586,8 @@
$t->set_block('content','crow','closerow');
$t->set_block('content','attrow','attrows');
$t->set_unknowns('remove');
+
+ list($prevlink, $nextlink) = prev_next_links($bugid, $_gv['pos']);
$t->set_var(array(
'statuserr' => $error['status'] ? $error['status'].'<br><br>' : '',
'bugid' => $bugid,
@@ -565,7 +615,10 @@
'cclist' => build_select('bug_cc', $bugid),
'submit' => $u == 'nobody' ? $STRING['logintomodify'] :
'<input type="submit" value="Submit">',
- 'developer_list' => build_select('owner')
+ 'developer_list' => build_select('owner'),
+ 'prevlink' => $prevlink,
+ 'nextlink' => $nextlink,
+ 'prevnextsep' => $prevlink && $nextlink ? ' | ' : ''
));
switch($row['status_name']) {
case 'Unconfirmed' :
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- query.php 2001/11/13 05:20:49 1.39
+++ query.php 2001/11/14 04:11:02 1.40
@@ -100,7 +100,7 @@
}
function build_query($assignedto, $reportedby, $open) {
- global $q, $sess, $auth, $querystring, $_gv;
+ global $q, $auth, $_gv;
foreach ($_gv as $k => $v) { $$k = $v; }
@@ -159,13 +159,14 @@
}
if ($query) $querystring = delimit_list(' and ',$query);
+ return $querystring;
if (!$sess->is_registered('querystring')) $sess->register('querystring');
}
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
- global $querystring, $me, $q, $t, $selrange, $order, $sort, $query,
+ global $queryinfo, $me, $q, $t, $selrange, $order, $sort, $query,
$page, $op, $select, $TITLE, $STRING, $savedqueryname, $u, $auth,
- $default_db_fields, $all_db_fields;
+ $default_db_fields, $all_db_fields, $sess;
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
@@ -179,17 +180,31 @@
values (".$q->nextid(TBL_SAVED_QUERY).", $u, '$savedqueryname', '$savedquerystring')");
}
if (!$order) {
- $order = 'bug_id';
- $sort = 'asc';
+ if (isset($queryinfo['order'])) {
+ $order = $queryinfo['order'];
+ $sort = $queryinfo['sort'];
+ } else {
+ $order = 'bug_id';
+ $sort = 'asc';
+ }
+ }
+ $queryinfo['order'] = $order;
+ $queryinfo['sort'] = $sort;
+
+ if (!$queryinfo['query'] or $op) {
+ $queryinfo['query'] = build_query($assignedto, $reportedby, $open);
}
- if (!$querystring or $op) {
- build_query($assignedto, $reportedby, $open);
+
+ if (!$sess->is_registered('queryinfo')) {
+ $sess->register('queryinfo');
}
+
$nr = $q->grab_field('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 '.
- ($querystring != '' ? "where $querystring": ''));
+ ($queryinfo['query'] != '' ? "where {$queryinfo['query']}": ''));
+ $queryinfo['numrows'] = $nr;
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -213,7 +228,7 @@
where b.severity_id = severity.severity_id and b.status_id = status.status_id
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 '.
- ($querystring != '' ? "and $querystring " : '').
+ ($queryinfo['query'] != '' ? "and {$queryinfo['query']} " : '').
"order by $order $sort", $selrange, $llimit);
$headers = array(
@@ -260,6 +275,7 @@
$t->parse('rows', 'row', true);
$t->set_var('cols', '');
+ $pos = 0;
// Data rows
while ($row = $q->grab()) {
$bgcolor = USE_SEVERITY_COLOR ? $row['severity_color'] :
@@ -279,7 +295,7 @@
break;
case 'bug_id' :
case 'title' :
- $coldata = "<a href='bug.php?op=show&bugid={$row['bug_id']}'>{$row[$field]}</a>";
+ $coldata = "<a href='bug.php?op=show&bugid={$row['bug_id']}&pos=$pos'>{$row[$field]}</a>";
$td_extra = '';
break;
case 'reporter' :
@@ -306,6 +322,7 @@
$t->set_var('tr-extra', "class='$trclass' bgcolor='$bgcolor' onClick=\"document.location.href='bug.php?op=show&bugid={$row['bug_id']}'\" onMouseOver=\"this.style.fontWeight='bold'\" onMouseOut=\"this.style.fontWeight='normal'\"");
$t->parse('rows','row',true);
$t->set_var('cols', '');
+ ++$pos;
}
$t->set_var('numcols', count($db_fields));
}
@@ -314,7 +331,7 @@
if ($op) switch($op) {
case 'query' : show_query(); break;
- case 'doquery' : $querystring = ''; list_items(); break;
+ case 'doquery' : $queryinfo['query'] = ''; list_items(); break;
case 'delquery' : delete_saved_query($queryid); break;
case 'mybugs' : list_items($assignedto, $reportedby, $open); break;
default : show_query(); break;
|
|
From: Benjamin C. <bc...@us...> - 2001-11-14 04:11:05
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv25957/templates/default
Modified Files:
bugdisplay.html
Log Message:
Added Previous and Next links for moving to other bugs in the bug list from the bug display page. The links don't show up when searching with no query parameters, and I'm thinking that may be the way it should be
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- bugdisplay.html 2001/11/08 14:27:35 1.10
+++ bugdisplay.html 2001/11/14 04:11:02 1.11
@@ -1,12 +1,15 @@
<form action="bug.php?op=update&bugid={bugid}" method="post">
<input type="hidden" name="projectid" value="{projectid}">
<input type="hidden" name="last_modified_date" value="{lastmodifieddate}">
-<table border='0' width="640">
+<table border="0" width="640">
<tr>
- <td width="210" colspan="2">
- Bug <b>#{bugid}</b>
- </td>
- <td width="210" colspan="2">
+ <td>Bug <b>#{bugid}</b></td>
+ <td align="right"><b>{prevlink}</b>{prevnextsep}<b>{nextlink}</b></td>
+ </tr>
+</table>
+<table border="0" width="640">
+ <tr>
+ <td width="420" colspan="4">
Reporter: <b>{reporter}</b>
</td>
<td width="210" colspan="2">
|
|
From: Benjamin C. <bc...@us...> - 2001-11-13 05:20:52
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv10601
Modified Files:
query.php
Log Message:
Fixes bug #466378 - query being retained
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- query.php 2001/11/13 03:53:04 1.38
+++ query.php 2001/11/13 05:20:49 1.39
@@ -314,7 +314,7 @@
if ($op) switch($op) {
case 'query' : show_query(); break;
- case 'doquery' : list_items(); break;
+ case 'doquery' : $querystring = ''; list_items(); break;
case 'delquery' : delete_saved_query($queryid); break;
case 'mybugs' : list_items($assignedto, $reportedby, $open); break;
default : show_query(); break;
|
|
From: Benjamin C. <bc...@us...> - 2001-11-13 03:53:07
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv22704/admin
Modified Files:
configure.php os.php project.php resolution.php severity.php
status.php user.php
Log Message:
Internalizing PHPlib stuff, and moving to PHP native sessions
Index: configure.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- configure.php 2001/10/13 23:15:52 1.1
+++ configure.php 2001/11/13 03:53:04 1.2
@@ -95,8 +95,6 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- os.php 2001/10/30 05:19:54 1.15
+++ os.php 2001/11/13 03:53:04 1.16
@@ -127,6 +127,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- project.php 2001/10/30 05:19:54 1.24
+++ project.php 2001/11/13 03:53:04 1.25
@@ -333,6 +333,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- resolution.php 2001/10/30 05:19:54 1.16
+++ resolution.php 2001/11/13 03:53:04 1.17
@@ -134,6 +134,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- severity.php 2001/10/30 05:19:54 1.12
+++ severity.php 2001/11/13 03:53:04 1.13
@@ -141,6 +141,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- status.php 2001/10/30 05:19:54 1.16
+++ status.php 2001/11/13 03:53:04 1.17
@@ -134,6 +134,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- user.php 2001/10/31 02:30:42 1.31
+++ user.php 2001/11/13 03:53:04 1.32
@@ -233,6 +233,4 @@
$t->pparse('main',array('content', 'wrap', 'main'));
-page_close();
-
?>
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22704
Modified Files:
attachment.php bug.php config.php include.php index.php
logout.php newaccount.php query.php report.php user.php
Log Message:
Internalizing PHPlib stuff, and moving to PHP native sessions
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- attachment.php 2001/10/12 04:19:31 1.10
+++ attachment.php 2001/11/13 03:52:59 1.11
@@ -168,6 +168,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- bug.php 2001/11/08 14:27:35 1.57
+++ bug.php 2001/11/13 03:53:00 1.58
@@ -704,6 +704,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- config.php 2001/10/30 03:59:51 1.15
+++ config.php 2001/11/13 03:53:01 1.16
@@ -62,11 +62,8 @@
define ('ONEDAY', 86400);
require_once (PHPLIB_PATH.'db_'.DB_TYPE.'.inc');
-require_once (PHPLIB_PATH.'ct_sql.inc');
-require_once (PHPLIB_PATH.'session.inc');
-require_once (PHPLIB_PATH.'auth.inc');
-require_once (PHPLIB_PATH.'perm.inc');
-require_once (PHPLIB_PATH.'page.inc');
-require_once (PHPLIB_PATH.'template.inc');
+require_once ('inc/session.php');
+require_once ('inc/auth.php');
+require_once ('inc/template.php');
?>
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- include.php 2001/11/08 05:13:15 1.73
+++ include.php 2001/11/13 03:53:02 1.74
@@ -27,7 +27,7 @@
define('INCLUDE_PATH', '');
}
-@require (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php');
+include (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php');
if (!defined('DB_HOST')) { // Installation hasn't been completed
header("Location: install.php");
exit();
@@ -133,123 +133,10 @@
$default_db_fields = array('bug_id', 'title', 'reporter', 'owner',
'severity_name', 'priority', 'status_name', 'resolution_name');
-class sqlclass extends CT_Sql {
- var $database_class = 'dbclass';
- var $database_table = TBL_ACTIVE_SESSIONS;
-}
-
class usess extends Session {
var $classname = 'usess';
- var $magic = 'gerdisbad';
- var $mode = 'cookie';
- #var $fallback_mode = 'get';
- var $lifetime = 0;
- var $that_class = 'sqlclass';
- var $allowcache = 'jl';
-}
-
-class uauth extends Auth {
- var $classname = 'uauth';
var $lifetime = 0;
- var $magic = 'looneyville';
- var $nobody = true;
-
- function auth_loginform() {
- global $sess;
-
- include 'templates/'.THEME.'/login.html';
-
- }
-
- function auth_validatelogin() {
- global $username, $password, $q, $select, $emailpass, $emailsuccess, $STRING;
-
- if (!$username) return 'nobody';
- $this->auth['uname'] = $username;
- if (ENCRYPT_PASS) {
- $password = md5($password);
- }
- $u = $q->grab("select * from ".TBL_AUTH_USER." where login = '$username' and password = '$password' and active > 0");
- if (!$q->num_rows()) {
- return 'nobody';
- } else {
- $this->auth['db_fields'] = unserialize($u['bug_list_fields']);
-
- // Grab group assignments and permissions based on groups
- $q->query("select group_name, perm_name"
- ." from ".TBL_AUTH_PERM." ap, ".TBL_GROUP_PERM." gp, ".TBL_AUTH_GROUP." ag, ".TBL_USER_GROUP." ug"
- ." where ap.perm_id = gp.perm_id and gp.group_id = ag.group_id"
- ." and ag.group_id = ug.group_id and ug.user_id = {$u['user_id']}");
- while (list($group, $perm) = $q->grab()) {
- $this->auth['perm'][$perm] = true;
- $this->auth['group'][$group] = true;
- }
-
- return $u['user_id'];
- }
- }
-
- function unauth($nobody = false) {
- Auth::unauth($nobody);
- $this->auth['group'] = '';
- $this->auth['db_fields'] = '';
- }
-}
-
-class uperm extends Perm {
- var $classname = 'uperm';
-
- function check_auth($auth_var, $reqs) {
- global $auth;
-
- // Administrators always pass
- if ($auth->auth[$auth_var]['Admin']) {
- return true;
- }
-
- if (is_array($reqs)) {
- foreach ($reqs as $req) {
- if (!$auth->auth[$auth_var][$req]) {
- return false;
- }
- }
- } else {
- if (!$auth->auth[$auth_var][$reqs]) {
- return false;
- }
- }
-
- // Didn't fail on any requirements? Then the user passes the check
- return true;
- }
-
-
- function in_group($req_groups) {
- return $this->check_auth('group', $req_groups);
- }
-
-
- function have_perm($req_perms) {
- return $this->check_auth('perm', $req_perms);
- }
-
-
- function perm_invalid() {
- global $t, $auth;
- $t->set_file('content','badperm.html');
- $t->pparse('main',array('content','wrap','main'));
- }
-
- function check_group($group) {
- global $t;
-
- if (!$this->check_auth('group', $group)) {
- $t->set_file('content', 'badgroup.html');
- $t->set_var('group', $group);
- $t->pparse('main',array('content','wrap','main'));
- exit();
- }
- }
+ var $allowcache = '';
}
class templateclass extends Template {
@@ -260,7 +147,7 @@
$this->set_block('wrap', 'logoutblock', 'loblock');
$this->set_block('wrap', 'loginblock', 'liblock');
$this->set_block('wrap', 'adminnavblock', 'anblock');
- if ($u && $u != 'nobody') {
+ 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 ) ,"
."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");
@@ -562,7 +449,7 @@
function maskemail($email) {
global $auth;
- if (HIDE_EMAIL && $auth->auth['uid'] == 'nobody') {
+ if (HIDE_EMAIL && !$auth->auth['uid']) {
return '******';
} elseif (MASK_EMAIL) {
return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
@@ -601,7 +488,7 @@
}
} else {
$auth->auth['uid'] = $auth->auth_validatelogin();
- if ($auth->auth['uid'] == 'nobody') {
+ if (!$auth->auth['uid']) {
$t->set_var(array(
'loginerrorcolor' => '#ff0000',
'loginerror' => 'Invalid login<br>'
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- index.php 2001/09/01 15:44:20 1.11
+++ index.php 2001/11/13 03:53:04 1.12
@@ -60,6 +60,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: logout.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/logout.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- logout.php 2001/10/15 13:51:43 1.6
+++ logout.php 2001/11/13 03:53:04 1.7
@@ -27,6 +27,4 @@
include 'templates/'.THEME.'/logout.html';
-page_close();
-
?>
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- newaccount.php 2001/11/06 04:40:18 1.20
+++ newaccount.php 2001/11/13 03:53:04 1.21
@@ -99,6 +99,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- query.php 2001/11/12 01:13:33 1.37
+++ query.php 2001/11/13 03:53:04 1.38
@@ -323,6 +323,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- report.php 2001/11/02 04:22:12 1.16
+++ report.php 2001/11/13 03:53:04 1.17
@@ -95,6 +95,4 @@
$t->pparse('main',array('content','wrap','main'));
-page_close();
-
?>
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- user.php 2001/10/12 04:19:31 1.16
+++ user.php 2001/11/13 03:53:04 1.17
@@ -93,6 +93,4 @@
$t->pparse('main', array('content', 'wrap', 'main'));
-page_close();
-
?>
|