You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Benjamin C. <bc...@us...> - 2003-08-31 04:44:12
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv7227
Modified Files:
Tag: htmltemplates
attachment.php
Log Message:
Switching to html templates and gettext
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.21.4.1
retrieving revision 1.21.4.2
diff -u -r1.21.4.1 -r1.21.4.2
--- attachment.php 30 Aug 2003 22:07:11 -0000 1.21.4.1
+++ attachment.php 31 Aug 2003 04:44:09 -0000 1.21.4.2
@@ -2,7 +2,7 @@
// attachment.php - Adding, deleting, and displaying attachments
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -25,82 +25,86 @@
include 'include.php';
function del_attachment($attachid) {
- global $db, $HTTP_SERVER_VARS;
+ global $db;
if (list($filename, $mimetype) = grab_attachment($attachid)) {
$db->query("delete from ".TBL_ATTACHMENT." where attachment_id = $attachid");
unlink($filename);
- header("Location: {$HTTP_SERVER_VARS['HTTP_REFERER']}");
+ header("Location: {$_SERVER['HTTP_REFERER']}");
}
}
function grab_attachment($attachid) {
- global $db, $STRING;
+ global $db;
if (!is_numeric($attachid)) {
- show_text($STRING['bad_attachment'], true);
+ show_text(translate("That attachment does not exist"), true);
return false;
}
- $ainfo = $db->getRow("select a.bug_id, file_name, mime_type, project_id"
- ." from ".TBL_ATTACHMENT." a, ".TBL_BUG." b"
- ." where attachment_id = $attachid and a.bug_id = b.bug_id");
+ $ainfo = $db->getRow("select a.bug_id, file_name, mime_type, project_id"." from ".TBL_ATTACHMENT." a, ".TBL_BUG." b"." where attachment_id = $attachid and a.bug_id = b.bug_id");
if (empty($ainfo)) {
- show_text($STRING['bad_attachment'], true);
+ show_text(translate("That attachment does not exist"), true);
return false;
}
$filename = join('/',array(ATTACHMENT_PATH,
$ainfo['project_id'], "{$ainfo['bug_id']}-{$ainfo['file_name']}"));
if (!is_readable($filename)) {
- show_text($STRING['bad_attachment'], true);
+ show_text(translate("That attachment does not exist"), true);
return false;
}
return array($filename, $ainfo['mime_type']);
}
function add_attachment($bugid, $description) {
- global $db, $HTTP_POST_FILES, $now, $u, $STRING, $t, $_pv;
+ global $db, $now, $u, $t;
- if (!isset($HTTP_POST_FILES['attachment']) ||
- $HTTP_POST_FILES['attachment']['tmp_name'] == 'none') {
- show_attachment_form($bugid, $STRING['give_attachment']);
+ if (!isset($_FILES['attachment'])) {
+ show_attachment_form($bugid, translate("Please specify a file to upload"));
+ return;
+ }
+
+ if ($_FILES['attachment']['tmp_name'] == 'none') {
+ if (empty($_FILES['attachment']['name'])) {
+ show_attachment_form($bugid, translate("Please specify a file to upload"));
+ } else {
+ show_attachment_form($bugid, sprintf(translate("The file you specified is larger than %s bytes"), number_format(ATTACHMENT_MAX_SIZE)));
+ }
return;
}
// Check the upload size. If the size was greater than the max in
// php.ini, the file won't even be set and will fail at the check above
- if ($HTTP_POST_FILES['attachment']['size'] > ATTACHMENT_MAX_SIZE) {
- show_attachment_form($bugid, $STRING['attachment_too_large']);
+ if ($_FILES['attachment']['size'] > ATTACHMENT_MAX_SIZE) {
+ show_attachment_form($bugid, printf(translate("The file you specified is larger than %d bytes"), number_format(ATTACHMENT_MAX_SIZE)));
return;
}
$projectid = $db->getOne("select project_id from ".TBL_BUG." where bug_id = $bugid");
if (!$projectid) {
- show_text($STRING['nobug'], true);
+ show_text(translate("That bug does not exist"), true);
return;
}
// Check for a previously-uploaded attachment with the same name, bug, and project
- $rs = $db->query("select a.bug_id, project_id from ".TBL_ATTACHMENT." a, ".
- TBL_BUG." b where file_name = '{$HTTP_POST_FILES['attachment']['name']}' ".
- "and a.bug_id = b.bug_id");
+ $rs = $db->query("select a.bug_id, project_id from ".TBL_ATTACHMENT." a, ".TBL_BUG." b where file_name = '{$_FILES['attachment']['name']}' and a.bug_id = b.bug_id");
while ($rs->fetchInto($ainfo)) {
if ($bugid == $ainfo['bug_id'] && $projectid == $ainfo['project_id']) {
- show_attachment_form($bugid, $STRING['dupe_attachment']);
+ show_attachment_form($bugid, translate("That attachment already exists for this bug"));
return;
}
}
$filepath = ATTACHMENT_PATH;
- $tmpfilename = $HTTP_POST_FILES['attachment']['tmp_name'];
- $filename = "$bugid-{$HTTP_POST_FILES['attachment']['name']}";
+ $tmpfilename = $_FILES['attachment']['tmp_name'];
+ $filename = "$bugid-{$_FILES['attachment']['name']}";
if (!is_dir($filepath)) {
- show_attachment_form($bugid, $STRING['no_attachment_save_path']);
+ show_attachment_form($bugid, translate("Couldn't find where to save the file!"));
return;
}
if (!is_writeable($filepath)) {
- show_attachment_form($bugid, $STRING['attachment_path_not_writeable']);
+ show_attachment_form($bugid, translate("Couldn't create a file in the save path"));
return;
}
@@ -108,39 +112,33 @@
@mkdir("$filepath/$projectid", 0775);
}
- if (!@move_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'],
+ if (!@move_uploaded_file($_FILES['attachment']['tmp_name'],
"$filepath/$projectid/$filename")) {
- show_attachment_form($bugid, $STRING['attachment_move_error']);
+ show_attachment_form($bugid, translate("There was an error moving the uploaded file"));
return;
}
@chmod("$filepath/$projectid/$filename", 0766);
- $db->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, ".
- "description, file_size, mime_type, created_by, created_date) values (".
- join(', ', array($db->nextId(TBL_ATTACHMENT), $bugid,
- $db->quote($HTTP_POST_FILES['attachment']['name']),
- $db->quote(stripslashes($description)),
- $HTTP_POST_FILES['attachment']['size'],
- $db->quote($HTTP_POST_FILES['attachment']['type']), $u, $now)).")");
+ $db->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, description, file_size, mime_type, created_by, created_date) values (".join(', ', array($db->nextId(TBL_ATTACHMENT), $bugid, $db->quote($_FILES['attachment']['name']), $db->quote(stripslashes($description)), $_FILES['attachment']['size'], $db->quote($_FILES['attachment']['type']), $u, $now)).")");
- if ($_pv['use_js']) {
- $t->display('admin/edit-submit.html');
+ if ($_POST['use_js']) {
+ $t->render('admin/edit-submit.html');
} else {
header("Location: bug.php?op=show&bugid=$bugid");
}
}
function show_attachment_form($bugid, $error = '') {
- global $db, $t, $STRING;
+ global $db, $t;
if (!is_numeric($bugid)) {
- show_text($STRING['nobug'], true);
+ show_text(translate("That bug does not exist"), true);
return;
}
$bugexists = $db->getOne("select count(*) from ".TBL_BUG." where bug_id = $bugid");
if (!$bugexists) {
- show_text($STRING['nobug'], true);
+ show_text(translate("That bug does not exist"), true);
return;
}
@@ -153,20 +151,21 @@
? number_format(ini_get('upload_max_filesize'))
: number_format(ATTACHMENT_MAX_SIZE)
));
- $t->render('bugattachmentform.html', translate('Add Attachment'), 'wrap-popup.html');
+ $t->render('bugattachmentform.html', translate("Add Attachment"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
-if (isset($_gv['del'])) {
+if (isset($_GET['del'])) {
if (!$perm->have_perm('Administrator')) {
- show_text($STRING['bad_permission']);
+ show_text(translate("You do not have the permissions required for that function"));
} else {
- del_attachment($_gv['del']);
+ del_attachment($_GET['del']);
}
-} elseif (isset($_pv['submit'])) {
+} elseif (isset($_POST['submit'])) {
$perm->check('Editbug');
- add_attachment($_pv['bugid'], $_pv['description']);
-} elseif (isset($_gv['attachid'])) {
- if (list($filename, $mimetype) = grab_attachment($_gv['attachid'])) {
+ add_attachment($_POST['bugid'], $_POST['description']);
+} elseif (isset($_GET['attachid'])) {
+ if (list($filename, $mimetype) = grab_attachment($_GET['attachid'])) {
$base = basename($filename);
header("Content-Disposition: attachment; filename=\"$base\"");
header("Content-Type: $mimetype");
@@ -178,7 +177,7 @@
}
} else {
$perm->check('Editbug');
- show_attachment_form($_gv['bugid']);
+ show_attachment_form($_GET['bugid']);
}
?>
|
|
From: Benjamin C. <bc...@us...> - 2003-08-30 22:10:55
|
Update of /cvsroot/phpbt/phpbt/inc
In directory sc8-pr-cvs1:/tmp/cvs-serv22871
Modified Files:
Tag: htmltemplates
functions.php
Log Message:
Switching to html templates and gettext
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -r1.44 -r1.44.2.1
--- functions.php 24 Jul 2003 04:57:00 -0000 1.44
+++ functions.php 30 Aug 2003 22:10:52 -0000 1.44.2.1
@@ -44,14 +44,9 @@
///
/// Build a select box with the item matching $value selected
-function build_select($params) {
+function build_select($box, $selected = '', $project = 0) {
global $db, $select, $perm, $STRING, $restricted_projects, $QUERY;
- extract($params);
- if (!isset($selected)) {
- $selected = '';
- }
-
// create hash to map tablenames
$cfgDatabase = array(
'group' => TBL_AUTH_GROUP,
@@ -163,6 +158,20 @@
maskemail($row['login'])."</option>";
}
break;
+ case 'reporter':
+ global $u;
+ $rs = $db->query("select u.user_id, login from ".TBL_AUTH_USER." u where u.active > 0 order by login");
+ while ($rs->fetchInto($row)) {
+ // either singular matches, or array matches are acceptable
+ if ($u == $row['user_id']) {
+ $sel = ' selected';
+ } else {
+ $sel = '';
+ }
+ $text .= "<option value=\"{$row['user_id']}\"$sel>".
+ maskemail($row['login'])."</option>";
+ }
+ break;
case 'bug_cc':
$rs = $db->query(sprintf($QUERY['functions-bug-cc'], $selected));
while (list($uid, $user) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
@@ -273,6 +282,19 @@
}
///
+/// Return human-friendly text for a value
+function lookup($var, $val) {
+ global $db;
+
+ switch($var) {
+ case 'assigned_to' :
+ return maskemail($db->getOne("select login from ".TBL_AUTH_USER." where user_id = $val"));
+ break;
+ }
+}
+
+
+///
/// Divide the results of a database query into multiple pages
function multipages($nr, $page, $urlstr) {
global $me, $selrange, $t, $u, $db, $perm;
@@ -402,10 +424,9 @@
///
/// Build the javascript for the dynamic project -> component -> version select boxes
-function build_project_js($params) {
+function build_project_js($no_all = false) {
global $db, $u, $perm, $_sv, $QUERY;
- extract($params);
$js = ''; $js2 = '';
// Build the javascript-powered select boxes
@@ -571,17 +592,25 @@
return ($retval);
}
+function translate($string, $plural = false) {
+ if (USE_GETTEXT) {
+ return $plural ? ngettext($string) : gettext($string);
+ } else {
+ return $string;
+ }
+}
+
// Generate a testable WHERE expression for closed bugs
function in_closed($column) {
global $db;
- $closed_statuses = array();
+ $closed_statuses = array(0);
foreach($db->getAll('SELECT status_id FROM '.TBL_STATUS.' WHERE bug_open = 0') as $row) {
$closed_statuses[] = (int)$row['status_id'];
}
- return '('.$column.' = '.(count($closed_statuses ? join(' OR '.$column.' = ', $closed_statuses) : '1')).')';
+ return '('.$column.' in ('.(@join(', ', $closed_statuses)).'))';
}
// Check whether or not a status-id means BUG_CLOSED
@@ -594,4 +623,5 @@
return false;
}
}
+
?>
|
|
From: Benjamin C. <bc...@us...> - 2003-08-30 22:08:53
|
Update of /cvsroot/phpbt/phpbt/styles
In directory sc8-pr-cvs1:/tmp/cvs-serv22605/styles
Modified Files:
Tag: htmltemplates
default.css
Log Message:
New styles for the new templates
Index: default.css
===================================================================
RCS file: /cvsroot/phpbt/phpbt/styles/default.css,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -r1.4 -r1.4.4.1
--- default.css 12 Jun 2003 12:17:43 -0000 1.4
+++ default.css 30 Aug 2003 22:08:50 -0000 1.4.4.1
@@ -24,13 +24,14 @@
font-family: "Arial","Helvetica","MS Sans Serif","Sans-Serif";
font-size: 12px;
color: #000000;
- background-color: #eeeeee;
+ background-color: #ffc;
}
th.selected {
font-weight: bold;
text-align: center;
- background-color: #bbbbbb;
+ background-color: #ffc;
+ font-style: italic;
}
select {
@@ -232,4 +233,21 @@
a.navlink:hover {
text-decoration: underline;
+}
+
+.bordertable {
+ width: 90%;
+}
+
+.bordertable, .bordertable td {
+ border: 1px solid #666666;
+ border-collapse: collapse;
+}
+
+.bordertable td {
+ padding: 2px 4px;
+}
+
+.pagination {
+ padding: 5px;
}
|
|
From: Benjamin C. <bc...@us...> - 2003-08-30 22:08:38
|
Update of /cvsroot/phpbt/phpbt/schemas
In directory sc8-pr-cvs1:/tmp/cvs-serv22577/schemas
Modified Files:
Tag: htmltemplates
mysql.in pgsql.in
Log Message:
Added EditAssignment permission
Index: mysql.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v
retrieving revision 1.43
retrieving revision 1.43.2.1
diff -u -r1.43 -r1.43.2.1
--- mysql.in 24 Jul 2003 04:50:51 -0000 1.43
+++ mysql.in 30 Aug 2003 22:08:35 -0000 1.43.2.1
@@ -298,6 +298,7 @@
# ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug');
+INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment');
# Admins can do all the admin stuff and users can edit bugs
INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1);
Index: pgsql.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v
retrieving revision 1.43
retrieving revision 1.43.4.1
diff -u -r1.43 -r1.43.4.1
--- pgsql.in 4 Jun 2003 18:47:21 -0000 1.43
+++ pgsql.in 30 Aug 2003 22:08:35 -0000 1.43.4.1
@@ -292,6 +292,7 @@
-- ... and only two permissions
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (1, 'Admin');
INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (2, 'Editbug');
+INSERT INTO TBL_AUTH_PERM (perm_id, perm_name) VALUES (3, 'EditAssignment');
-- Admins can do all the admin stuff and users can edit bugs
INSERT INTO TBL_GROUP_PERM (group_id, perm_id) VALUES (1, 1);
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv22383
Modified Files:
Tag: htmltemplates
attachment.php bug.php include.php index.php install.php
query.php report.php user.php
Log Message:
Switching to html templates and gettext
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -u -r1.21 -r1.21.4.1
--- attachment.php 20 May 2003 03:08:01 -0000 1.21
+++ attachment.php 30 Aug 2003 22:07:11 -0000 1.21.4.1
@@ -153,7 +153,7 @@
? number_format(ini_get('upload_max_filesize'))
: number_format(ATTACHMENT_MAX_SIZE)
));
- $t->wrap('bugattachmentform.html', 'addattachment');
+ $t->render('bugattachmentform.html', translate('Add Attachment'), 'wrap-popup.html');
}
if (isset($_gv['del'])) {
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.134
retrieving revision 1.134.2.1
diff -u -r1.134 -r1.134.2.1
--- bug.php 24 Jul 2003 04:47:13 -0000 1.134
+++ bug.php 30 Aug 2003 22:07:12 -0000 1.134.2.1
@@ -33,7 +33,7 @@
'from '.TBL_AUTH_USER.' u, '.TBL_BUG_VOTE." v ".
"where u.user_id = v.user_id and bug_id = $bug_id ".
'order by v.created_date'));
- $t->wrap('bugvotes.html', 'bugvotes');
+ $t->render('bugvotes.html', translate('Bug Votes'));
}
///
@@ -113,7 +113,7 @@
}
$t->assign('history', $db->getAll(sprintf($QUERY['bug-history'], $bugid)));
- $t->wrap('bughistory.html', 'bughistory');
+ $t->render('bughistory.html', translate('Bug History'));
}
///
@@ -632,20 +632,20 @@
}
function show_form($bugid = 0, $error = '') {
- global $db, $me, $t, $_gv, $_pv, $TITLE;
+ global $db, $t;
- $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = {$_gv['project']}");
+ $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = {$_GET['project']}");
if ($bugid && !$error) {
$t->assign($db->getRow("select * from ".TBL_BUG." where bug_id = '$bugid'"));
} else {
$t->assign($_pv);
$t->assign(array(
'error' => $error,
- 'project' => $_gv['project'],
+ 'project' => $_GET['project'],
'projectname' => $projectname
));
}
- $t->wrap('bugform.html', 'enterbug');
+ $t->render('bugform.html', translate('Create Bug'));
}
function show_bug_printable($bugid) {
@@ -675,7 +675,7 @@
' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER.
" where bug_id = $bugid and c.created_by = user_id order by c.created_date"
));
- $t->wrap('bugdisplay-printable.html', 'viewbug');
+ $t->render('bugdisplay-printable.html', translate('View Bug'));
}
///
@@ -800,7 +800,7 @@
" where bug_id = $bugid and c.created_by = user_id order by c.created_date")
));
- $t->wrap('bugdisplay.html', 'viewbug');
+ $t->render('bugdisplay.html', translate('View Bug'));
}
function show_projects() {
@@ -824,12 +824,12 @@
show_text($STRING['noprojects'], true);
return;
case 1 :
- $_gv['project'] = $projects[0]['project_id'];
+ $_GET['project'] = $projects[0]['project_id'];
show_form();
break;
default :
$t->assign('projects', $projects);
- $t->wrap('projectlist.html', 'enterbug');
+ $t->render('projectlist.html', translate('Select Project'));
}
}
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.126
retrieving revision 1.126.4.1
diff -u -r1.126 -r1.126.4.1
--- include.php 5 Jul 2003 22:57:33 -0000 1.126
+++ include.php 30 Aug 2003 22:07:12 -0000 1.126.4.1
@@ -106,49 +106,33 @@
// Template class
-if (!@include(SMARTY_PATH . 'Smarty.class.php')) {
- include('templates/default/base/smartymissing.html');
- exit;
-}
-
-class extSmarty extends Smarty {
+class template {
+ var $vars;
- function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) {
- error_reporting(E_ALL ^ E_NOTICE); // Clobber Smarty warnings
- return Smarty::fetch($_smarty_tpl_file, $_smarty_cache_id, $_smarty_compile_id, $_smarty_display);
+ function template() {
+ $this->vars = array();
}
- function wrap($template, $title = '') {
- global $TITLE, $_gv, $_pv;
+ function render($content_template, $page_title, $wrap_file = '') {
+ extract($this->vars);
+ $path = defined('TEMPLATE_PATH')
+ ? './templates/'.THEME.'/'.TEMPLATE_PATH.'/'
+ : './templates/'.THEME.'/';
+ include($wrap_file ? $path.$wrap_file : $path.'wrap.html');
+ }
- $this->assign(array(
- 'content_template' => $template,
- 'page_title' => isset($TITLE[$title]) ? $TITLE[$title] : $title
- ));
-
- // Use a popup wrap?
- if ((isset($_gv['use_js']) and $_gv['use_js']) or
- (isset($_pv['use_js']) and $_pv['use_js'])) {
- $wrap = 'wrap-popup.html';
- } else {
- $wrap = 'wrap.html';
- }
- if (($dir = dirname($template)) != '.') {
- $this->display("$dir/$wrap");
+ function assign($var, $value = '') {
+ if (is_array($var)) {
+ foreach ($var as $k => $v) {
+ $this->vars[$k] = $v;
+ }
} else {
- $this->display($wrap);
+ $this->vars[$var] = $value;
}
}
}
-$t = new extSmarty;
-$t->template_dir = 'templates/'.THEME.'/';
-$t->compile_dir = 'c_templates';
-$t->config_dir = '.';
-$t->use_sub_dirs = false;
-$t->register_function('build_select', 'build_select');
-$t->register_function('project_js', 'build_project_js');
-$t->register_modifier('date', 'bt_date');
+$t = new template();
$t->assign(array(
'STRING' => $STRING,
'TITLE' => $TITLE,
@@ -162,6 +146,16 @@
}
// End classes -- Begin page
+
+// Set the domain if gettext is available
+if (function_exists('gettext')) {
+ define('USE_GETTEXT', true);
+ setlocale(LC_ALL, LOCALE);
+ bindtextdomain('phpbt', './locale');
+ textdomain('phpbt');
+} else {
+ define('USE_GETTEXT', false);
+}
if (!defined('NO_AUTH')) {
session_start();
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -r1.39 -r1.39.2.1
--- index.php 24 Jul 2003 04:47:13 -0000 1.39
+++ index.php 30 Aug 2003 22:07:12 -0000 1.39.2.1
@@ -90,16 +90,6 @@
"<img align=\"right\" src=\"jpgimages/".GenImgName()."\" ISMAP USEMAP=\"#myimagemap\" border=0>";
}
-// Show the overall bug stats
-if (USE_JPGRAPH) {
- if (!is_writeable('jpgimages')) {
- $t->assign('summary_image', $STRING['image_path_not_writeable']);
- } else {
- $t->assign('summary_image', build_image($restricted_projects));
- }
-} else {
- $t->assign('stats', grab_data($restricted_projects));
-}
if (SHOW_PROJECT_SUMMARIES) {
$querystring = $QUERY['index-projsummary-1'];
@@ -157,7 +147,7 @@
// End Create links for the project resolutions
$t->assign($aProjects);
-
+ $t->assign('resfields', $resfields);
$db->setOption('optimize', 'portability');
}
@@ -183,6 +173,7 @@
}
}
-$t->wrap('index.html', 'home');
+$t->assign('restricted_projects', $restricted_projects);
+$t->render('index.html', translate('Home'));
?>
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -r1.39 -r1.39.2.1
--- install.php 24 Jul 2003 04:47:13 -0000 1.39
+++ install.php 30 Aug 2003 22:07:12 -0000 1.39.2.1
@@ -111,15 +111,14 @@
header("Location: index.php");
}
-function build_select($params) {
+function build_select($selected = 0) {
global $db_types;
- extract($params);
$text = '';
foreach ($db_types as $val => $item) {
if ($selected == $val and $selected != '') $sel = ' selected';
- else $sel = '';
- $text .= "<option value=\"$val\"$sel>$item</option>";
+ else $sel = '';
+ $text .= "<option value=\"$val\"$sel>$item</option>";
}
echo $text;
}
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.98
retrieving revision 1.98.2.1
diff -u -r1.98 -r1.98.2.1
--- query.php 23 Jul 2003 01:22:12 -0000 1.98
+++ query.php 30 Aug 2003 22:07:12 -0000 1.98.2.1
@@ -25,11 +25,11 @@
include 'include.php';
function delete_saved_query($queryid) {
- global $db, $u, $me, $_gv;
+ global $db, $u, $me;
$db->query("delete from ".TBL_SAVED_QUERY." where user_id = $u
and saved_query_id = $queryid");
- if (!empty($_gv['form']) and $_gv['form'] == 'advanced') {
+ if (!empty($_GET['form']) and $_GET['form'] == 'advanced') {
header("Location: $me?op=query&form=advanced");
} else {
header("Location: $me?op=query");
@@ -37,7 +37,7 @@
}
function show_query() {
- global $db, $t, $TITLE, $u, $_gv;
+ global $db, $t, $TITLE, $u;
if ($u != 'nobody') {
// Grab the saved queries if there are any
@@ -46,19 +46,19 @@
}
// Show the advanced query form
- if (!empty($_gv['form']) and $_gv['form'] == 'advanced') {
- $t->wrap('queryform.html', 'bugquery');
+ if (!empty($_GET['form']) and $_GET['form'] == 'advanced') {
+ $t->render('queryform.html', translate('Query Bugs'));
} else { // or show the simple one
- $t->wrap('queryform-simple.html', 'bugquery');
+ $t->render('queryform-simple.html', translate('Query Bugs'));
}
}
function build_query($assignedto, $reportedby, $open) {
- global $db, $_sv, $_gv, $perm, $restricted_projects;
+ global $db, $perm, $restricted_projects;
$paramstr = '';
- foreach ($_gv as $k => $v) {
+ foreach ($_GET as $k => $v) {
$$k = $v;
if ($k == 'order' or $k == 'sort') continue;
if (is_array($v)) {
@@ -75,9 +75,9 @@
$query[] = 'b.status_id '.($open ? '' : 'not ').
'in ('.OPEN_BUG_STATUSES.')';
if ($assignedto) {
- $query[] = "assigned_to = {$_sv['uid']}";
+ $query[] = "assigned_to = {$_SESSION['uid']}";
} else {
- $query[] = "b.created_by = {$_sv['uid']}";
+ $query[] = "b.created_by = {$_SESSION['uid']}";
}
} else {
// Select boxes
@@ -124,30 +124,28 @@
}
// Search for additional comments with 'description'
- $bugs_with_comment = array();
- foreach ($db->getAll('SELECT bug_id FROM '.TBL_COMMENT.' WHERE comment_text LIKE \'%'.$description.'%\'') as $row) {
- $bugs_with_comment[] = $row['bug_id'];
+ // TODO: Change this to match the condition selected (see below for rlike, not rlike, etc.)
+ if (!empty($description)) {
+ $bugs_with_comment = array(0);
+ foreach ($db->getAll('SELECT bug_id FROM '.TBL_COMMENT.' WHERE comment_text LIKE \'%'.$description.'%\'') as $row) {
+ $bugs_with_comment[] = $row['bug_id'];
+ }
}
// Text search field(s)
- foreach(array('title','url') as $searchfield) {
+ foreach(array('title','url', 'description') as $searchfield) {
if (!empty($$searchfield)) {
switch (${$searchfield."_type"}) {
case 'like' : $cond = "like '%".$$searchfield."%'"; break;
case 'rlike' : $cond = "rlike '".$$searchfield."'"; break;
case 'not rlike' :$cond = "not rlike '".$$searchfield."'"; break;
}
- $fields[] = "$searchfield $cond";
+ $fields[] = "$searchfield $cond".
+ ($searchfield == 'description'
+ ? ' or bug_id in ('.@join(', ', $bugs_with_comment).')'
+ : '');
}
}
- if (!empty($description)) {
- switch($description_type) {
- case 'like' : $cond = 'like \'%'.$description.'%\''; break;
- case 'rlike' : $cond = 'rlike \''.$description.'\''; break;
- case 'not rlike' : $cond = 'not rlike \''.$description.'\'';
- }
- $fields[] = '(description '.$cond.(count($bugs_with_comment) ? ' OR bug_id = '.join(' OR bug_id = ', $bugs_with_comment):'').')';
- }
if (!empty($fields)) $query[] = '('.@join(' and ',$fields).')';
// Project/Version/Component
@@ -180,45 +178,40 @@
function format_bug_col($colvalue, $coltype, $bugid, $pos) {
global $select;
- $pos--;
-
switch ($coltype) {
case 'url' :
- echo "<a href=\"$colvalue\" target=\"_new\">$colvalue</a>";
+ return "<a href=\"$colvalue\" target=\"_new\">$colvalue</a>";
break;
case 'created_date' :
case 'last_modified_date' :
case 'close_date' :
- echo '<div align="center">'.
+ return '<div align="center">'.
($colvalue ? date(DATE_FORMAT, $colvalue) : ' ').
'</div>';
break;
case 'bug_id' :
case 'title' :
- echo "<a href=\"bug.php?op=show&bugid=$bugid&pos=$pos\">$colvalue</a>";
+ return "<a href=\"bug.php?op=show&bugid=$bugid&pos=$pos\">$colvalue</a>";
break;
case 'reporter' :
case 'owner' :
case 'lastmodifier' :
- echo '<div align="center">'.
+ return '<div align="center">'.
(!empty($colvalue) ? maskemail($colvalue) : '').'</div>';
break;
case 'priority' :
- echo '<div align="center">'.$select['priority'][$colvalue].'</div>';
+ return '<div align="center">'.$select['priority'][$colvalue].'</div>';
break;
default :
- echo '<div align="center">'.
+ return '<div align="center">'.
(!empty($colvalue) ? $colvalue : '').'</div>';
break;
}
}
-$t->register_modifier('modify_bug_col', 'format_bug_col');
-
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
- global $me, $db, $t, $select, $TITLE, $STRING, $_gv, $u,
- $default_db_fields, $all_db_fields, $HTTP_SESSION_VARS, $HTTP_SERVER_VARS,
- $QUERY;
+ global $me, $db, $t, $select, $TITLE, $STRING, $u,
+ $default_db_fields, $all_db_fields, $QUERY;
$query_db_fields = array(
'bug_id' => 'bug_id',
@@ -272,13 +265,13 @@
'close_date' => 'close_date'
);
- extract($_gv);
+ extract($_GET);
if (!isset($page)) {
$page = 1;
}
// Save the query if requested
if (!empty($savedqueryname)) {
- $savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\1', $HTTP_SERVER_VARS['QUERY_STRING']);
+ $savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\1', $_SERVER['QUERY_STRING']);
$savedquerystring .= '&op=doquery';
if ($savedqueryoverride) { // Updating an existing query
$db->query("update ".TBL_SAVED_QUERY." set saved_query_string = ".
@@ -296,9 +289,9 @@
}
}
if (!isset($order)) {
- if (isset($HTTP_SESSION_VARS['queryinfo']['order'])) {
- $order = $HTTP_SESSION_VARS['queryinfo']['order'];
- $sort = $HTTP_SESSION_VARS['queryinfo']['sort'];
+ if (isset($_SESSION['queryinfo']['order'])) {
+ $order = $_SESSION['queryinfo']['order'];
+ $sort = $_SESSION['queryinfo']['sort'];
} else {
$order = 'bug_id';
$sort = 'asc';
@@ -306,27 +299,27 @@
}
if (!session_is_registered('queryinfo')) {
session_register('queryinfo');
- $HTTP_SESSION_VARS['queryinfo'] = array();
+ $_SESSION['queryinfo'] = array();
}
- $HTTP_SESSION_VARS['queryinfo']['order'] = $order;
- $HTTP_SESSION_VARS['queryinfo']['sort'] = $sort;
+ $_SESSION['queryinfo']['order'] = $order;
+ $_SESSION['queryinfo']['sort'] = $sort;
- if (empty($HTTP_SESSION_VARS['queryinfo']['query']) or isset($op)) {
- list($HTTP_SESSION_VARS['queryinfo']['query'], $paramstr) =
+ if (empty($_SESSION['queryinfo']['query']) or isset($op)) {
+ list($_SESSION['queryinfo']['query'], $paramstr) =
build_query($assignedto, $reportedby, $open);
}
$nr = $db->getOne($QUERY['query-list-bugs-count'].
- (!empty($HTTP_SESSION_VARS['queryinfo']['query'])
+ (!empty($_SESSION['queryinfo']['query'])
? $QUERY['query-list-bugs-count-join'].
- $HTTP_SESSION_VARS['queryinfo']['query']
+ $_SESSION['queryinfo']['query']
: ''));
- $HTTP_SESSION_VARS['queryinfo']['numrows'] = $nr;
+ $_SESSION['queryinfo']['numrows'] = $nr;
list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort");
- $desired_fields = !empty($HTTP_SESSION_VARS['db_fields']) ?
- $HTTP_SESSION_VARS['db_fields'] : $default_db_fields;
+ $desired_fields = !empty($_SESSION['db_fields']) ?
+ $_SESSION['db_fields'] : $default_db_fields;
$query_fields = array('bug_id as bug_link_id', 'severity.severity_color');
foreach ($desired_fields as $field) {
@@ -342,23 +335,23 @@
$t->assign('bugs', $db->getAll($db->modifyLimitQuery(
sprintf($QUERY['query-list-bugs'], join(', ', $query_fields),
- (!empty($HTTP_SESSION_VARS['queryinfo']['query'])
- ? "and {$HTTP_SESSION_VARS['queryinfo']['query']} " : ''),
+ (!empty($_SESSION['queryinfo']['query'])
+ ? "and {$_SESSION['queryinfo']['query']} " : ''),
$order, $sort), $llimit, $selrange)));
sorting_headers($me, $headers, $order, $sort, "page=$page".
(!empty($paramstr) ? $paramstr : ''));
- $t->wrap('buglist.html', 'buglist');
+ $t->render('buglist.html', translate('Bug List'));
}
-$reportedby = !empty($_gv['reportedby']) ? $_gv['reportedby'] : 0;
-$assignedto = !empty($_gv['assignedto']) ? $_gv['assignedto'] : 0;
-$open = !empty($_gv['open']) ? $_gv['open'] : 0;
+$reportedby = !empty($_GET['reportedby']) ? $_GET['reportedby'] : 0;
+$assignedto = !empty($_GET['assignedto']) ? $_GET['assignedto'] : 0;
+$open = !empty($_GET['open']) ? $_GET['open'] : 0;
-if (isset($_gv['op'])) switch($_gv['op']) {
+if (isset($_GET['op'])) switch($_GET['op']) {
case 'query' : show_query(); break;
- case 'doquery' : $_sv['queryinfo'] = array(); list_items(); break;
- case 'delquery' : delete_saved_query($_gv['queryid']); break;
+ case 'doquery' : $_SESSION['queryinfo'] = array(); list_items(); break;
+ case 'delquery' : delete_saved_query($_GET['queryid']); break;
case 'mybugs' : list_items($assignedto, $reportedby, $open); break;
default : show_query(); break;
}
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.26
retrieving revision 1.26.6.1
diff -u -r1.26 -r1.26.6.1
--- report.php 18 May 2002 02:59:32 -0000 1.26
+++ report.php 30 Aug 2003 22:07:12 -0000 1.26.6.1
@@ -59,7 +59,7 @@
));
$db->setOption('optimize', 'portability');
- $t->wrap('report.html', 'reporting');
+ $t->render('report.html', translate("Reporting"));
}
function new_bugs_by_date($date_range) {
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -u -r1.28 -r1.28.4.1
--- user.php 4 Jun 2003 18:47:19 -0000 1.28
+++ user.php 30 Aug 2003 22:07:12 -0000 1.28.4.1
@@ -63,8 +63,8 @@
}
$db->query("update ".TBL_AUTH_USER." set password = '$mpassword' where user_id = $u");
- $t->assign('changetext', $STRING['password_changed']);
- $t->wrap('changessaved.html', 'changessaved');
+ $t->assign('changetext', translate('Password changed'));
+ $t->render('changessaved.html', translate('Changes Saved'));
}
// Save changes to a user's preferences
@@ -92,8 +92,8 @@
" where user_id = $u");
}
- $t->assign('changetext', $STRING['prefs_changed']);
- $t->wrap('changessaved.html', 'changessaved');
+ $t->assign('changetext', translate('Preferences changed'));
+ $t->render('changessaved.html', translate('Changes Saved'));
}
@@ -129,7 +129,7 @@
'def_results' => $def_results
));
- $t->wrap('user.html', 'preferences');
+ $t->render('user.html', translate('User preferences'));
}
$perm->check_group('User');
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory sc8-pr-cvs1:/tmp/cvs-serv21306
Modified Files:
Tag: htmltemplates
badgroup.html bugattachmentform.html bugdisplay-printable.html
bugdisplay.html bugform.html bughistory.html buglist.html
bugvotes.html changessaved.html error.html index.html
install-complete.html install-dbfailure.html
install-dbsuccess.html install.html login.html logout.html
newaccount-disabled.html newaccount.html
newaccountsuccess.html projectlist.html queryform-simple.html
queryform.html report.html upgrade-finished.html upgrade.html
user.html wrap-popup.html wrap.html
Log Message:
Switching to html templates and gettext
Index: badgroup.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/badgroup.html,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -r1.4 -r1.4.6.1
--- badgroup.html 24 May 2002 15:19:16 -0000 1.4
+++ badgroup.html 30 Aug 2003 22:00:32 -0000 1.4.6.1
@@ -2,7 +2,7 @@
<tr>
<td align="center">
<br>
- You must be a member of the {$group} group to use this page.
+ You must be a member of the <?php echo $group; ?> group to use this page.
<br>
<br>
</td>
Index: bugattachmentform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugattachmentform.html,v
retrieving revision 1.7
retrieving revision 1.7.6.1
diff -u -r1.7 -r1.7.6.1
--- bugattachmentform.html 18 May 2002 03:00:50 -0000 1.7
+++ bugattachmentform.html 30 Aug 2003 22:00:32 -0000 1.7.6.1
@@ -1,21 +1,21 @@
-<form enctype="multipart/form-data" action="{$smarty.server.PHP_SELF}" method="post">
-<input type="hidden" name="bugid" value="{$bugid}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
+<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<input type="hidden" name="bugid" value="<?php echo $bugid; ?>">
+<input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
<table border="0" align="center">
<tr>
<td colspan="2" align="center">
Please choose a file to upload and enter a one-line description.
<br>
- Maximum file size: {$max_size} bytes
+ Maximum file size: <?php echo $max_size; ?> bytes
<br>
<br>
</td>
</tr>
- {if $error}
+ <?php if ($error) { ?>
<tr>
- <td colspan="2" class="error">{$error}</td>
+ <td colspan="2" class="error"><?php echo $error; ?></td>
</tr>
- {/if}
+ <?php } ?>
<tr>
<td>
File:
@@ -29,7 +29,7 @@
Description:
</td>
<td>
- <input type="text" name="description" maxlength="255" value="{$description}">
+ <input type="text" name="description" maxlength="255" value="<?php echo $description; ?>">
</td>
</tr>
<tr>
Index: bugdisplay-printable.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay-printable.html,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -r1.11 -r1.11.4.1
--- bugdisplay-printable.html 28 Oct 2002 22:06:02 -0000 1.11
+++ bugdisplay-printable.html 30 Aug 2003 22:00:32 -0000 1.11.4.1
@@ -1,73 +1,73 @@
<table border='0' width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
- Bug <b>#{$bug_id}</b>
+ <?php echo translate("Bug"); ?> <b>#<?php echo $bug_id; ?></b>
</td>
<td>
- Created: <b>{$created_date|date:DATE_FORMAT}</b>
+ <?php echo translate("Created"); ?>: <b><?php echo date(DATE_FORMAT, $created_date); ?></b>
</td>
</tr>
<tr>
<td>
- Reporter: <b>{$reporter|maskemail}</b>
+ <?php echo translate("Reporter"); ?>: <b><?php echo maskemail($reporter); ?></b>
</td>
- <td>Assigned To: <b>{$owner|maskemail}</td>
+ <td><?php echo translate("Assigned to"); ?>: <b><?php echo maskemail($owner); ?></td>
</tr>
<tr>
- <td>Status: <b>{$status_name}</b></td>
- <td>Resolution: <b>{$resolution_name}</b></td>
+ <td><?php echo translate("Status"); ?>: <b><?php echo $status_name; ?></b></td>
+ <td><?php echo translate("Resolution"); ?>: <b><?php echo $resolution_name; ?></b></td>
</tr>
<tr>
<td>
- Project: {$project_name}
+ <?php echo translate("Project"); ?>: <?php echo $project_name; ?>
</td>
<td>
- Component: {$component_name}
+ <?php echo translate("Component"); ?>: <?php echo $component_name; ?>
</td>
</tr>
<tr>
<td>
- Version: {$version_name}
+ <?php echo translate("Version"); ?>: <?php echo $version_name; ?>
</td>
<td>
- Severity: {$severity_name}
+ <?php echo translate("Severity"); ?>: <?php echo $severity_name; ?>
</td>
</tr>
<tr>
<td>
- Priority: {$priority}
+ <?php echo translate("Priority"); ?>: <?php echo $priority; ?>
</td>
<td colspan="2">
- OS: {$os_name}
+ <?php echo translate("Operating System"); ?>: <?php echo $os_name; ?>
</td>
</tr>
</table>
<br>
-Summary: {$title|stripslashes}
+<?php echo translate("Summary"); ?>: <?php echo stripslashes($title); ?>
<br>
-URL: {$url}
+<?php echo translate("URL"); ?>: <?php echo $url; ?>
<br>
-Bug Dependencies: {$bug_dependencies}
+<?php echo translate("Depends on bugs"); ?>: <?php echo $bug_dependencies; ?>
<br>
-{$STRING.BUGDISPLAY.blocks}: {$rev_bug_dependencies}
+<?php echo translate("Blocks bugs"); ?>: <?php echo $rev_bug_dependencies; ?>
<br>
<br>
-Comments:
+<?php echo translate("Comments"); ?>:
<hr size="1">
-<i>----- Posted by {$reporter|maskemail} at {$created_date|date:TIME_FORMAT} on {$created_date|date:DATE_FORMAT} -----</i>
+<i>----- <?php echo translate("Posted by").' '.maskemail($reporter).' ('.date(TIME_FORMAT.' '.DATE_FORMAT, $created_date).')' ?>-----</i>
<br>
-{$description|stripslashes|format_comments|nl2br}
+<?php echo stripslashes(format_comments(nl2br($description))) ?>
<br>
<br>
-{section name=comment loop=$comments}
-<i>----- Posted by {$comments[comment].login|maskemail} at {$comments[comment].created_date|date:TIME_FORMAT} on {$comments[comment].created_date|date:DATE_FORMAT}-----</i>
+<?php for ($i = 0, $ccount = count($comments); $i < $ccount; $i++) { ?>
+<i>----- <?php echo translate("Posted by").' '.maskemail($comments[$i]['login']).' ('.date(TIME_FORMAT.' '.DATE_FORMAT, $comments[$i]['created_date']).')'; ?>-----</i>
<br>
-{$comments[comment].comment_text|stripslashes|format_comments|nl2br}
+<?php echo stripslashes(format_comments(nl2br($comments[$i]['comment_text']))); ?>
<br>
<br>
-{/section}
+<?php } ?>
<br>
-<a class="bugdisplaylinks" href="{$smarty.server.PHP_SELF}?op=show&bugid={$bug_id}">Back to bug #{$bug_id}</a>
+<a class="bugdisplaylinks" href="<?php echo $_SERVER['PHP_SELF']; ?>?op=show&bugid=<?php echo $bug_id; ?>"><?php echo translate("Back to bug"); ?></a>
<br>
<br>
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v
retrieving revision 1.45
retrieving revision 1.45.4.1
diff -u -r1.45 -r1.45.4.1
--- bugdisplay.html 9 Apr 2003 21:52:32 -0000 1.45
+++ bugdisplay.html 30 Aug 2003 22:00:32 -0000 1.45.4.1
@@ -1,9 +1,7 @@
-{if not $smarty.session.uid}{assign var=disabled value='onClick="alertNoChange();"'}
-{else}{assign var=disabled value=""}
-{/if}
+<?php $disabled = empty($_SESSION['uid']) ? 'onClick="alertNoChange();"' : ''; ?>
<script type="text/JavaScript">
<!--
- warningString = '{$STRING.logintomodify}';
+ warningString = '<?php echo translate("You must login to modify this bug"); ?>';
warnedAlready = false;
versions = new Array();
@@ -12,9 +10,8 @@
versions['All'] = new Array(new Array('','All'));
closedversions['All'] = new Array(new Array('','All'));
components['All'] = new Array(new Array('','All'));
- {project_js no_all=true}
+ <?php build_project_js(true); ?>
- {literal}
function updateMenus(f) {
sel = f.project_id[f.project_id.selectedIndex].text;
f.version_id.length = versions[sel].length;
@@ -57,123 +54,123 @@
warnedAlready = true;
}
}
- {/literal}
//-->
</script>
<form action="bug.php" method="post">
<input type="hidden" name="op" value="update">
- <input type="hidden" name="bugid" value="{$bug_id}">
- <input type="hidden" name="projectid" value="{$project_id}">
- <input type="hidden" name="last_modified_date" value="{$last_modified_date}">
- <input type="hidden" name="pos" value="{$smarty.request.pos}">
+ <input type="hidden" name="bugid" value="<?php echo $bug_id ?>">
+ <input type="hidden" name="projectid" value="<?php echo $project_id ?>">
+ <input type="hidden" name="last_modified_date" value="<?php echo $last_modified_date ?>">
+ <input type="hidden" name="pos" value="<?php echo $_REQUEST['pos'] ?>">
<table border="0" width="100%">
<tr>
- <td>Bug <b>#{$bug_id}</b> - {$title|stripslashes} - {$STRING.BUGDISPLAY.returnto} <a href="query.php">{$STRING.BUGDISPLAY.buglist}</a></td>
+ <td>Bug <b>#<?php echo $bug_id ?></b> - <?php echo stripslashes($title) ?> - <a href="query.php"><?php echo translate("Return to bug list"); ?></a></td>
<td align="right">
-{if $prevbug}
- <b><a href="bug.php?op=show&bugid={$prevbug}&pos={$prevpos}">{$STRING.previous_bug}</a></b>
-{/if}
-{if $prevbug and $nextbug}
- |
-{/if}
-{if $nextbug}
- <b><a href="bug.php?op=show&bugid={$nextbug}&pos={$nextpos}">{$STRING.next_bug}</a></b>
-{/if}
+ <?php if (!empty($prevbug)) { ?>
+ <b><a href="bug.php?op=show&bugid=<?php echo $prevbug ?>&pos=<?php echo $prevpos ?>"><?php echo translate("Previous bug"); ?></a></b>
+ <?php } ?>
+ <?php if (!empty($prevbug) && !empty($nextbug)) echo ' | '; ?>
+ <?php if (!empty($nextbug)) { ?>
+ <b><a href="bug.php?op=show&bugid=<?php echo $nextbug ?>&pos=<?php echo $nextpos ?>"><?php echo translate("Next bug"); ?></a></b>
+ <?php } ?>
</td>
</tr>
-{if $error.status}
- <tr><td class="error">{$error.status}</td></tr>
-{/if}
+ <?php if (!empty($error['status'])) echo "<tr><td class=\"error\">{$error['status']}</td></tr>"; ?>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
- <td>{$STRING.BUGDISPLAY.reporter}:</td>
- <td><b>{$reporter|maskemail}</b></td>
- <td>{$STRING.BUGDISPLAY.created}:</td>
- <td><b>{$created_date|date:DATE_FORMAT}</b></td>
- </tr><tr>
- <td>{$STRING.BUGDISPLAY.project}:</td>
- <td><select name="project_id" onChange="updateMenus(this.form)" {$disabled}>{build_select box=project selected=$project_id}</select></td>
- <td>{$STRING.BUGDISPLAY.priority}:</td>
- <td><select name="priority" {$disabled}>{build_select box=priority selected=$priority}</select></td>
- </tr><tr>
- <td>{$STRING.BUGDISPLAY.component}:</td>
- <td><select name="component_id" {$disabled}>{build_select box=component selected=$component_id project=$project_id}</select></td>
- <td>{$STRING.BUGDISPLAY.severity}:</td>
- <td><select name="severity_id" {$disabled}>{build_select box=severity selected=$severity_id}</select></td>
- </tr><tr>
- <td>{$STRING.BUGDISPLAY.version}:</td>
- <td><select name="version_id" {$disabled}>{build_select box=version selected=$version_id project=$project_id}</select></td>
- <td>{$STRING.BUGDISPLAY.os}:</td>
- <td><select name="os_id" {$disabled}>{build_select box=os selected=$os_id}</select></td>
- </tr><tr>
- <td>{$STRING.BUGDISPLAY.tobeclosedinversion}</td>
- <td><select name="to_be_closed_in_version_id" {$disabled}>
- <option value="0">{$STRING.BUGDISPLAY.chooseone}</option>
- {build_select box=version selected=$to_be_closed_in_version_id project=$project_id}
+ <td><?php echo translate("Reporter"); ?>:</td>
+ <td><b><?php echo maskemail($reporter) ?></b></td>
+ <td><?php echo translate("Created"); ?>:</td>
+ <td><b><?php echo date(DATE_FORMAT, $created_date) ?></b></td>
+ </tr><tr>
+ <td><?php echo translate("Project"); ?>:</td>
+ <td><select name="project_id" onChange="updateMenus(this.form)" <?php echo $disabled ?>><?php build_select('project', $project_id) ?></select></td>
+ <td><?php echo translate("Priority"); ?>:</td>
+ <td><select name="priority" <?php echo $disabled ?>><?php build_select('priority', $priority) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("Component"); ?>:</td>
+ <td><select name="component_id" <?php echo $disabled ?>><?php build_select('component', $component_id, $project_id) ?></select></td>
+ <td><?php echo translate("Severity"); ?>:</td>
+ <td><select name="severity_id" <?php echo $disabled ?>><?php build_select('severity', $severity_id) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("Version"); ?>:</td>
+ <td><select name="version_id" <?php echo $disabled ?>><?php build_select('version', $version_id, $project_id) ?></select></td>
+ <td><?php echo translate("Operating System"); ?>:</td>
+ <td><select name="os_id" <?php echo $disabled ?>><?php build_select('os', $os_id) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("To be closed in version"); ?></td>
+ <td><select name="to_be_closed_in_version_id" <?php echo $disabled ?>>
+ <option value="0"><?php echo translate("Choose one"); ?></option>
+ <?php build_select('version', $to_be_closed_in_version_id, $project_id) ?>
</select></td>
- <td>{$STRING.BUGDISPLAY.database}:</td>
- <td><select name="database_id" {$disabled}>{build_select box=database selected=$database_id}</select></td>
+ <td><?php echo translate("Database"); ?>:</td>
+ <td><select name="database_id" <?php echo $disabled ?>><?php build_select('database', $database_id) ?></select></td>
</tr><tr>
- <td>{$STRING.BUGDISPLAY.closedinversion}</td>
- <td><select name="closed_in_version_id" {$disabled}>
- <option value="0">{$STRING.BUGDISPLAY.chooseone}</option>
- {build_select box=version selected=$closed_in_version_id project=$project_id}
+ <td><?php echo translate("Closed in version"); ?></td>
+ <td><select name="closed_in_version_id" <?php echo $disabled ?>>
+ <option value="0"><?php echo translate("Choose one"); ?></option>
+ <?php build_select('version', $closed_in_version_id, $project_id) ?>
</select></td>
- <td>{$STRING.BUGDISPLAY.site}</td>
- <td><select name="site_id" {$disabled}>{build_select box=site selected=$site_id}</select></td>
+ <td><?php echo translate("Site"); ?></td>
+ <td><select name="site_id" <?php echo $disabled ?>><?php build_select('site', $site_id) ?></select></td>
</tr><tr>
- <td>{$STRING.BUGDISPLAY.summary}:</td>
- <td><input type="text" size="30" maxlength="100" name="title" value="{$title|stripslashes|htmlspecialchars}" {$disabled}></td>
- <td>{$STRING.BUGDISPLAY.status}:</td>
- <td><select name="status_id" {$disabled}>{build_select box=status selected=$status_id}</select></td>
- </tr><tr>
- <td>{if $url}<a href="{$url}">URL</a>{else}URL{/if}:</td>
- <td><input type="text" size="30" maxlength="255" name="url" value="{$url}" {$disabled}></td>
- <td>{$STRING.BUGDISPLAY.resolution}:</td>
- <td><select name="resolution_id" {$disabled}><option value="0">{$STRING.BUGDISPLAY.resolutionnone}</option>{build_select box=resolution selected=$resolution_id}</select></td>
- </tr><tr>
- <td>{$STRING.BUGDISPLAY.assignedto}:</td>
- <td><select name="assigned_to" {$disabled}><option value="0">{$STRING.BUGDISPLAY.assignedtonobody}</option>{build_select box=owner selected=$assigned_to}</select></td>
- <td>{$STRING.BUGDISPLAY.addcc}:</td>
- <td><input type="text" name="add_cc" {$disabled}></td>
+ <td><?php echo translate("Summary"); ?>:</td>
+ <td><input type="text" size="30" maxlength="100" name="title" value="<?php echo stripslashes(htmlspecialchars($title)) ?>" <?php echo $disabled ?>></td>
+ <td><?php echo translate("Status"); ?>:</td>
+ <td><select name="status_id" <?php echo $disabled ?>><?php build_select('status', $status_id) ?></select></td>
+ </tr><tr>
+ <td><?php if($url) echo "<a href=\"$url\">URL</a>"; else echo 'URL'; ?>:</td>
+ <td><input type="text" size="30" maxlength="255" name="url" value="<?php echo $url ?>" <?php echo $disabled ?>></td>
+ <td><?php echo translate("Resolution"); ?>:</td>
+ <td><select name="resolution_id" <?php echo $disabled ?>><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', $resolution_id) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("Assigned to"); ?>:</td>
+ <?php if (isset($perm) && $perm->have_perm('EditAssignment')) { ?>
+ <td><select name="assigned_to" <?php echo $disabled ?>><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', $assigned_to) ?></select></td>
+ <?php } else { ?>
+ <td>
+ <?php echo lookup('assigned_to', $assigned_to); ?>
+ <input type="hidden" name="assigned_to" value="<?php echo $assigned_to ?>">
+ </td>
+ <?php } ?>
+ <td><?php echo translate("Add CC"); ?>:</td>
+ <td><input type="text" name="add_cc" <?php echo $disabled ?>></td>
</tr><tr>
<td colspan="2" valign="top">
-{if !empty($error.add_dep)}<div class="error">{$error.add_dep}</div>{/if}
- {$STRING.BUGDISPLAY.bugdependency}: {$bug_dependencies}<br>
- {$STRING.BUGDISPLAY.blocks}: {$rev_bug_dependencies}<br>
- {$STRING.BUGDISPLAY.adddependency}: <input type="text" name="add_dependency" size="5" {$disabled}><br>
- {$STRING.BUGDISPLAY.removedependency}: <input type="text" name="del_dependency" size="5" {$disabled}><br><br></td>
+ <?php if (!empty($error['add_dep'])) echo "<div class=\"error\">{$error['add_dep']}</div>"; ?>
+ <?php echo translate("Depends on bugs"); ?>: <?php echo $bug_dependencies; ?><br>
+ <?php echo translate("Blocks bugs"); ?>: <?php echo $rev_bug_dependencies; ?><br>
+ <?php echo translate("Add dependency"); ?>: <input type="text" name="add_dependency" size="5" <?php echo $disabled ?>><br>
+ <?php echo translate("Remove dependency"); ?>: <input type="text" name="del_dependency" size="5" <?php echo $disabled ?>><br><br></td>
<td colspan="2" valign="top">
- {$STRING.BUGDISPLAY.removeselectedcc}:<br>
- <select name="remove_cc[]" size="5" style="width: 15em" multiple {$disabled}>{build_select box=bug_cc selected=$bug_id}</select></td>
+ <?php echo translate("Remove selected CCs"); ?>:<br>
+ <select name="remove_cc[]" size="5" style="width: 15em" multiple <?php echo $disabled ?>><?php build_select('bug_cc', $bug_id) ?></select></td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
- <td valign="top">{$STRING.BUGDISPLAY.additionalcomments}:<br><br>
- <textarea name="comments" rows="6" cols="55" wrap="virtual" {$disabled}>{$smarty.post.comments}</textarea>
+ <td valign="top"><?php echo translate("Additional comments"); ?>:<br><br>
+ <textarea name="comments" rows="6" cols="55" wrap="virtual" <?php echo $disabled ?>><?php echo $_POST['comments']; ?></textarea>
<br><br>
<div align="right">
-{if $smarty.session.uid}
- {$STRING.BUGDISPLAY.suppressemail} <input type="checkbox" name="suppress_email" value="1">
+ <?php if (!empty($_SESSION['uid'])) { ?>
+ <?php echo translate("Supress notification email"); ?> <input type="checkbox" name="suppress_email" value="1">
<input type="submit" value="Submit">
-{else}
- {$STRING.logintomodify}
-{/if}
+ <?php } else echo translate("You must login to modify this bug"); ?>
</div></td>
</tr><tr>
<td><table border="0" cellpadding="0" width="100%">
<tr>
- <td colspan="2">{$STRING.BUGDISPLAY.attachments}:</td>
- <td colspan="3" align="right"><a href="attachment.php?bugid={$bug_id}" onClick="return popupAtt({$bug_id})">{$STRING.BUGDISPLAY.createattachment}</a></td>
+ <td colspan="2"><?php echo translate("Attachments"); ?>:</td>
+ <td colspan="3" align="right"><a href="attachment.php?bugid=<?php echo $bug_id; ?>" onClick="return popupAtt(<?php echo $bug_id; ?>)"><?php echo translate("Create new attachment"); ?></a></td>
</tr><tr>
<td colspan="5" height="2" bgcolor="#ffffff"><spacer type="block" height="2" width="2"></td>
</tr><tr>
- <td bgcolor="#cccccc" align="center"><b>{$STRING.BUGDISPLAY.name}</b></td>
- <td width="60" bgcolor="#cccccc" align="center"><b>{$STRING.BUGDISPLAY.size}</b></a></td>
- <td width="150" bgcolor="#cccccc" align="center"><b>{$STRING.BUGDISPLAY.type}</b></a></td>
- <td width="80" bgcolor="#cccccc" align="center"><b>{$STRING.BUGDISPLAY.created}</b></a></td>
+ <td bgcolor="#cccccc" align="center"><b><?php echo translate("Name"); ?></b></td>
+ <td width="60" bgcolor="#cccccc" align="center"><b><?php echo translate("Size"); ?></b></a></td>
+ <td width="150" bgcolor="#cccccc" align="center"><b><?php echo translate("Type"); ?></b></a></td>
+ <td width="80" bgcolor="#cccccc" align="center"><b><?php echo translate("Created"); ?></b></a></td>
<td width="80" bgcolor="#cccccc" align="center"> </a></td>
</tr><tr>
<td bgcolor="#000000" height="1"><spacer type="block" height="1" width="1"></td>
@@ -182,30 +179,30 @@
<td bgcolor="#000000" height="1"><spacer type="block" height="1" width="1"></td>
<td bgcolor="#000000" height="1"><spacer type="block" height="1" width="1"></td>
</tr>
-{section name=attachment loop=$attachments}
- <tr title="{$attachments[attachment].description|stripslashes}"{if $smarty.section.attachment.iteration is even} class="alt" bgcolor="#dddddd"{/if}>
- <td>{$attachments[attachment].file_name|stripslashes}</td>
- <td align="right">
- {if $attachments[attachment].file_size > 1024}
- {math equation="(round(x) / 1024 * 100) / 100" x=$attachments[attachment].file_size assign=file_size}
- {$file_size|number_format}k
- {else}
- {$attachments[attachment].file_size|number_format}b
- {/if}
- </td>
- <td align="center">{$attachments[attachment].mime_type}</td>
- <td align="center">{$attachments[attachment].created_date|date:DATE_FORMAT}</td>
- <td align="center"><a href='attachment.php?attachid={$attachments[attachment].attachment_id}'>View</a>
- {if isset($perm) and $perm->have_perm('Administrator')}
- | <a href='attachment.php?del={$attachments[attachment].attachment_id}' onClick="return confirm('{$STRING.BUGDISPLAY.suredeleteattachment}');">{$STRING.delete}</a>
- {/if}
- </td>
- </tr>
-{sectionelse}
- <tr>
- <td colspan="5" align="center">{$STRING.BUGDISPLAY.noattachments}</td>
- </tr>
-{/section}
+ <?php if ($attcount = count($attachments)) { ?>
+ <?php for ($i = 0; $i < $attcount; $i++) { ?>
+ <tr title="<?php echo stripslashes($attachments[$i]['description']); ?>"<?php if ($i % 2 != 0) echo ' class="alt" bgcolor="#dddddd"' ?>>
+ <td><?php echo stripslashes($attachments[$i]['file_name']); ?></td>
+ <td align="right">
+ <?php echo $attachments[$i]['file_size'] > 1024
+ ? number_format((round($attachments[$i]['file_size']) / 1024 * 100) / 100).'k'
+ : number_format($attachments[$i]['file_size']).'b';
+ ?>
+ </td>
+ <td align="center"><?php echo $attachments[$i]['mime_type']; ?></td>
+ <td align="center"><?php echo date(DATE_FORMAT, $attachments[$i]['created_date']); ?></td>
+ <td align="center"><a href='attachment.php?attachid=<?php echo $attachments[$i]['attachment_id']; ?>'>View</a>
+ <?php if (isset($perm) and $perm->have_perm('Administrator')) { ?>
+ | <a href='attachment.php?del=<?php echo $attachments[$i]['attachment_id']; ?>' onClick="return confirm('<?php echo translate("Are you sure you want to delete this attachment?"); ?>');"><?php echo translate("Delete"); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } else { ?>
+ <tr>
+ <td colspan="5" align="center"><?php echo translate("No attachments found for this bug"); ?></td>
+ </tr>
+ <?php } ?>
<tr>
<td bgcolor="#000000" height="1"><spacer type="block" height="1" width="1"></td>
<td bgcolor="#000000" height="1"><spacer type="block" height="1" width="1"></td>
@@ -220,28 +217,28 @@
</table>
</form>
<div align="center" class="bugdisplaylinks">
-{if !empty($error.vote)}<div class="error">{$error.vote}</div>{/if}
- <b><a href="{$smarty.server.PHP_SELF}?op=vote&bugid={$bug_id}" onClick="if ({$already_voted}) {literal}{ alert ('{/literal}{$STRING.already_voted}{literal}'); return false; }{/literal}">{$STRING.BUGDISPLAY.voteforthisbug}</a></b> |
- <b><a href="{$smarty.server.PHP_SELF}?op=viewvotes&bugid={$bug_id}">{$STRING.BUGDISPLAY.viewvotes} ({$num_votes}) {$STRING.BUGDISPLAY.forthisbug}</a></b> |
- <b><a href="{$smarty.server.PHP_SELF}?op=history&bugid={$bug_id}">{$STRING.BUGDISPLAY.viewbugactivity}</a></b> |
- <b><a href="{$smarty.server.PHP_SELF}?op=print&bugid={$bug_id}">{$STRING.BUGDISPLAY.printableview}</a></b>
+<?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> |
+ <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=history&bugid=<?php echo $bug_id; ?>"><?php echo translate("View bug history"); ?></a></b> |
+ <b><a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=print&bugid=<?php echo $bug_id; ?>"><?php echo translate("Printable view"); ?></a></b>
</div>
<br><br>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
- <td>{$STRING.BUGDISPLAY.comments}:</td>
+ <td><?php echo translate("Comments"); ?>:</td>
</tr><tr class="alt">
- <td>{$STRING.BUGDISPLAY.postedby}: {$reporter|maskemail} <br>
- {$STRING.BUGDISPLAY.date}: {$created_date|date:TIME_FORMAT} {$STRING.BUGDISPLAY.dateon} {$created_date|date:DATE_FORMAT}</td>
- </tr><tr>
- <td>{$description|stripslashes|htmlspecialchars|format_comments|nl2br} <br><br></td>
- </tr>
- {section name=comment loop=$comments}
- <tr class="alt">
- <td>{$STRING.BUGDISPLAY.postedby}: {$comments[comment].login|maskemail} <br>
- {$STRING.BUGDISPLAY.date}: {$comments[comment].created_date|date:TIME_FORMAT} {$STRING.BUGDISPLAY.on} {$comments[comment].created_date|date:DATE_FORMAT}</td>
+ <td><?php echo translate("Posted by"); ?>: <?php echo maskemail($reporter); ?> <br>
+ <?php echo translate("Date"); ?>: <?php echo date(TIME_FORMAT.' '.DATE_FORMAT, $created_date); ?></td>
</tr><tr>
- <td>{$comments[comment].comment_text|stripslashes|htmlspecialchars|format_comments|nl2br} <br><br></td>
+ <td><?php echo stripslashes(htmlspecialchars(format_comments(nl2br($description)))); ?> <br><br></td>
</tr>
- {/section}
+ <?php for ($i = 0, $ccount = count($comments); $i < $ccount; $i++) { ?>
+ <tr class="alt">
+ <td><?php echo translate("Posted by"); ?>: <?php echo maskemail($comments[$i]['login']); ?> <br>
+ <?php echo translate("Date"); ?>: <?php echo date(TIME_FORMAT.' '.DATE_FORMAT, $comments[$i]['created_date']); ?></td>
+ </tr><tr>
+ <td><?php echo stripslashes(htmlspecialchars(format_comments(nl2br($comments[$i]['comment_text'])))); ?> <br><br></td>
+ </tr>
+ <?php } ?>
</table>
Index: bugform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugform.html,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -u -r1.9 -r1.9.4.1
--- bugform.html 12 May 2003 22:26:27 -0000 1.9
+++ bugform.html 30 Aug 2003 22:00:32 -0000 1.9.4.1
@@ -1,88 +1,163 @@
-<form action="bug.php" method="post" enctype="multipart/form-data">
- <input type="hidden" name="bugid" value="0">
- <input type="hidden" name="project" value="{$project}">
- <input type="hidden" name="op" value="do">
- <table border="0">
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
- <tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Project}:</td>
- <td>{$projectname|stripslashes|htmlspecialchars}</td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Version}:</td>
- <td><select name="version">{build_select box=version selected=$version project=$project}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Summary}:</td>
- <td><input type="text" size="50" maxlength="100" name="title"
- value="{$title|stripslashes|htmlspecialchars}"></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Description}:</td>
- <td><textarea name="description" cols="50" rows="8"
- wrap=virtual>{$description|stripslashes|htmlspecialchars}</textarea></td>
- </tr><tr>
- <td align="right" valign="top">URL:</td>
- <td><input type="text" size="30" maxlength="255" name="url" value="{$url}"></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Severity}:</td>
- <td><select name="severity">{build_select box=severity selected=$severity}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Priority}:</td>
- <td><select name="priority">{build_select box=priority selected=$priority}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Component}:</td>
- <td><select name="component">{build_select box=component selected=$component project=$project}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Database}:</td>
- <td><select name="database">{build_select box=database selected=$database}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.Site}:</td>
- <td><select name="site">{build_select box=site selected=$site}
- </select></td>
- </tr><tr>
- <td align="right" valign="top">{$STRING.BUGFORM.OS}:</td>
- <td><select name="os">{build_select box=os selected=$os}
- </select></td>
- </tr><tr>
- <td align="right">Attachment:</td>
- <td>
-<table border="0" align="center">
- <tr>
- <td colspan="2" align="center">
- Please choose a file to upload and enter a one-line description.
- <br>
- Maximum file size: {$max_size} bytes
- <br>
- <br>
- </td>
- </tr>
- <tr>
- <td>
- File:
- </td>
- <td>
- <input type="file" name="attachment">
- </td>
- </tr>
- <tr>
- <td>
- Description:
- </td>
- <td>
- <input type="text" name="at_description" maxlength="255" value="{$description}">
- </td>
- </tr>
-</table>
-
- </td>
- </tr>
- </table>
- <input type="submit" name="submit" value="{$STRING.BUGFORM.Submit}">
-</form>
+ <form action="bug.php" method="post" enctype="multipart/form-data">
+ <table border="0">
+ <?php if (!empty($error)) { ?>
+ <tr>
+ <td colspan="2" class="error">
+ <?php echo $error ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Project"); ?>:
+ </td>
+ <td>
+ <?php echo stripslashes($projectname) ?>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Reporter"); ?>:
+ </td>
+ <td>
+ <select name="reporter">
+ <?php build_select('reporter') ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Version"); ?>:
+ </td>
+ <td>
+ <select name="version">
+ <?php build_select('version', $version, $project) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Summary"); ?>:
+ </td>
+ <td>
+ <input type="text" size="50" maxlength="100" name="title" value="<?php echo htmlspecialchars(stripslashes($title)) ?>">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Description"); ?>:
+ </td>
+ <td>
+ <textarea name="description" cols="50" rows="8" wrap="virtual">
+ <?php echo htmlspecialchars(stripslashes($description)) ?>
+ </textarea>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ URL:
+ </td>
+ <td>
+ <input type="text" size="30" maxlength="255" name="url" value="<?php echo $url ?>">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Severity"); ?>:
+ </td>
+ <td>
+ <select name="severity">
+ <?php build_select('severity', $severity) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Priority"); ?>:
+ </td>
+ <td>
+ <select name="priority">
+ <?php build_select('priority', $priority) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Component"); ?>:
+ </td>
+ <td>
+ <select name="component">
+ <?php build_select('component', $component, $project) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Database"); ?>:
+ </td>
+ <td>
+ <select name="database">
+ <?php build_select('database', $database) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Site"); ?>:
+ </td>
+ <td>
+ <select name="site">
+ <?php build_select('site', $site) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Operating System"); ?>:
+ </td>
+ <td>
+ <select name="os">
+ <?php build_select('os', $os) ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
+ Attachment:
+ </td>
+ <td>
+ <table border="0" align="center">
+ <tr>
+ <td colspan="2" align="center">
+ Please choose a file to upload and enter a one-line description.
+ <br>
+ Maximum file size: <?php echo $max_size ?> bytes
+ <br>
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ File:
+ </td>
+ <td>
+ <input type="file" name="attachment">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Description:
+ </td>
+ <td>
+ <input type="text" name="at_description" maxlength="255" value="">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <input type="submit" name="submit" value="<?php echo translate("Submit"); ?>">
+ <input type="hidden" name="bugid" value="0">
+ <input type="hidden" name="project" value="<?php echo $project ?>">
+ <input type="hidden" name="op" value="do">
+ </form>
Index: bughistory.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bughistory.html,v
retrieving revision 1.5
retrieving revision 1.5.6.1
diff -u -r1.5 -r1.5.6.1
--- bughistory.html 14 Sep 2002 19:02:28 -0000 1.5
+++ bughistory.html 30 Aug 2003 22:00:32 -0000 1.5.6.1
@@ -1,26 +1,28 @@
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<tr bgcolor="#eeeeee">
- <th>Who</th>
- <th>What</th>
- <th>Old Value</th>
- <th>New Value</th>
- <th>When</th>
+ <th><?php echo translate("Who"); ?></th>
+ <th><?php echo translate("What"); ?></th>
+ <th><?php echo translate("Old Value"); ?></th>
+ <th><?php echo translate("New Value"); ?></th>
+ <th><?php echo translate("When"); ?></th>
</tr>
- {section name=event loop=$history}
- <tr{if $smarty.section.event.iteration is even} class="alt" bgcolor="#dddddd"{/if}>
- <td>{$history[event].login|maskemail}</td>
- <td>{$history[event].changed_field}</td>
- <td> {$history[event].old_value}</td>
- <td> {$history[event].new_value}</td>
- <td align="center">{$history[event].created_date|date:DATE_FORMAT} {$history[event].created_date|date:TIME_FORMAT}</td>
- </tr>
- {sectionelse}
+ <?php if ($count = count($history)) { ?>
+ <?php for ($i = 0; $i < $count; $i++) { ?>
+ <tr<?php if ($i % 2) echo ' class="alt" bgcolor="#dddddd"' ?>>
+ <td><?php echo maskemail($history[$i]['login']); ?></td>
+ <td><?php echo $history[$i]['changed_field']; ?></td>
+ <td> <?php echo $history[$i]['old_value']; ?></td>
+ <td> <?php echo $history[$i]['new_value']; ?></td>
+ <td align="center"><?php echo date(TIME_FORMAT.' '.DATE_FORMAT, $history[$i]['created_date']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php } else { ?>
<tr>
- <td colspan="5" align="center">{$STRING.nobughistory}</td>
+ <td colspan="5" align="center"><?php echo translate("No history found for this bug"); ?></td>
</tr>
- {/section}
+ <?php } ?>
</table>
<br>
-<a href="{$smarty.server.PHP_SELF}?op=show&bugid={$smarty.get.bugid}">Back to bug #{$smarty.get.bugid}</a>
+<a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=show&bugid=<?php echo $_GET['bugid']; ?>"><?php echo translate("Back to bug"); ?></a>
<br>
<br>
Index: buglist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/buglist.html,v
retrieving revision 1.8
retrieving revision 1.8.6.1
diff -u -r1.8 -r1.8.6.1
--- buglist.html 29 Jul 2002 12:41:47 -0000 1.8
+++ buglist.html 30 Aug 2003 22:00:32 -0000 1.8.6.1
@@ -1,35 +1,25 @@
-<table cellpadding="2">
+<table class="bordertable" align="center" style="width: 100%">
<tr>
- {section name=col loop=$db_fields}
- <th class={$headers[col].class} bgcolor={$headers[col].color}><a href="{$headers[col].url}">{$field_titles[col]}</a></th>
- {/section}
+ <?php for ($i = 0, $colcount = count($db_fields); $i < $colcount; $i++) {
+ echo "<th class='{$headers[$i]['class']}' bgcolor='{$headers[$i]['color']}'><a href='{$headers[$i]['url']}'>{$field_titles[$i]}</a></th>";
+ } ?>
</tr>
- {section name=bug loop=$bugs}
- <tr{if $smarty.section.bug.iteration is even} class="alt" bgcolor="#dddddd"{/if}>
- {foreach key=key item=item from=$bugs[bug]}
- {if $key eq "bug_link_id"}
- {assign var=bug_id value=$item}
- {elseif $key eq "severity_color"}
- {assign var=bgcolor value=$item}
- {else}
- <td {if USE_SEVERITY_COLOR}bgcolor="{$bgcolor}"{/if}>{$item|modify_bug_col:$key:$bug_id:$smarty.section.bug.iteration}</td>
- {/if}
- {/foreach}
- </tr>
- {sectionelse}
- <tr>
- <td colspan="{$smarty.section.col.loop}" align="center">
- {$STRING.nobugs}
- </td>
- </tr>
- {/section}
- {if $smarty.section.bug.total}
- <tr>
- <td colspan="{$smarty.section.col.loop}" align="center">
- <br>
- {$first} - {$last} of {$total}<br>[ {$pages} ]<!-- <a href="bugs.php?page=all">Show all</a>-->
- <br>
+ <?php if (!$bugcount = count($bugs)) { ?>
+ <td colspan="<?php echo $colcount ?>" align="center">
+ <?php echo translate("No bugs found"); ?>
</td>
- </tr>
- {/if}
+ <?php } else { ?>
+ <?php for ($i = 0; $i < $bugcount; $i++) { ?>
+ <tr<?php if ($i % 2 != 0) echo ' class="alt" bgcolor="#dddddd"'; ?>>
+ <?php
+ foreach ($bugs[$i] as $var => $val) {
+ if ($var == 'bug_link_id') $bugid = $val;
+ elseif ($var == 'severity_color') $bgcolor == $val;
+ else echo '<td '.(USE_SEVERITY_COLOR ? "bgcolor='$bgcolor'" : '').'>'.format_bug_col($val, $var, $bugid, $i).'</td>';
+ }
+ ?>
+ </tr>
+ <?php } ?>
+ <?php } ?>
</table>
+<?php include('admin/pagination.html'); ?>
Index: bugvotes.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugvotes.html,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -r1.4 -r1.4.6.1
--- bugvotes.html 18 May 2002 03:00:50 -0000 1.4
+++ bugvotes.html 30 Aug 2003 22:00:32 -0000 1.4.6.1
@@ -1,20 +1,22 @@
<table border="0" cellspacing="2" cellpadding="2">
<tr bgcolor="#eeeeee">
- <th>Who</th>
- <th>When</th>
+ <th><?php echo translate("Who"); ?></th>
+ <th><?php echo translate("When"); ?></th>
</tr>
- {section name=vote loop=$votes}
- <tr{if $smarty.section.vote.iteration is even} class="alt" bgcolor="#dddddd"{/if}>
- <td>{$votes[vote].login|maskemail}</td>
- <td>{$votes[vote].created_date|date:DATE_FORMAT} {$votes[vote].created_date|date:TIME_FORMAT}</td>
- </tr>
- {sectionelse}
+ <?php if ($count = count($votes)) { ?>
+ <?php for ($i = 0; $i < $count; $i++) { ?>
+ <tr<?php if ($i % 2) echo ' class="alt" bgcolor="#dddddd"'; ?>>
+ <td><?php echo maskemail($votes[$i]['login']); ?></td>
+ <td><?php echo date(TIME_FORMAT.' '.DATE_FORMAT, $votes[$i]['created_date']); ?></td>
+ </tr>
+ <?php } ?>
+ <?php } else { ?>
<tr>
- <td colspan="2" align="center">{$STRING.no_votes}</td>
+ <td colspan="2" align="center"><?php echo translate("No votes found for this bug"); ?></td>
</tr>
- {/section}
+ <?php } ?>
</table>
<br>
-<a href="{$smarty.server.PHP_SELF}?op=show&bugid={$smarty.get.bugid}">Back to bug #{$smarty.get.bugid}</a>
+<a href="<?php echo $_SERVER['PHP_SELF']; ?>?op=show&bugid=<?php echo $_GET['bugid']; ?>"><?php echo translate("Back to bug"); ?></a>
<br>
<br>
Index: changessaved.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/changessaved.html,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -r1.1 -r1.1.6.1
--- changessaved.html 18 May 2002 03:01:22 -0000 1.1
+++ changessaved.html 30 Aug 2003 22:00:32 -0000 1.1.6.1
@@ -1,7 +1,7 @@
<div align="center">
<br>
<br>
- {$changetext}
+ <?php echo $changetext; ?>
<br>
<br>
Return to the <a href="user.php">Personal Page</a> or <a href="index.php">phpBugTracker Home</a>.
Index: error.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/error.html,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -r1.4 -r1.4.6.1
--- error.html 24 May 2002 15:19:16 -0000 1.4
+++ error.html 30 Aug 2003 22:00:32 -0000 1.4.6.1
@@ -1,14 +1,13 @@
<table width="100%">
<tr>
<td align="center">
- {if $iserror}
- <div class="error">{$text}</div>
- {else}
- {$text}
- {/if}
+ <?php
+ if ($iserror) echo "<div class=\"error\">$text</div>";
+ else echo $text;
+ ?>
<br>
<br>
- <a href="javascript:history.go(-1)">Back</a>
+ <a href="javascript:history.go(-1)"><?php echo translate("Back"); ?></a>
</td>
</tr>
</table>
Index: index.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/index.html,v
retrieving revision 1.12
retrieving revision 1.12.6.1
diff -u -r1.12 -r1.12.6.1
--- index.html 19 Jun 2002 13:45:36 -0000 1.12
+++ index.html 30 Aug 2003 22:00:32 -0000 1.12.6.1
@@ -1,66 +1,76 @@
<table border=0 width="100%">
- <tr>
- <td valign="top" width="250"><b>{$STRING.INDEX.FiveRecentlySubmitted}</b>
- <br>
-{section name=bug loop=$recentbugs}
- <a href="bug.php?op=show&bugid={$recentbugs[bug].bug_id}">{$recentbugs[bug].title|stripslashes}</a> (<i>{$recentbugs[bug].project_name|stripslashes}</i>)<br>
-{sectionelse}
- {$STRING.nobugs}
-{/section}
- <br><br>
- <b>{$STRING.INDEX.FiveRecentlyClosed}</b>
- <br>
-{section name=bug loop=$closedbugs}
- <a href="bug.php?op=show&bugid={$closedbugs[bug].bug_id}">{$closedbugs[bug].title|stripslashes}</a> (<i>{$closedbugs[bug].project_name|stripslashes}</i>)<br>
-{sectionelse}
- {$STRING.nobugs}
-{/section}
-{if count($queries)}
- <br><br>
- <b>{$STRING.INDEX.SavedQueries}</b>
- <br>
- {section name=query loop=$queries}
- <a href="query.php?{$queries[query].saved_query_string}">{$queries[query].saved_query_name}</a><br>
- {/section}
-{/if}
- </td>
- <td valign="top">
-{if USE_JPGRAPH}
- {$summary_image}
-{else}
- <b>{$STRING.INDEX.QuickStats}</b>
- <br><br>
- <table border="1" cellspacing="0" cellpadding="2">
- <tr>
- <th>{$STRING.INDEX.Status}</th>
- <th>{$STRING.INDEX.NumberOfBugs}</th>
- </tr>
- {foreach name=outer key=key item=item from=$stats}
- <tr>
- <td><a href="query.php?op=doquery&status[]={$key}">{$item.name}</a></td>
- <td align="center">{$item.count|default:0}</td>
- </tr>
- {/foreach}
- </table>
-{/if}
- </td>
- </tr>
+ <tr>
+ <td valign="top" width="250">
+ <b><?php echo translate("Five most recently submitted bugs") ?></b>
+ <br>
+ <?php
+ if ($count = count($recentbugs)) {
+ for ($i = 0; $i < $count; $i++) {
+ echo '<a href="bug.php?op=show&bugid='.$recentbugs[$i]['bug_id'].'">'.stripslashes($recentbugs[$i]['title']).'</a> (<i>'.stripslashes($recentbugs[$i]['project_name']).'</i>)<br>';
+ }
+ } else {
+ echo translate("No bugs found");
+ }
+ ?>
+ <br><br>
+ <b><?php echo translate("Five most recently closed bugs") ?></b>
+ <br>
+ <?php
+ if ($count = count($closedbugs)) {
+ for ($i = 0; $i < $count; $i++) {
+ echo '<a href="bug.php?op=show&bugid='.$closedbugs[$i]['bug_id'].'">'.stripslashes($closedbugs[$i]['title']).'</a> (<i>'.stripslashes($closedbugs[$i]['project_name']).'</i>)<br>';
+ }
+ } else {
+ echo translate("No bugs found");
+ }
+ ?>
+ <?php if (count($queries)) { ?>
+ <br><br>
+ <b><?php echo translate("Saved Queries") ?></b>
+ <br>
+ <?php for ($i = 0, $count = count($queries); $i < $count; $i++) {
+ echo '<a href="query.php?'.$queries[$i]['saved_query_string'].'">'.$queries[$i]['saved_query_name'].'</a><br>';
+ }
+ } ?>
+ </td>
+ <td valign="top">
+ <?php if (USE_JPGRAPH) {
+ if (!is_writeable('jpgimages')) {
+ echo translate("The image path is not writeable");
+ } else {
+ build_image($restricted_projects);
+ }
+ } else { ?>
+ <b><?php echo translate("Quick Stats"); ?></b>
+ <br><br>
+ <table border="1" cellspacing="0" cellpadding="2">
+ <tr>
+ <th><?php echo translate("Status"); ?></th>
+ <th><?php echo translate('# bugs'); ?></th>
+ </tr>
+ <?php $stats = grab_data($restricted_projects); ?>
+ <?php foreach ($stats as $statid => $info) { ?>
+ <tr>
+ <td><a href="query.php?op=doquery&status[]=<?php echo $statid ?>"><?php echo $info['name'] ?></a></td>
+ <td align="center"><?php echo $info['count'] ? $info['count'] : 0 ?></td>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } ?>
+ </td>
+ </tr>
</table>
<br>
<br>
-{if SHOW_PROJECT_SUMMARIES}
-<table border="0" cellpadding="4">
- <tr>
- {section name=col loop=$resfields}
- <th>{$resfields[col]}</th>
- {/section}
- </tr>
- {section name=project loop=$projects}
- <tr{if $smarty.section.project.iteration is even} class="alt"{/if}>
- {foreach key=key item=item from=$projects[project]}
- <td{if $key ne "Project"} align="center"{/if}>{$item|stripslashes}</td>
- {/foreach}
- </tr>
- {/section}
-</table>
-{/if}
+<?php if (SHOW_PROJECT_SUMMARIES) { ?>
+ <table class="bordertable" align="center">
+ <tr>
+ <?php foreach ($resfields as $field) echo "<th>$field</th>"; ?>
+ </tr>
+ <?php for ($i = 0, $count = count($projects); $i < $count; $i++) { ?>
+ <tr<?php if ($i % 2 != 0) echo ' class="alt"'?>>
+ <?php foreach ($projects[$i] as $var => $val) echo '<td'.($var != 'Project' ? ' align="center"' : '').'>'.stripslashes($val).'</td>'; ?>
+ </tr>
+ <?php } ?>
+ </table>
+<?php } ?>
Index: install-complete.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/install-complete.html,v
retrieving revision 1.6
retrieving revision 1.6.6.1
diff -u -r1.6 -r1.6.6.1
--- install-complete.html 24 May 2002 15:19:16 -0000 1.6
+++ install-complete.html 30 Aug 2003 22:00:32 -0000 1.6.6.1
@@ -1,5 +1,5 @@
<html>
- <title>phpBugTracker Installation</title>
+ <title><?php echo translate("phpBugTracker Installation"); ?></title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
@@ -7,7 +7,7 @@
<tr>
<td width="200" valign="top"><br><img src="logo.jpg"></td>
<td valign="top">
- <div class="banner">phpBugTracker Installation</div>
+ <div class="banner"><?php echo translate("phpBugTracker Installation"); ?></div>
The database tables have been created and the config file has been
written. Especially if you are on a shared server, you should
change the permissions so that config.php isn't writeable by others
@@ -28,10 +28,10 @@
<form action="index.php" method="post">
<table border="0" cellpadding="1" cellspacing="3" align="center">
<tr>
- <td>Login:</td>
- <td><input type="text" name="username" value="{$login}"></td>
+ <td><?php echo translate("Login"); ?>:</td>
+ <td><input type="text" name="username" value="<?php echo $login; ?>"></td>
</tr>
- <td>Password:</td>
+ <td><?php echo translate("Password"); ?>:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
Index: install-dbfailure.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/install-dbfailure.html,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -r1.1 -r1.1.6.1
--- install-dbfailure.html 27 Sep 2002 19:24:39 -0000 1.1
+++ install-dbfailure.html 30 Aug 2003 22:00:32 -0000 1.1.6.1
@@ -1,22 +1,18 @@
<html>
<head>
- <title>DB Test Failure</title>
+ <title><?php echo translate("DB Test Failure"); ?></title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
</head>
<body>
<br><br>
<div align="center">
- The installation script could not connect to the database
- <b><?php echo $params['db_database']?></b> on the host <b><?php echo $params['db_host']?></b>
- using the specified username and password.
- <br>
- Please check these details are correct and that the database already exists then retry.
+ <?php printf(translate("The installation script could not connect to the database <b>%s</b> on the host <b>%s</b> using the specified username and password.<br>Please check these details are correct and that the database already exists then retry."), $params['db_database'], $params['db_host']); ?>
<br>
<br>
<?php
echo $db->message.'<br>'.$db->userinfo."\n";
if ($testonly) {
- echo '<br><br><a href="javascript:window.close()">Close window</a>';
+ echo '<br><br><a href="javascript:window.close()"><?php echo translate("Close window"); ?></a>';
}
?>
</div>
Index: install-dbsuccess.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/install-dbsuccess.html,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -r1.1 -r1.1.6.1
--- install-dbsuccess.html 27 Sep 2002 19:24:39 -0000 1.1
+++ install-dbsuccess.html 30 Aug 2003 22:00:34 -0000 1.1.6.1
@@ -1,19 +1,15 @@
<html>
<head>
- <title>DB Test Success</title>
+ <title><?php echo translate("DB Test Success"); ?></title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
</head>
<body>
<br><br>
<div align="center">
- The installation script successfully connected to the database
- <b><?php echo $params['db_database']?></b> on the host <b><?php echo $params['db_host']?></b>
- using the specified username and password.
+ <?php printf(translate("The installation script successfully connected to the database <b>%s</b> on the host <b>%s</b> using the specified username and password.<br>Congratulations!"), $params['db_database'], $params['db_host']); ?>
<br>
- Congratulations!
<br>
- <br>
- <a href="javascript:window.close()">Close window</a>
+ <a href="javascript:window.close()"><?php echo translate("Close window"); ?></a>
</div>
</body>
</html>
Index: install.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/install.html,v
retrieving revision 1.9
retrieving revision 1.9.6.1
diff -u -r1.9 -r1.9.6.1
--- install.html 27 Sep 2002 19:24:39 -0000 1.9
+++ install.html 30 Aug 2003 22:00:34 -0000 1.9.6.1
@@ -3,89 +3,89 @@
<title>phpBugTracker Installation</title>
<link rel="StyleSheet" href="styles/default.css" type="text/css">
<script language="JavaScript">
- function testDB(frm) {ldelim}
+ function testDB(frm) {
window.open('install.php?op=dbtest&db_type=' + frm.db_type.options[frm.db_type.selectedIndex].value +
'&db_host=' + frm.db_host.value + '&db_database=' + frm.db_database.value +
'&db_user=' + frm.db_user.value + '&db_pass=' + frm.db_pass.value,
'iwin', 'dependent=yes,width=450,height=300,scrollbars=1');
- {rdelim}
+ }
</script>
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
-<form action="{$smarty.server.PHP_SELF}" method="post">
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="200" valign="top"><br><img src="logo.jpg"></td>
<td valign="top" align="center">
- <div class="banner">phpBugTracker Installation</div>
- {if $error}<div class="error">{$error}</div>{/if}
+ <div class="banner"><?php echo translate("phpBugTracker Installation"); ?></div>
+ <?php if (!empty($error)) echo "<div class=\"error\">$error</div>"; ?>
<table border="0" cellpadding="0" cellspacing="3">
<tr>
- <th colspan="2">Database Options</th>
+ <th colspan="2"><?php echo translate("Database Options"); ?></th>
</tr>
<tr>
<td width="150">Type:</td>
- <td><select name="db_type">{build_select selected=$db_type}</select></td>
+ <td><select name="db_type"><?php build_select($db_type) ?></select></td>
</tr>
<tr>
<td width="150">Host:</td>
- <td><input type="text" name="db_host" value="{$db_host|default:localhost}"></td>
+ <td><input type="text" name="db_host" value="<?php echo !empty($db_host) ? $db_host : 'localhost'; ?>"></td>
</tr>
<tr>
<td width="150">
- Database Name:
+ <?php echo translate("Database Name"); ?>:
</td>
- <td valign="top"><input type="text" name="db_database" value="{$db_database|default:bug_tracker}"></td>
+ <td valign="top"><input type="text" name="db_database" value="<?php echo !empty($db_database) ? $db_database : 'bug_tracker'; ?>"></td>
</tr>
<tr>
- <td colspan="2" align="center"><b>(This database must already exist)</b></td>
+ <td colspan="2" align="center"><b>(<?php echo translate("This database must already exist"); ?>)</b></td>
</tr>
<tr>
- <td width="150">User:</td>
- <td><input type="text" name="db_user" value="{$db_user|default:root}"></td>
+ <td width="150"><?php echo translate("User"); ?>:</td>
+ <td><input type="text" name="db_user" value="<?php echo !empty($db_user) ? $db_user : 'root'; ?>"></td>
</tr>
<tr>
- <td width="150">Password:</td>
- <td><input type="password" name="db_pass" value="{$db_pass}"></td>
+ <td width="150"><?php echo translate("Password"); ?>:</td>
+ <td><input type="password" name="db_pass" value="<?php echo $db_pass; ?>"></td>
</tr>
<tr>
- <td width="150">Table Prefix:</td>
- <td><input type="text" name="tbl_prefix" value="{$tbl_prefix|default:phpbt_}"></td>
+ <td width="150"><?php echo translate("Table Prefix"); ?>:</td>
+ <td><input type="text" name="tbl_prefix" value="<?php echo !empty($tbl_prefix) ? $tbl_prefix : 'phpbt_'; ?>"></td>
</tr>
<tr>
<td colspan="2" align="center">
- <input type="button" value="Test Database Connection" onClick="testDB(this.form)">
+ <input type="button" value="<?php echo translate("Test Database Connection"); ?>" onClick="testDB(this.form)">
</td>
</tr>
<tr>
- <th colspan="2">Configuration</th>
+ <th colspan="2"><?php echo translate("Configuration"); ?></th>
</tr>
<tr>
<td width="150">
- phpBT Email:
+ <?php echo translate("phpBT Email"); ?>:
<br>
- (The email address used for sending bug updates, etc.)
+ (<?php echo translate("The email address used for sending bug updates, etc."); ?>)
</td>
- <td valign="top"><input type="text" name="phpbt_email" value="{$phpbt_email|default:$default_email}"></td>
+ <td valign="top"><input type="text" name="phpbt_email" value="<?php echo !empty($phpbt_email) ? $phpbt_email : $default_email; ?>"></td>
</tr>
<tr>
<td width="150">
- Admin Login:
+ <?php echo translate("Admin Login"); ?>:
<br>
- (Must be a valid email address)
+ ...
[truncated message content] |
|
From: Benjamin C. <bc...@us...> - 2003-08-30 22:00:24
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv21286/admin
Added Files:
Tag: htmltemplates
pagination.html
Log Message:
--- NEW FILE: pagination.html ---
<div align="center" class="pagination">
<?php echo $first.' - '. $last.' of '. $total; ?>
<?php if ($pages != "1") echo "<br>[ $pages ]"; ?>
</div>
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv21004
Modified Files:
Tag: htmltemplates
badperm.html component-edit.html configure.html
database-edit.html databaselist.html group-edit.html
grouplist.html os-edit.html oslist.html project-add.html
project-edit.html projectlist.html resolution-edit.html
resolutionlist.html severity-edit.html severitylist.html
site-edit.html sitelist.html status-edit.html statuslist.html
user-edit.html userlist.html version-edit.html wrap-popup.html
wrap.html
Log Message:
Switching to html templates and gettext
Index: badperm.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/badperm.html,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -r1.2 -r1.2.6.1
--- badperm.html 24 May 2002 15:19:16 -0000 1.2
+++ badperm.html 30 Aug 2003 21:59:37 -0000 1.2.6.1
@@ -2,7 +2,7 @@
<tr>
<td align="center">
<font color="#ff0000">
- You do not have the permissions required for that function
+ <?php echo translate("You do not have the permissions required for that function"); ?>
</font>
</td>
</tr>
Index: component-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/component-edit.html,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -r1.7 -r1.7.4.1
--- component-edit.html 30 Oct 2002 22:34:57 -0000 1.7
+++ component-edit.html 30 Aug 2003 21:59:37 -0000 1.7.4.1
@@ -1,8 +1,7 @@
<script language="JavaScript">
- var nameString = '{$STRING.givename}';
- var descString = '{$STRING.givedesc}';
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+ var descString = '<?php echo translate("Please enter a description"); ?>';
- {literal}
function checkForm(frm) {
if (frm.component_name.value == '') {
alert(nameString);
@@ -16,53 +15,55 @@
}
return true;
}
- {/literal}
</script>
- <b>{$page_title}</b>
- <hr size="1">
- {if $error}<div class="error">{$error}</div>{/if}
- <form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
- <table border="0">
- <input type="hidden" name="do" value="component">
- <input type="hidden" name="component_id" value="{$component_id}">
- <input type="hidden" name="project_id" value="{$project_id}">
- <input type="hidden" name="use_js" value="{$smarty.request.use_js}">
- <tr>
- <td valign="top">
- Name:
- </td>
- <td valign="top">
- <input type="text" name="component_name" value="{$component_name|stripslashes|htmlspecialchars}">
- </td>
- </tr>
- <tr>
- <td valign="top">
- Description:
- </td>
- <td valign="top">
- <textarea name="component_desc" cols="40" rows="10">{$component_desc|stripslashes|htmlspecialchars}</textarea>
- </td>
- </tr>
- <tr>
- <td valign="top">
- Owner:
- </td>
- <td valign="top">
- <select name="owner"><option value="0">None</option>{build_select box=owner selected=$owner}</select>
- </td>
- </tr>
- <tr>
- <td valign="top">
- Active:
- </td>
- <td valign="top">
- <input type="checkbox" name="active" value="1" {if $active or not $component_id}checked{/if}>
- </td>
- </tr>
- <tr>
- <td>
- <input type="submit" value="Submit">
- </td>
- </tr>
- </table>
- </form>
+ <b><?php echo $page_title; ?></b>
+<hr size="1">
+<?php if ($error) echo '<div class="error">'.$error.'</div>'; ?>
+<form method="post" onSubmit="return checkForm(this)">
+<table border="0">
+ <tr>
+ <td valign="top">
+ <?php echo translate("Name"); ?>:
+ </td>
+ <td valign="top">
+ <input type="text" name="component_name" value="<?php echo stripslashes(htmlspecialchars($component_name)); ?>">
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <?php echo translate("Description"); ?>:
+ </td>
+ <td valign="top">
+ <textarea name="component_desc" cols="40" rows="10"><?php echo stripslashes(htmlspecialchars($component_desc)); ?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <?php echo translate("Owner"); ?>:
+ </td>
+ <td valign="top">
+ <select name="owner"><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', $owner); ?></select>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <?php echo translate("Active"); ?>:
+ </td>
+ <td valign="top">
+ <input type="checkbox" name="active" value="1" <?php if ($active or !$component_id) echo 'checked'; ?>>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+
+ </td>
+ <td>
+ <input type="submit" value="<?php echo translate("Submit"); ?>">
+ <input type="hidden" name="component_id" value="<?php echo $component_id; ?>">
+ <input type="hidden" name="project_id" value="<?php echo $project_id; ?>">
+ <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
+ <input type="hidden" name="op" value="save_component">
+ </td>
+ </tr>
+</table>
+</form>
Index: configure.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/configure.html,v
retrieving revision 1.6
retrieving revision 1.6.6.1
diff -u -r1.6 -r1.6.6.1
--- configure.html 24 May 2002 15:19:16 -0000 1.6
+++ configure.html 30 Aug 2003 21:59:37 -0000 1.6.6.1
@@ -1,38 +1,38 @@
-<form action="{$smarty.server.PHP_SELF}" method="post">
+<form method="post">
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$page_title}</b>
+ <b> <?php echo $page_title; ?></b>
<hr size="1">
<table border="0">
<tr>
- <th>Variable</th>
- <th>Value</th>
- <th>Information</th>
+ <th><?php echo translate("Variable"); ?></th>
+ <th><?php echo translate("Value"); ?></th>
+ <th><?php echo translate("Information"); ?></th>
</tr>
- {section name=var loop=$vars}
- <tr{if $smarty.section.var.iteration is even} class="alt"{/if}>
- <td>{$vars[var].varname}</td>
+ <?php for ($i = 0, $count = count($vars); $i < $count; $i++) { ?>
+ <tr<?php if ($i % 2) echo ' class="alt"'; ?>>
+ <td><?php echo $vars[$i]['varname']; ?></td>
<td>
- {if $vars[var].vartype eq "multi"}
- <select name="{$vars[var].varname}">{build_select box=$vars[var].varname selected=$vars[var].varvalue}</select>
- {elseif $vars[var].vartype eq "bool"}
- <input type="radio" name="{$vars[var].varname}" value="1"{if $vars[var].varvalue} checked{/if}> Yes
- <input type="radio" name="{$vars[var].varname}" value="0"{if not $vars[var].varvalue} checked{/if}> No
- {else}
- <input type="text" name="{$vars[var].varname}" value="{$vars[var].varvalue}">
- {/if}
+ <?php if ($vars[$i]['vartype'] == "multi") { ?>
+ <select name="<?php echo $vars[$i]['varname']; ?>"><?php build_select($vars[$i]['varname'], $vars[$i]['varvalue']); ?></select>
+ <?php } elseif ($vars[$i]['vartype'] == "bool") { ?>
+ <input type="radio" name="<?php echo $vars[$i]['varname']; ?>" value="1"<?php if ($vars[$i]['varvalue']) echo ' checked'; ?>> Yes
+ <input type="radio" name="<?php echo $vars[$i]['varname']; ?>" value="0"<?php if (!$vars[$i]['varvalue']) echo ' checked'; ?>> No
+ <?php } else { ?>
+ <input type="text" name="<?php echo $vars[$i]['varname']; ?>" value="<?php echo $vars[$i]['varvalue']; ?>">
+ <?php } ?>
</td>
- <td>{$vars[var].description}</td>
+ <td><?php echo translate($vars[$i]['description']); ?></td>
</tr>
- {/section}
+ <?php } ?>
</table>
</td>
</tr>
<tr>
<td align="center">
- <input type="reset" value="Reset Form">
- <input type="submit" name="submit" value="Submit Changes">
+ <input type="reset">
+ <input type="submit" name="submit" value="<?php echo translate("Submit"); ?>">
</td>
</tr>
</table>
Index: database-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/database-edit.html,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -r1.4 -r1.4.4.1
--- database-edit.html 5 Nov 2002 20:58:18 -0000 1.4
+++ database-edit.html 30 Aug 2003 21:59:37 -0000 1.4.4.1
@@ -1,37 +1,53 @@
-<script language="JavaScript">
- var nameString = '{$STRING.givename}';
-
- {literal}
- function checkForm(frm) {
- if (frm.database_name.value == '') {
- alert(nameString);
- frm.database_name.focus();
- return false;
- }
- return true;
- }
- {/literal}
-</script>
-<b>{$page_title} </b>
-<hr size="1">
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="database_id" value="{$database_id}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
-<table border='0'>
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="30" name="database_name" value="{$database_name|stripslashes|htmlspecialchars}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Sort Order:</td>
- <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td>
-</tr>
-</table>
-<br>
-<input type='submit' name='submit' value='Submit'>
-</form>
+<script type="text/javascript" language="JavaScript">
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+
+ function checkForm(frm) {
+ if (frm.database_name.value == '') {
+ alert(nameString);
+ frm.database_name.focus();
+ return false;
+ }
+ return true;
+ }
+</script>
+
+<b><?php echo $page_title; ?> </b>
+<hr size="1">
+<form method="post" onsubmit="return checkForm(this)">
+ <table border='0'>
+ <?php if ($error) { ?>
+ <tr>
+ <td colspan="2" class="error">
+ <?php echo $error; ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Name"); ?>:
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="30" name="database_name" value="<?php echo stripslashes(htmlspecialchars($database_name)); ?>">
+ </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 align="right" valign="top">
+
+ </td>
+ <td>
+ <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'>
+ <input type="hidden" name="database_id" value="<?php echo $database_id; ?>">
+ <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
+ <input type="hidden" name="op" value="save">
+ </td>
+ </tr>
+ </table>
+</form>
Index: databaselist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/databaselist.html,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -r1.4 -r1.4.6.1
--- databaselist.html 30 Sep 2002 18:02:06 -0000 1.4
+++ databaselist.html 30 Aug 2003 21:59:37 -0000 1.4.6.1
@@ -1,47 +1,36 @@
<script language="JavaScript">
<!--
- var me = '{$SCRIPT_NAME}';
- {literal}
+ var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>';
function popupDatabase(id) {
window.open(me + '?op=edit&use_js=1&database_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1');
}
- {/literal}
// -->
</script>
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$STRING.databaselist'}</b> - <a href="{$SCRIPT_NAME}?op=edit&database_id=0" onClick="popupDatabase(0); return false;">{$STRING.addnew} {$STRING.database}</a>
+ <b> <?php echo translate("Database list"); ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&database_id=0" onClick="popupDatabase(0); return false;"><?php echo translate("Add new database"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" cellspacing="1" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th class="{$headers.name.class}"><a href="{$headers.name.url}">{$STRING.name}</a></th>
- <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">{$STRING.sortorder}</a></th>
- <th>Delete</th>
+ <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th>
+ <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th>
+ <th> </th>
</tr>
- {section name=database loop=$databases}
- <tr{if $smarty.section.database.iteration is even} class="alt"{/if}>
- <td><a href="{$SCRIPT_NAME}?op=edit&database_id={$databases[database].database_id}" onClick="popupDatabase({$databases[database].database_id}); return false;">{$databases[database].database_name|stripslashes}</a></td>
- <td align="center">{$databases[database].sort_order}</td>
- <td align="center">
- {if not $databases[database].bug_count}
- <a href="{$SCRIPT_NAME}?op=del&database_id={$databases[database].database_id}" onClick="return confirm('{$STRING.suredeletedb}')">{$STRING.delete}</a>
- {/if}
- </td>
- </tr>
- {/section}
+ <?php for ($i = 0, $count = count($databases); $i < $count; $i++) { ?>
<tr>
- <td colspan="3" align="center">
- <br>
- {$first} - {$last} of {$total}
- <br>
- {if $pages ne "1"}[ {$pages} ]{/if}
- <br>
+ <td><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&database_id=<?php echo $databases[$i]['database_id']; ?>" onClick="popupDatabase(<?php echo $databases[$i]['database_id']; ?>); return false;"><?php echo stripslashes($databases[$i]['database_name']); ?></a></td>
+ <td align="center"><?php echo $databases[$i]['sort_order']; ?></td>
+ <td align="center">
+ <?php if (!$databases[$i]['bug_count']) { ?>
+ <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=del&database_id=<?php echo $databases[$i]['database_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this item?"); ?>')"><?php echo translate("Delete"); ?></a>
+ <?php } ?>
</td>
</tr>
+ <?php } ?>
</table>
- <br>
+ <?php include('pagination.html'); ?>
</td>
</tr>
</table>
Index: group-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/group-edit.html,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -r1.6 -r1.6.4.1
--- group-edit.html 19 Apr 2003 18:12:41 -0000 1.6
+++ group-edit.html 30 Aug 2003 21:59:37 -0000 1.6.4.1
@@ -1,36 +1,53 @@
-<script language="JavaScript">
- var nameString = '{$STRING.givename}';
-
- {literal}
- function checkForm(frm) {
- if (frm.group_name.value == '') {
- alert(nameString);
- frm.group_name.focus();
- return false;
- }
- return true;
- }
- {/literal}
-</script>
-<b>{$page_title} </b>
-<hr size="1">
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="group_id" value="{$group_id}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
-<table border='0'>
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="40" name="group_name" value="{$group_name|stripslashes|htmlspecialchars}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Assignable:</td>
- <td><input type="checkbox" name="assignable" value="1" {if $assignable > 0}checked="checked"{/if}></td>
-</table>
-<br>
-<input type='submit' name='submit' value='Submit'>
-</form>
+<script type="text/javascript" language="JavaScript">
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+
+ function checkForm(frm) {
+ if (frm.group_name.value == '') {
+ alert(nameString);
+ frm.group_name.focus();
+ return false;
+ }
+ return true;
+ }
+</script>
+<b><?php echo $page_title; ?></b>
+<hr size="1">
+<form method="post" onsubmit="return checkForm(this)">
+ <table border='0'>
+ <?php if (!empty($error)) { ?>
+ <tr>
+ <td colspan="2" class="error">
+ <?php echo $error; ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td align="right" valign="top">
+ Name:
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="40" name="group_name" value="<?php echo stripslashes(htmlspecialchars($group_name)); ?>">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ Assignable:
+ </td>
+ <td>
+ <input type="checkbox" name="assignable" value="1" <?php if ($assignable > 0) echo 'checked'; ?>>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+
+ </td>
+ <td>
+ <input type='submit' value='<?php echo translate("Submit"); ?>'>
+ <input type="hidden" name="op" value="save">
+ <input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
+ <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
+ </td>
+ </tr>
+ </table>
+</form>
+
Index: grouplist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/grouplist.html,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -r1.7 -r1.7.4.1
--- grouplist.html 19 Apr 2003 18:12:42 -0000 1.7
+++ grouplist.html 30 Aug 2003 21:59:37 -0000 1.7.4.1
@@ -1,52 +1,42 @@
<script language="JavaScript">
<!--
- var me = '{$smarty.server.PHP_SELF}';
- {literal}
+ 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');
}
- {/literal}
// -->
</script>
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&group_id=0" onClick="popupGroup(0); return false;">{$STRING.addnew} Group</a>
+ <b><?php echo $page_title; ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&group_id=0" onClick="popupGroup(0); return false;"><?php echo translate("Add new group"); ?></a>
<hr size="1">
- <table border="0" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th>
- <th class="{$headers.count.class}"><a href="{$headers.count.url}">Users</a></th>
+ <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th>
+ <th class="<?php echo $headers['count']['class']; ?>"><a href="<?php echo $headers['count']['url']; ?>"><?php echo translate("Users"); ?></a></th>
<th> </th>
</tr>
- {section name=group loop=$groups}
- <tr{if $smarty.section.group.iteration is even} class="alt"{/if}>
- <td><a href="{$smarty.server.PHP_SELF}?op=edit&group_id={$groups[group].group_id}" onClick="popupGroup({$groups[group].group_id}); return false;">{$groups[group].group_name|stripslashes}</a></td>
- <td align="center">{$groups[group].count}</td>
+ <?php for ($i = 0, $count = count($groups); $i < $count; $i++) { ?>
+ <tr>
+ <td><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="popupGroup(<?php echo $groups[$i]['group_id']; ?>); return false;"><?php echo stripslashes($groups[$i]['group_name']); ?></a></td>
+ <td align="center"><?php echo $groups[$i]['count']; ?></td>
<td align="center">
- {if $groups[group].locked}
- Locked
- {else}
- <a href="{$smarty.server.PHP_SELF}?op=del&group_id={$groups[group].group_id}" onClick="return confirm('This will remove all user assignments to this group and the group itself. Continue?')">Delete</a> |
- <a href="{$smarty.server.PHP_SELF}?op=purge&group_id={$groups[group].group_id}" onClick="return confirm('This will remove all user assignments to this group. Continue?')">Purge</a>
- {/if}
- {if $groups[group].assignable}
- | Assignable
- {/if}
+ <?php if($groups[$i]['locked']) {
+ echo translate("Locked");
+ } else { ?>
+ <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=del&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="return confirm('<?php echo translate("This will remove all user assignments to this group and the group itself. Continue?"); ?>')"><?php echo translate("Delete"); ?></a> |
+ <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=purge&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="return confirm('<?php echo translate("This will remove all user assignments to this group. Continue?"); ?>')"><?php echo translate("Purge"); ?></a>
+ <?php } ?>
+ <?php if($groups[$i]['assignable']) { ?>
+ | <?php echo translate("Assignable"); ?>
+ <?php } ?>
</td>
</tr>
- {/section}
- <tr>
- <td colspan="3" align="center">
- <br>
- {$first} - {$last} of {$total}
- <br>
- {if $pages ne "1"}[ {$pages} ]{/if}
- <br>
- </td>
- </tr>
- </table>
+ <?php } ?>
+ </table>
+ <?php include('pagination.html'); ?>
</td>
</tr>
</table>
Index: os-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/os-edit.html,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- os-edit.html 5 Nov 2002 20:58:19 -0000 1.5
+++ os-edit.html 30 Aug 2003 21:59:37 -0000 1.5.4.1
@@ -1,43 +1,60 @@
-<script language="JavaScript">
- var nameString = '{$STRING.givename}';
-
- {literal}
- function checkForm(frm) {
- if (frm.os_name.value == '') {
- alert(nameString);
- frm.os_name.focus();
- return false;
- }
- return true;
- }
- {/literal}
-</script>
-<b>{$page_title} </b>
-<hr size="1">
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="os_id" value="{$os_id}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
-<table border='0'>
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="40" name="os_name" value="{$os_name}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Regex:</td>
- <td><input type="text" size="20" maxlength="40" name="regex" value="{$regex}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Sort Order:</td>
- <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td>
-</tr>
-
-</table>
-<br>
-<input type='submit' name='submit' value='Submit'>
-</form>
-</td>
+<script type="text/javascript" language="JavaScript">
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+
+ function checkForm(frm) {
+ if (frm.os_name.value == '') {
+ alert(nameString);
+ frm.os_name.focus();
+ return false;
+ }
+ return true;
+ }
+</script>
+<b><?php echo $page_title; ?></b>
+<hr size="1">
+<form method="post" onsubmit="return checkForm(this)">
+ <table border='0'>
+ <?php if (!empty($error)) { ?>
+ <tr>
+ <td colspan="2" class="error">
+ <?php echo $error; ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Name"); ?>:
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="40" name="os_name" value="<?php echo $os_name; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Regex"); ?>:
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="40" name="regex" value="<?php echo $regex; ?>">
+ </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 align="right" valign="top">
+
+ </td>
+ <td>
+ <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'>
+ <input type="hidden" name="op" value="save">
+ <input type="hidden" name="os_id" value="<?php echo $os_id; ?>">
+ <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
+ </td>
+ </tr>
+ </table>
+</form>
Index: oslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/oslist.html,v
retrieving revision 1.9
retrieving revision 1.9.6.1
diff -u -r1.9 -r1.9.6.1
--- oslist.html 18 May 2002 03:00:50 -0000 1.9
+++ oslist.html 30 Aug 2003 21:59:37 -0000 1.9.6.1
@@ -1,54 +1,44 @@
<script language="JavaScript">
<!--
- var me = '{$smarty.server.PHP_SELF}';
- {literal}
+ var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>';
function popupOS(id) {
window.open(me + '?op=edit&use_js=1&os_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1');
}
- {/literal}
// -->
</script>
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&os_id=0" onClick="popupOS(0); return false;">{$STRING.addnew} OS</a>
+ <b> <?php echo $page_title; ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&os_id=0" onClick="popupOS(0); return false;"><?php echo translate("Add new operating system"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" cellspacing="1" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th>
- <th class="{$headers.regex.class}"><a href="{$headers.regex.url}">Regex</a></th>
- <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">Sort Order</a></th>
- <th>Delete</th>
+ <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th>
+ <th class="<?php echo $headers['regex']['class']; ?>"><a href="<?php echo $headers['regex']['url']; ?>"><?php echo translate("Regex"); ?></a></th>
+ <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th>
+ <th> </th>
</tr>
- {section name=os loop=$oses}
- <tr{if $smarty.section.os.iteration is even} class="alt"{/if}>
- <td><a href="{$smarty.server.PHP_SELF}?op=edit&os_id={$oses[os].os_id}" onClick="popupOS({$oses[os].os_id}); return false;">{$oses[os].os_name|stripslashes}</a></td>
- <td> {$oses[os].regex}</td>
- <td align="center">{$oses[os].sort_order}</td>
+ <?php for ($i = 0, $count = count($oses); $i < $count; $i++) { ?>
+ <tr>
+ <td><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&os_id=<?php echo $oses[$i]['os_id']; ?>" onClick="popupOS(<?php echo $oses[$i]['os_id']; ?>); return false;"><?php echo stripslashes($oses[$i]['os_name']); ?></a></td>
+ <td> <?php echo $oses[$i]['regex']; ?></td>
+ <td align="center"><?php echo $oses[$i]['sort_order']; ?></td>
<td align="center">
- {if not $oses[os].bug_count}
- <a href="{$smarty.server.PHP_SELF}?op=del&os_id={$oses[os].os_id}" onClick="return confirm('Are you sure you want to delete this OS?')">Delete</a>
- {/if}
+ <?php if (!$oses[$i]['bug_count']) { ?>
+ <a href="{$smarty.server.PHP_SELF}?op=del&os_id=<?php echo $oses[$i]['os_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this OS"); ?>?')"><?php echo translate("Delete"); ?></a>
+ <?php } ?>
</td>
</tr>
- {/section}
- <tr>
- <td colspan="3" align="center">
- <br>
- {$first} - {$last} of {$total}
- <br>
- {if $pages ne "1"}[ {$pages} ]{/if}
- <br>
- </td>
- </tr>
+ <?php } ?>
</table>
- <br>
- <div class="info">
- OSes with a Sort Order = 0 will not be selectable by users
- <br>
- Only those OSes that have no bugs referencing them can be deleted
- </div>
+ <?php include('pagination.html'); ?>
+ <br>
+ <div class="info">
+ <?php echo translate("Items with a Sort Order = 0 will not be selectable by users."); ?>
+ <br>
+ <?php echo translate("Only those items that have no bugs referencing them can be deleted."); ?>
+ </div>
</td>
</tr>
</table>
Index: project-add.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-add.html,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -r1.6 -r1.6.4.1
--- project-add.html 30 Oct 2002 22:34:57 -0000 1.6
+++ project-add.html 30 Aug 2003 21:59:37 -0000 1.6.4.1
@@ -1,10 +1,9 @@
<script language="JavaScript">
<!--
- var nameString = '{$STRING.givename}';
- var descString = '{$STRING.givedesc}';
- var versionString = '{$STRING.giveversion}';
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+ var descString = '<?php echo translate("Please enter a description"); ?>';
+ var versionString = '<?php echo translate("Please enter a version"); ?>';
- {literal}
function checkForm(frm) {
if (frm.project_name.value == '') {
alert(nameString);
@@ -33,42 +32,39 @@
}
return true;
}
- {/literal}
// -->
</script>
<form action="project.php" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="id" value="0">
-<input type="hidden" name="do" value="project">
<table border="0">
<tr>
<td valign="top" rowspan="2" width="320">
<table border="0">
<tr>
<td>
- <b>Project Information</b>
+ <b><?php echo translate("Project Information"); ?></b>
<hr size="1">
- {if $error}<div class="error">{$error}</div>{/if}
+ <?php if ($error) { ?><div class="error"><?php echo $error; ?></div><?php } ?>
</td>
</tr>
<tr>
<td valign="top">
- Name:
+ <?php echo translate("Name"); ?>:
<br>
- <input type="text" size="30" maxlength="30" name="project_name" value="{$project_name|stripslashes|htmlspecialchars}">
+ <input type="text" size="30" maxlength="30" name="project_name" value="<?php echo htmlspecialchars(stripslashes($project_name)); ?>">
</td>
</tr>
<tr>
<td valign="top">
- Description:
+ <?php echo translate("Description"); ?>:
<br>
- <textarea name="project_desc" cols=40 rows=5 wrap=virtual>{$project_desc|stripslashes|htmlspecialchars}</textarea>
+ <textarea name="project_desc" cols=40 rows=5 wrap=virtual><?php echo stripslashes(htmlspecialchars($project_desc)); ?></textarea>
</td>
</tr>
<tr>
<td valign="top">
- Active:
+ <?php echo translate("Active"); ?>:
<br>
- <input type="checkbox" name="active" value="1" {if $active}checked{/if}>
+ <input type="checkbox" name="active" value="1" <?php if ($active) echo 'checked'; ?>>
</td>
</tr>
</table>
@@ -77,16 +73,16 @@
<table border="0">
<tr>
<td>
- <b>Version Information</b>
+ <b><?php echo translate("Version Information"); ?></b>
<hr size="1">
- {if $version_error}<div class="error">{$version_error}</div>{/if}
+ <?php if ($version_error) { ?><div class="error"><?php echo $version_error; ?></div><?php } ?>
</td>
</tr>
<tr>
<td valign="top">
- Initial Version:
+ <?php echo translate("Initial Version"); ?>:
<br>
- <input type="text" size="30" maxlength="30" name="version_name" value="{$version_name|stripslashes|htmlspecialchars}">
+ <input type="text" size="30" maxlength="30" name="version_name" value="<?php echo stripslashes(htmlspecialchars($version_name)); ?>">
</td>
</tr>
</table>
@@ -97,35 +93,37 @@
<table border="0">
<tr>
<td>
- <b>Component Information</b>
+ <b><?php echo translate("Component Information"); ?></b>
<hr size="1">
- {if $component_error}<div class="error">{$component_error}</div>{/if}
+ <?php if ($component_error) { ?><div class="error"><?php echo $component_error; ?></div><?php } ?>
</td>
</tr>
<tr>
<td valign="top">
- Initial Component Name:
+ <?php echo translate("Initial Component Name"); ?>:
<br>
- <input type="text" size="30" maxlength="30" name="component_name" value="{$component_name|stripslashes|htmlspecialchars}">
+ <input type="text" size="30" maxlength="30" name="component_name" value="<?php echo stripslashes(htmlspecialchars($component_name)); ?>">
</td>
</tr>
<tr>
<td valign="top">
- Description:
+ <?php echo translate("Description"); ?>:
<br>
- <textarea name="component_desc" cols="30">{$component_desc|stripslashes|htmlspecialchars}</textarea>
+ <textarea name="component_desc" cols="30"><?php echo stripslashes(htmlspecialchars($component_desc)); ?></textarea>
</td>
</tr>
<tr>
<td valign="top">
- Owner:
+ <?php echo translate("Owner"); ?>:
<br>
- <select name="owner"><option value="0">None</option>{build_select box=owner selected=$owner}</select>
+ <select name="owner"><option value="0">None</option><?php build_select('owner', $owner); ?></select>
</td>
</tr>
</table>
</td>
</tr>
</table>
-<input type='submit' name='submit' value='Submit'>
+<input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'>
+<input type="hidden" name="id" value="0">
+<input type="hidden" name="op" value="save_project">
</form>
Index: project-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-edit.html,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -u -r1.13 -r1.13.4.1
--- project-edit.html 7 Apr 2003 18:55:40 -0000 1.13
+++ project-edit.html 30 Aug 2003 21:59:37 -0000 1.13.4.1
@@ -1,11 +1,9 @@
<script language="JavaScript">
<!--
- var me = '{$smarty.server.PHP_SELF}';
- var projectId = '{$project_id}';
- var nameString = '{$STRING.givename}';
- var descString = '{$STRING.givedesc}';
+ var projectId = '<?php echo $project_id; ?>';
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+ var descString = '<?php echo translate("Please enter a description"); ?>';
- {literal}
function checkForm(frm) {
if (frm.project_name.value == '') {
alert(nameString);
@@ -21,130 +19,129 @@
}
function popupComponent(id) {
- window.open(me + '?op=edit_component&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=450,height=300,scrollbars=1');
+ window.open('project.php?op=edit_component&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=450,height=300,scrollbars=1');
return false;
}
function popupVersion(id) {
- window.open(me + '?op=edit_version&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1');
+ window.open('project.php?op=edit_version&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1');
return false;
}
- {/literal}
// -->
</script>
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="id" value="{$project_id}">
-<input type="hidden" name="do" value="project">
+<form method="post" onSubmit="return checkForm(this)">
<table border="0" cellpadding="2" cellspacing="2" width="100%">
- {if $error}
+ <?php if($error) { ?>
<tr>
- <td colspan="2" class="error">{$error}</td>
+ <td colspan="2" class="error"><?php echo $error; ?></td>
</tr>
- {/if}
+ <?php } ?>
<tr>
<td valign="top" width="360">
- Name:
+ <?php echo translate("Name"); ?>:
<br>
- <input type="text" size="30" maxlength="30" name="project_name" value="{$project_name|stripslashes|htmlspecialchars}">
+ <input type="text" size="30" maxlength="30" name="project_name" value="<?php echo stripslashes(htmlspecialchars($project_name)); ?>">
</td>
<td valign="top" rowspan="3">
- Only users in the following groups can see this project:
+ <?php echo translate("Only users in the following groups can see this project"); ?>:
<br>
<select name="usergroup[]" size="10" multiple>
- {build_select box=group selected=$project_groups project=1}
+ <?php build_select('group', $project_groups, 1); ?>
</select>
</td>
</tr>
<tr>
<td valign="top">
- Description:
+ <?php echo translate("Description"); ?>:
<br>
- <textarea name="project_desc" cols=40 rows=5 wrap=virtual>{$project_desc|stripslashes|htmlspecialchars}</textarea>
+ <textarea name="project_desc" cols=40 rows=5 wrap=virtual><?php echo stripslashes(htmlspecialchars($project_desc)); ?></textarea>
</td>
</tr>
<tr>
<td valign="top">
- Active:
+ <?php echo translate("Active"); ?>:
<br>
- <input type="checkbox" name="active" value="1" {if $active}checked{/if}>
+ <input type="checkbox" name="active" value="1" <?php if($active) echo 'checked'; ?>>
</td>
</tr>
-{if isset($perm) and $perm->have_perm('Administrator')}
+<?php if(isset($perm) and $perm->have_perm('Administrator')) { ?>
<tr>
<td>
- These developers can administer this project:
+ <?php echo translate("These developers can administer this project"); ?>:
<br>
<select name="useradmin[]" size="10" multiple>
- {build_select box=owner selected=$project_admins}
+ <?php build_select('owner', $project_admins); ?>
</select>
</td>
</tr>
-{else}
+<?php } else { ?>
<tr>
<td>
- These developers can administer this project:
+ <?php echo translate("These developers can administer this project"); ?>:
<br>
- {section name=admin loop=$project_admins}
- {$project_developers[admin]}<br />
- {/section}
+ <?php for ($i = 0, $count = count($project_admins); $i < $count; $i++) echo $project_developers[$i].'<br />'; ?>
</td>
</tr>
-{/if}
+<?php } ?>
</table>
-<input type='submit' name='submit' value='Submit'>
+<input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'>
+<input type="hidden" name="id" value="<?php echo $project_id; ?>">
+<input type="hidden" name="op" value="save_project">
</form>
<br>
<table border="0" width="100%">
<tr>
<td width="50%" valign="top">
<br>
- <b>Versions</b> - <a href="{$smarty.server.PHP_SELF}?op=edit_version&project_id={$project_id}&id=0" onClick="return popupVersion(0);">{$STRING.addnew} Version</a>
+ <b><?php echo translate("Versions"); ?></b> - <a href="project.php?op=edit_version&project_id=<?php echo $project_id; ?>&id=0" onClick="return popupVersion(0);"><?php echo translate("Add new version"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th>Version</th>
- <th>Created</th>
- <th>Active</th>
- <th>Delete</th>
+ <th><?php echo translate("Version"); ?></th>
+ <th><?php echo translate("Created"); ?></th>
+ <th><?php echo translate("Active"); ?></th>
+ <th><?php echo translate("Delete"); ?></th>
</tr>
- {section name=version loop=$versions}
- <tr{if $smarty.section.version.iteration is even} class="alt"{/if}>
- <td><a href="{$smarty.server.PHP_SELF}?op=edit_version&id={$versions[version].version_id}" onClick="popupVersion({$versions[version].version_id}); return false;">{$versions[version].version_name|stripslashes}</a></td>
- <td align="center">{$versions[version].created_date|date:DATE_FORMAT}</td>
- <td align="center">{if $versions[version].active}Yes{else}No{/if}</td>
- <td align="center">{if not $versions[version].bug_count}<a href="{$smarty.server.PHP_SELF}?op=del_version&id={$versions[version].version_id}&project_id={$project_id}">Delete</a>{/if}</td>
+ <?php for ($i = 0, $count = count($versions); $i < $count; $i++) { ?>
+ <tr>
+ <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 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>
- {sectionelse}
+ <?php } ?>
+ <?php if (!$count) { ?>
<tr>
- <td colspan="4" align="center">{$STRING.noversions}</td>
+ <td colspan="4" align="center"><?php echo translate("No versions found"); ?></td>
</tr>
- {/section}
+ <?php } ?>
</table>
</td>
<td width="50%" valign="top">
<br>
- <b>Components</b> - <a href="{$smarty.server.PHP_SELF}?op=edit_component&project_id={$project_id}&id=0" onClick="return popupComponent(0);">{$STRING.addnew} Component</a>
+ <b><?php echo translate("Components"); ?></b> - <a href="project.php?op=edit_component&project_id=<?php echo $project_id; ?>&id=0" onClick="return popupComponent(0);"><?php echo translate("Add new component"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th>Component</th>
- <th>Created</th>
- <th>Active</th>
- <th>Delete</th>
+ <th><?php echo translate("Component"); ?></th>
+ <th><?php echo translate("Created"); ?></th>
+ <th><?php echo translate("Active"); ?></th>
+ <th><?php echo translate("Delete"); ?></th>
</tr>
- {section name=component loop=$components}
- <tr{if $smarty.section.component.iteration is even} class="alt"{/if}>
- <td><a href="{$smarty.server.PHP_SELF}?op=edit_component&id={$components[component].component_id}" onClick="popupComponent({$components[component].component_id}); return false;">{$components[component].component_name|stripslashes}</a></td>
- <td align="center">{$components[component].created_date|date:DATE_FORMAT}</td>
- <td align="center">{if $components[component].active}Yes{else}No{/if}</td>
- <td align="center">{if not $components[component].bug_count}<a href="{$smarty.server.PHP_SELF}?op=del_component&id={$components[component].component_id}&project_id={$project_id}">Delete</a>{/if}</td>
+ <?php for ($i = 0, $count = count($components); $i < $count; $i++) { ?>
+ <tr>
+ <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 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>
- {sectionelse}
+ <?php } ?>
+ <?php if (!$count) { ?>
<tr>
- <td colspan="4" align="center">{$STRING.nocomponents}</td>
+ <td colspan="4" align="center"><?php echo translate("No components found"); ?></td>
</tr>
- {/section}
+ <?php } ?>
</table>
</td>
</tr>
Index: projectlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/projectlist.html,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -u -r1.8 -r1.8.4.1
--- projectlist.html 7 Apr 2003 18:55:40 -0000 1.8
+++ projectlist.html 30 Aug 2003 21:59:37 -0000 1.8.4.1
@@ -1,31 +1,27 @@
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=add">{$STRING.addnew} Project</a>
+ <b> <?php echo $page_title; ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=add"><?php echo translate("Add new project"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" cellspacing="1" width="100%">
+ <table class="bordertable" align="center">
<tr>
- <th class="{$headers.name.class}"><a href="{$headers.name.url}">Project</a></th>
- <th class="{$headers.createddate.class}"><a href="{$headers.createddate.url}">Created</a></th>
- <th class="{$headers.active.class}"><a href="{$headers.active.url}">Active</a></th>
+ <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Project"); ?></a></th>
+ <th class="<?php echo $headers['createddate']['class']; ?>"><a href="<?php echo $headers['createddate']['url']; ?>"><?php echo translate("Created Date"); ?></a></th>
+ <th class="<?php echo $headers['active']['class']; ?>"><a href="<?php echo $headers['active']['url']; ?>"><?php echo translate("Active"); ?></a></th>
</tr>
- {section name=project loop=$projects}
- <tr{if $smarty.section.project.iteration is even} class="alt"{/if}>
- <td>{if $perm->have_perm('Administrator') or $perm->have_perm_proj($projects[project].project_id)}<a href="{$smarty.server.PHP_SELF}?op=edit&id={$projects[project].project_id}">{$projects[project].project_name|stripslashes}</a>{else}{$projects[project].project_name|stripslashes}{/if}</td>
- <td align="center">{$projects[project].created_date|date:DATE_FORMAT}</td>
- <td align="center">{if $projects[project].active}Yes{else}No{/if}</td>
+ <?php for ($i = 0, $count = count($projects); $i < $count; $i++) { ?>
+ <tr>
+ <td>
+ <?php if ($perm->have_perm('Administrator') or $perm->have_perm_proj($projects[$i]['project_id'])) { ?>
+ <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&id=<?php echo $projects[$i]['project_id']; ?>"><?php echo stripslashes($projects[$i]['project_name']); ?></a>
+ <?php } else { echo stripslashes($projects[$i]['project_name']); } ?>
+ </td>
+ <td align="center"><?php echo date(DATE_FORMAT, $projects[$i]['created_date']); ?></td>
+ <td align="center"><?php echo $projects[$i]['active'] ? translate("Yes") : translate("No"); ?></td>
</tr>
- {/section}
- <tr>
- <td colspan="3" align="center">
- <br>
- {$first} - {$last} of {$total}
- <br>
- {if $pages ne "1"}[ {$pages} ]{/if}
- <br>
- </td>
- </tr>
+ <?php } ?>
</table>
+ <?php include('pagination.html'); ?>
</td>
</tr>
</table>
Index: resolution-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolution-edit.html,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- resolution-edit.html 5 Nov 2002 20:58:19 -0000 1.5
+++ resolution-edit.html 30 Aug 2003 21:59:37 -0000 1.5.4.1
@@ -1,48 +1,68 @@
-<script language="JavaScript">
- var nameString = '{$STRING.givename}';
- var descString = '{$STRING.givedesc}';
-
- {literal}
- function checkForm(frm) {
- if (frm.resolution_name.value == '') {
- alert(nameString);
- frm.resolution_name.focus();
- return false;
- }
- if (frm.resolution_desc.value == '') {
- alert(descString);
- frm.resolution_desc.focus();
- return false;
- }
- return true;
- }
- {/literal}
-</script>
-<b>{$page_title} </b>
-<hr size="1">
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="resolution_id" value="{$resolution_id}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
-<table border='0'>
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="40" name="resolution_name" value="{$resolution_name|stripslashes|htmlspecialchars}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Description:</td>
- <td><textarea name="resolution_desc" cols=20 rows=5 wrap=virtual>{$resolution_desc|stripslashes|htmlspecialchars}</textarea></td>
-</tr>
-<tr>
- <td align="right" valign="top">Sort Order:</td>
- <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td>
-</tr>
-
-</table>
-<br>
-<input type='submit' name='submit' value='Submit'>
-</form>
+<script type="text/javascript" language="JavaScript">
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+ var descString = '<?php echo translate("Please enter a description"); ?>';
+
+ function checkForm(frm) {
+ if (frm.resolution_name.value == '') {
+ alert(nameString);
+ frm.resolution_name.focus();
+ return false;
+ }
+ if (frm.resolution_desc.value == '') {
+ alert(descString);
+ frm.resolution_desc.focus();
+ return false;
+ }
+ return true;
+ }
+</script>
+<b><?php echo $page_title; ?> </b>
+<hr size="1">
+<form method="post" onsubmit="return checkForm(this)">
+ <table border='0'>
+ <?php if($error) { ?>
+ <tr>
+ <td colspan="2" class="error">
+ <?php echo $error; ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Name"); ?>:
+ </td>
+ <td>
+ <input type="text" size="20" maxlength="40" name="resolution_name" value="<?php echo stripslashes(htmlspecialchars($resolution_name)); ?>">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">
+ <?php echo translate("Description"); ?>:
+ </td>
+ <td>
+ <textarea name="resolution_desc" cols="20" rows="5" wrap="virtual">
+ <?php echo stripslashes(htmlspecialchars($resolution_desc)); ?>
+ </textarea>
+ </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 align="right" valign="top">
+
+ </td>
+ <td>
+ <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'>
+ <input type="hidden" name="resolution_id" value="<?php echo $resolution_id; ?>">
+ <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>">
+ <input type="hidden" name="op" value="save">
+ </td>
+ </tr>
+ </table>
+</form>
Index: resolutionlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolutionlist.html,v
retrieving revision 1.11
retrieving revision 1.11.6.1
diff -u -r1.11 -r1.11.6.1
--- resolutionlist.html 18 May 2002 03:00:50 -0000 1.11
+++ resolutionlist.html 30 Aug 2003 21:59:37 -0000 1.11.6.1
@@ -1,53 +1,41 @@
<script language="JavaScript">
<!--
- var me = '{$smarty.server.PHP_SELF}';
- {literal}
-
function popupResolution(id) {
- window.open(me + '?op=edit&use_js=1&resolution_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1');
+ window.open('resolution.php?op=edit&use_js=1&resolution_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1');
}
- {/literal}
// -->
</script>
<table border="0" width="100%">
<tr>
<td valign="top">
- <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&resolution_id=0" onClick="popupResolution(0); return false;">{$STRING.addnew} Resolution</a>
+ <b> <?php echo $page_title; ?></b> - <a href="resolution.php?op=edit&resolution_id=0" onClick="popupResolution(0); return false;"><?php echo translate("Add new resolution"); ?></a>
<hr size="1">
- <table border="0" cellpadding="2" cellspacing="1">
+ <table class="bordertable" align="center">
<tr>
- <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th>
- <th class="{$headers.description.class}"><a href="{$headers.description.url}">Description</a></th>
- <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">Sort Order</a></th>
- <th>Delete</th>
+ <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th>
+ <th class="<?php echo $headers['description']['class']; ?>"><a href="<?php echo $headers['description']['url']; ?>"><?php echo translate("Description"); ?></a></th>
+ <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th>
+ <th><?php echo translate("Delete"); ?></th>
</tr>
- {section name=resolution loop=$resolutions}
- <tr{if $smarty.section.resolution.iteration is even} class="alt"{/if}>
- <td><a href="{$smarty.server.PHP_SELF}?op=edit&resolution_id={$resolutions[resolution].resolution_id}" onClick="popupResolution({$resolutions[resolution].resolution_id}); return false;">{$resolutions[resolution].resolution_name|stripslashes}</a></td>
- <td> {$resolutions[resolution].resolution_desc}</td>
- <td align="center">{$resolutions[resolution].sort_order}</td>
- <td align="center">
- {if not $resolutions[resolution].bug_count}
- <a href="{$smarty.server.PHP_SELF}?op=del&resolution_id={$resolutions[resolution].resolution_id}" onClick="return confirm('Are you sure you want to delete this resolution?')">Delete</a>
- {/if}
- </td>
- </tr>
- {/section}
+ <?php for ($i = 0, $count = count($resolutions); $i < $count; $i++) { ?>
<tr>
- <td colspan="3" align="center">
- <br>
- {$first} - {$last} of {$total}
- <br>
- {if $pages ne "1"}[ {$pages} ]{/if}
- <br>
+ <td><a href="resolution.php?op=edit&resolution_id=<?php echo $resolutions[$i]['resolution_id']; ?>" onClick="popupResolution(<?php echo $resolutions[$i]['resolution_id']; ?>); return false;"><?php echo stripslashes($resolutions[$i]['resolution_name']); ?></a></td>
+ <td> <?php echo $resolutions[$i]['resolution_desc']; ?></td>
+ <td align="center"><?php echo $resolutions[$i]['sort_order']; ?></td>
+ <td align="center">
+ <?php if(!$resolutions[$i]['bug_count']) { ?>
+ <a href="resolution.php?op=del&resolution_id=<?php echo $resolutions[$i]['resolution_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this resolution?"); ?>')"><?php echo translate("Delete"); ?></a>
+ <?php } ?>
</td>
</tr>
- </table>
+ <?php } ?>
+ </table>
+ <?php include('pagination.html'); ?>
<br>
<div class="info">
- Resolutions with a Sort Order = 0 will not be selectable by users
- <br>
- Only those Resolutions that have no bugs referencing them can be deleted
+ <?php echo translate("Items with a Sort Order = 0 will not be selectable by users."); ?>
+ <br>
+ <?php echo translate("Only those items that have no bugs referencing them can be deleted."); ?>
</div>
</td>
</tr>
Index: severity-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/severity-edit.html,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- severity-edit.html 5 Nov 2002 20:58:19 -0000 1.5
+++ severity-edit.html 30 Aug 2003 21:59:37 -0000 1.5.4.1
@@ -1,52 +1,77 @@
-<script language="JavaScript">
- var nameString = '{$STRING.givename}';
- var descString = '{$STRING.givedesc}';
-
- {literal}
- function checkForm(frm) {
- if (frm.severity_name.value == '') {
- alert(nameString);
- frm.severity_name.focus();
- return false;
- }
- if (frm.severity_desc.value == '') {
- alert(descString);
- frm.severity_desc.focus();
- return false;
- }
- return true;
- }
- {/literal}
-</script>
-<b>{$page_title} </b>
-<hr size="1">
-<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)">
-<input type="hidden" name="severity_id" value="{$severity_id}">
-<input type="hidden" name="use_js" value="{$smarty.request.use_js}">
-<table border='0'>
-{if $error}
- <tr>
- <td colspan="2" class="error">{$error}</td>
- </tr>
-{/if}
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="40" name="severity_name" value="{$severity_name|stripslashes|htmlspecialchars}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Description:</td>
- <td><textarea name="severity_desc" cols=20 rows=5 wrap=virtual>{$severity_desc|stripslashes|htmlspecialchars}</textarea></td>
-</tr>
-<tr>
- <td align="right" valign="top">Sort Order:</td>
- <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Row Color:</td>
- <td><input type="text" size="11" maxlength="10" name="severity_color" value="{$severity_color}"></td>
-</tr>
-
-</table>
-<br>
-<input type='submit' name='submit' value='Submit'>
-</form>
+<script type="text/javascript" language="JavaScript">
+ var nameString = '<?php echo translate("Please enter a name"); ?>';
+ var descString = '<?php echo translate("Please enter a description"); ?>';
+
+ function chec...
[truncated message content] |
|
From: Benjamin C. <bc...@us...> - 2003-08-30 21:59:22
|
Update of /cvsroot/phpbt/phpbt/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv20953
Modified Files:
Tag: htmltemplates
configure.php database.php group.php os.php project.php
resolution.php severity.php site.php status.php user.php
Log Message:
Switching to html templates and gettext
Index: configure.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -r1.12 -r1.12.4.1
--- configure.php 18 Nov 2002 14:32:28 -0000 1.12
+++ configure.php 30 Aug 2003 21:59:16 -0000 1.12.4.1
@@ -2,7 +2,7 @@
// configure.php - Interface for configuration options
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -28,8 +28,8 @@
$perm->check('Admin');
-if (isset($_pv['submit'])) {
- foreach ($_pv as $k => $v) {
+if (isset($_POST['submit'])) {
+ foreach ($_POST as $k => $v) {
// Check the jpgraph path to make sure it has a trailing /
if ($k == 'JPGRAPH_PATH' and strlen($v) and substr($v, -1) != '/') $v .= '/';
@@ -43,7 +43,7 @@
}
$t->assign('vars', $db->getAll('select * from '.TBL_CONFIGURATION));
-$t->wrap('admin/configure.html', 'configuration');
+$t->render('configure.html', translate("Configuration"));
?>
Index: database.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/database.php,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -r1.3 -r1.3.6.1
--- database.php 30 Sep 2002 18:02:05 -0000 1.3
+++ database.php 30 Aug 2003 21:59:16 -0000 1.3.6.1
@@ -2,7 +2,7 @@
// database.php - Interface to the database table
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -31,11 +31,9 @@
if ($databaseid) {
// Make sure we are going after a valid record
- $itemexists = $db->getOne('select count(*) from '.TBL_DATABASE.
- " where database_id = $databaseid");
+ $itemexists = $db->getOne('select count(*) from '.TBL_DATABASE." where database_id = $databaseid");
// Are there any bugs tied to this one?
- $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
- " where database_id = $databaseid");
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG." where database_id = $databaseid");
if ($itemexists and !$bugcount) {
$db->query('delete from '.TBL_DATABASE." where database_id = $databaseid");
}
@@ -44,59 +42,53 @@
}
function do_form($databaseid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$database_name = trim($database_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
if ($error) { show_form($databaseid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$databaseid) {
- $db->query("insert into ".TBL_DATABASE.
- " (database_id, database_name, sort_order)
- values (".$db->nextId(TBL_DATABASE).', '.
- $db->quote(stripslashes($database_name)).
- ", $sort_order)");
+ $db->query("insert into ".TBL_DATABASE." (database_id, database_name, sort_order) values (".$db->nextId(TBL_DATABASE).', '.$db->quote(stripslashes($database_name)).", $sort_order)");
} else {
- $db->query("update ".TBL_DATABASE.
- " set database_name = ".$db->quote(stripslashes($database_name)).
- ", sort_order = $sort_order where database_id = $database_id");
+ $db->query("update ".TBL_DATABASE." set database_name = ".$db->quote(stripslashes($database_name)).", sort_order = $sort_order where database_id = $database_id");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?");
}
}
function show_form($databaseid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
if ($databaseid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_DATABASE.
- " where database_id = '$databaseid'"));
+ $t->assign($db->getRow("select * from ".TBL_DATABASE." where database_id = '$databaseid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/database-edit.html', ($databaseid ? 'editdatabase' : 'adddatabase'));
+ $t->render('database-edit.html', translate("Edit Database"),
+ !empty($_GET['use_js']) ? 'wrap-popup.html' : '');
}
function list_items($databaseid = 0, $error = '') {
- global $me, $db, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_DATABASE);
@@ -112,17 +104,18 @@
sorting_headers($me, $headers, $order, $sort);
- $t->wrap('admin/databaselist.html', 'database');
+ $t->render('databaselist.html', translate("Database List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : show_form($_gv['database_id']); break;
- case 'del' : del_item($_gv['database_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['database_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'add' : list_items(); break;
+ case 'edit' : show_form($_GET['database_id']); break;
+ case 'save' : do_form($_POST['database_id']); break;
+ case 'del' : del_item($_GET['database_id']); break;
+ }
} else list_items();
?>
Index: group.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/group.php,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -r1.12 -r1.12.4.1
--- group.php 25 Jun 2003 02:11:10 -0000 1.12
+++ group.php 30 Aug 2003 21:59:16 -0000 1.12.4.1
@@ -2,7 +2,7 @@
// group.php - Administer the user groups
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -40,58 +40,52 @@
}
function do_form($groupid = 0) {
- global $db, $me, $_pv, $STRING, $u, $now, $t;
+ global $db, $me, $u, $now, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$group_name = trim($group_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
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, assignable)"
- ." values (".$db->nextId(TBL_AUTH_GROUP).", ".
- $db->quote(stripslashes($group_name)).", $u, $now, $u, $now, ". ((int)$assignable).')');
+ $db->query("insert into ".TBL_AUTH_GROUP." (group_id, group_name, created_by, created_date, last_modified_by, last_modified_date, assignable) values (".$db->nextId(TBL_AUTH_GROUP).", ".$db->quote(stripslashes($group_name)).", $u, $now, $u, $now, ". ((int)$assignable).')');
} else {
- $db->query("update ".TBL_AUTH_GROUP.
- " set group_name = ".$db->quote(stripslashes($group_name)).
- ", last_modified_by = $u, last_modified_date = $now, assignable = ".($assignable?1:0)." where group_id = '$groupid'");
+ $db->query("update ".TBL_AUTH_GROUP." set group_name = ".$db->quote(stripslashes($group_name)).", last_modified_by = $u, last_modified_date = $now, assignable = ".($assignable?1:0)." where group_id = '$groupid'");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html', '', 'wrap-popup.html');
} else {
header("Location: $me?");
}
}
function show_form($groupid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
if ($groupid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_AUTH_GROUP.
- " where group_id = '$groupid'"));
+ $t->assign($db->getRow("select * from ".TBL_AUTH_GROUP." where group_id = '$groupid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/group-edit.html', ($groupid ? 'editgroup' : 'addgroup'));
+ $t->render('group-edit.html', translate("Edit Group"), (!empty($_GET['use_js']) ? 'wrap-popup.html' : 'wrap.html'));
}
function list_items($groupid = 0, $error = '') {
- global $me, $db, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'group_name';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_AUTH_GROUP);
@@ -107,17 +101,18 @@
sorting_headers($me, $headers, $order, $sort, "page=$page");
- $t->wrap('admin/grouplist.html', 'group');
+ $t->render('grouplist.html', translate("Group List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'edit' : show_form($_gv['group_id']); break;
- case 'del' : del_group($_gv['group_id']); list_items($_gv['group_id']); break;
- case 'purge' : purge_group($_gv['group_id']); list_items($_gv['group_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['group_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'save' : do_form($_POST['group_id']); break;
+ case 'edit' : show_form($_GET['group_id']); break;
+ case 'del' : del_group($_GET['group_id']); list_items($_GET['group_id']); break;
+ case 'purge' : purge_group($_GET['group_id']); list_items($_GET['group_id']); break;
+ }
} else list_items();
?>
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.28
retrieving revision 1.28.6.1
diff -u -r1.28 -r1.28.6.1
--- os.php 26 Aug 2002 18:11:13 -0000 1.28
+++ os.php 30 Aug 2003 21:59:16 -0000 1.28.6.1
@@ -2,7 +2,7 @@
// os.php - Interface to the OS table
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -31,11 +31,9 @@
if ($osid) {
// Make sure we are going after a valid record
- $itemexists = $db->getOne('select count(*) from '.TBL_OS.
- " where os_id = $osid");
+ $itemexists = $db->getOne('select count(*) from '.TBL_OS." where os_id = $osid");
// Are there any bugs tied to this one?
- $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
- " where os_id = $osid");
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG." where os_id = $osid");
if ($itemexists and !$bugcount) {
$db->query('delete from '.TBL_OS." where os_id = $osid");
}
@@ -44,57 +42,55 @@
}
function do_form($osid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$os_name = trim($os_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
if ($error) { show_form($osid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$osid) {
- $db->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) ".
- "values (".$db->nextId(TBL_OS).", ".$db->quote(stripslashes($os_name)).
- ", '$regex', '$sort_order')");
+ $db->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$db->nextId(TBL_OS).", ".$db->quote(stripslashes($os_name)).", '$regex', '$sort_order')");
} else {
- $db->query("update ".TBL_OS." set os_name = ".$db->quote(stripslashes($os_name)).
- ", regex = '$regex', sort_order = '$sort_order' where os_id = '$os_id'");
+ $db->query("update ".TBL_OS." set os_name = ".$db->quote(stripslashes($os_name)).", regex = '$regex', sort_order = '$sort_order' where os_id = '$os_id'");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html', '', 'wrap-popup.html');
} else {
header("Location: $me?");
}
}
function show_form($osid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
if ($osid && !$error) {
$t->assign($db->getRow("select * from ".TBL_OS." where os_id = '$osid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/os-edit.html', ($osid ? 'editos' : 'addos'));
+ $t->render('os-edit.html', translate("Edit Operating System"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function list_items($osid = 0, $error = '') {
- global $db, $me, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $db, $me, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_OS);
@@ -111,16 +107,17 @@
sorting_headers($me, $headers, $order, $sort, "page=$page");
- $t->wrap('admin/oslist.html', 'os');
+ $t->render('oslist.html', translate("Operating System List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'edit' : show_form($_gv['os_id']); break;
- case 'del' : del_item($_gv['os_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['os_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'save' : do_form($_POST['os_id']); break;
+ case 'edit' : show_form($_GET['os_id']); break;
+ case 'del' : del_item($_GET['os_id']); break;
+ }
} else list_items();
?>
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.46
retrieving revision 1.46.4.1
diff -u -r1.46 -r1.46.4.1
--- project.php 7 Jun 2003 02:52:24 -0000 1.46
+++ project.php 30 Aug 2003 21:59:16 -0000 1.46.4.1
@@ -2,7 +2,7 @@
// project.php - Create and update projects
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -38,51 +38,46 @@
}
function save_version($version_id = 0) {
- global $db, $me, $_pv, $STRING, $now, $u, $t, $perm;
+ global $db, $me, $now, $u, $t, $perm;
$perm->check_proj($projectid);
$error = '';
// Validation
- if (!$_pv['version_name'] = trim($_pv['version_name']))
- $error = $STRING['giveversion'];
+ if (!$_POST['version_name'] = trim($_POST['version_name']))
+ $error = translate("Please enter a version");
if ($error) {
- show_version($_pv['version_id'], $error); return;
+ show_version($_POST['version_id'], $error); return;
}
- extract($_pv);
+ extract($_POST);
if (!isset($active)) $active = 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, created_by, created_date) values (".$db->nextId(TBL_VERSION).", $project_id, ".$db->quote(stripslashes($version_name)).", $active, $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 where version_id = '$version_id'");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location:$me?op=edit&id=$project_id");
}
}
function show_version($versionid = 0, $error = '') {
- global $db, $t, $_pv, $STRING, $QUERY, $_gv;
-
- foreach ($_pv as $k => $v) $$k = $v;
+ global $db, $t, $QUERY;
+ extract($_POST);
if ($versionid) {
$t->assign($db->getRow(sprintf($QUERY['admin-show-version'], $versionid)));
} else {
- if (!empty($_gv['project_id'])) $t->assign('project_id', $_gv['project_id']);
- $t->assign($_pv);
+ if (!empty($_GET['project_id']))
+ $t->assign('project_id', $_GET['project_id']);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/version-edit.html', ($versionid ? 'editversion' : 'addversion'));
+ $t->render('version-edit.html', translate("Edit Version"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function del_component($componentid, $projectid) {
@@ -97,139 +92,120 @@
}
function save_component($component_id = 0) {
- global $db, $me, $_pv, $u, $STRING, $now, $t, $perm;
+ global $db, $me, $u, $now, $t, $perm;
$perm->check_proj($projectid);
$error = '';
// Validation
- if (!$_pv['component_name'] = trim($_pv['component_name']))
- $error = $STRING['givename'];
- elseif (!$_pv['component_desc'] = trim($_pv['component_desc']))
- $error = $STRING['givedesc'];
- if ($error) { show_component($_pv['component_id'], $error); return; }
+ if (!$_POST['component_name'] = trim($_POST['component_name'])) {
+ $error = translate("Please enter a name");
+ } elseif (!$_POST['component_desc'] = trim($_POST['component_desc'])) {
+ $error = translate("Please enter a description");
+ }
+ if ($error) {
+ show_component($_POST['component_id'], $error);
+ return;
+ }
- foreach ($_pv as $k => $v) $$k = $v;
+ extract($_POST);
if (!$owner) $owner = 0;
if (!$active) $active = 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, 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)");
} 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, last_modified_by = $u, "."last_modified_date = $now where component_id = $component_id");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?op=edit&id=$project_id");
}
}
function show_component($componentid = 0, $error = '') {
- global $db, $t, $_pv, $STRING, $QUERY, $_gv;
+ global $db, $t, $QUERY;
if ($componentid) {
$t->assign($db->getRow(sprintf($QUERY['admin-show-component'], $componentid)));
} else {
- if (!empty($_gv['project_id'])) $t->assign('project_id', $_gv['project_id']);
- $t->assign($_pv);
+ if (!empty($_GET['project_id'])) $t->assign('project_id', $_GET['project_id']);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/component-edit.html', ($componentid ? 'editcomponent' : 'addcomponent'));
+ $t->render('component-edit.html', translate("Edit Component"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function save_project($projectid = 0) {
- global $db, $me, $u, $STRING, $now, $_pv, $perm;
+ global $db, $me, $u, $now, $perm;
$perm->check_proj($projectid);
$error = '';
- // Validation
- if (!$_pv['project_name'] = htmlspecialchars(trim($_pv['project_name']))) {
- $error = $STRING['givename'];
- } elseif (!$_pv['project_desc'] = htmlspecialchars(trim($_pv['project_desc']))) {
- $error = $STRING['givedesc'];
- } elseif (isset($_pv['usergroup']) and is_array($_pv['usergroup']) and
- in_array('all', $_pv['usergroup']) and count($_pv['usergroup']) > 1) {
- $error = $STRING['project_only_all_groups'];
+ // Validation
+ if (!$_POST['project_name'] = htmlspecialchars(trim($_POST['project_name']))) {
+ $error = translate("Please enter a name");
+ } elseif (!$_POST['project_desc'] = htmlspecialchars(trim($_POST['project_desc']))) {
+ $error = translate("Please enter a description");
+ } elseif (isset($_POST['usergroup']) and is_array($_POST['usergroup']) and
+ in_array('all', $_POST['usergroup']) and count($_POST['usergroup']) > 1) {
+ $error = translate("You cannot choose specific groups when \"All Groups\" is chosen");
+ }
+ if ($error) {
+ show_project($projectid, $error);
+ return;
}
- if ($error) { show_project($projectid, $error); return; }
if (!$projectid) {
- if (!$_pv['version_name'] = htmlspecialchars(trim($_pv['version_name']))) {
- $error['version_error'] = $STRING['giveversion'];
- } elseif (!$_pv['component_name'] = trim($_pv['component_name'])) {
- $error['component_error'] = $STRING['givename'];
- } elseif (!$_pv['component_desc'] = trim($_pv['component_desc'])) {
- $error['component_error'] = $STRING['givedesc'];
+ if (!$_POST['version_name'] = htmlspecialchars(trim($_POST['version_name']))) {
+ $error['version_error'] = translate("Please enter a version");
+ } elseif (!$_POST['component_name'] = trim($_POST['component_name'])) {
+ $error['component_error'] = translate("Please enter a name");
+ } elseif (!$_POST['component_desc'] = trim($_POST['component_desc'])) {
+ $error['component_error'] = translate("Please enter a description");
}
}
- if ($error) { show_project($projectid, $error); return; }
+ if ($error) {
+ show_project($projectid, $error);
+ return;
+ }
- foreach ($_pv as $k => $v) $$k = $v;
- if (!isset($active)) $active = 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)");
- } 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");
- }
- // project -> user relationship
- $old_useradmin = $db->getCol('select user_id from '.TBL_PROJECT_PERM.
- " where project_id = $projectid");
- if (isset($useradmin) and is_array($useradmin) and count($useradmin)) {
- // Compute differences between old and new
- $remove_from = array_diff($old_useradmin, $useradmin);
- $add_to = array_diff($useradmin, $old_useradmin);
-
- if (count($remove_from)) {
- foreach ($remove_from as $user) {
- $db->query('delete from '.TBL_PROJECT_PERM." where project_id = $projectid
- and user_id = $user");
- }
- }
- if (count($add_to)) {
- foreach ($add_to as $user) {
- $db->query("insert into ".TBL_PROJECT_PERM
- ." (project_id, user_id)
- values ('$projectid', $user)");
- }
- }
- } elseif (count($old_useradmin)) {
- // user killed em all
- $db->query('delete from '.TBL_PROJECT_PERM." where project_id = $projectid");
- }
+ extract($_POST);
+ if (!isset($active)) $active = 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)");
+ } 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");
+ }
+ // project -> user relationship
+ $old_useradmin = $db->getCol('select user_id from '.TBL_PROJECT_PERM." where project_id = $projectid");
+ if (isset($useradmin) and is_array($useradmin) and count($useradmin)) {
+ // Compute differences between old and new
+ $remove_from = array_diff($old_useradmin, $useradmin);
+ $add_to = array_diff($useradmin, $old_useradmin);
+
+ if (count($remove_from)) {
+ foreach ($remove_from as $user) {
+ $db->query('delete from '.TBL_PROJECT_PERM." where project_id = $projectid and user_id = $user");
+ }
+ }
+ if (count($add_to)) {
+ foreach ($add_to as $user) {
+ $db->query("insert into ".TBL_PROJECT_PERM." (project_id, user_id) values ('$projectid', $user)");
+ }
+ }
+ } elseif (count($old_useradmin)) {
+ // user killed em all
+ $db->query('delete from '.TBL_PROJECT_PERM." where project_id = $projectid");
+ }
// Handle project -> group relationship
- $old_usergroup = $db->getCol('select group_id from '.TBL_PROJECT_GROUP.
- " where project_id = $projectid");
+ $old_usergroup = $db->getCol('select group_id from '.TBL_PROJECT_GROUP." where project_id = $projectid");
if (isset($usergroup) and is_array($usergroup) and count($usergroup)) {
if (in_array('all', $usergroup)) {
// User selected 'All groups'
@@ -239,111 +215,107 @@
} else {
// Compute differences between old and new
$remove_from = array_diff($old_usergroup, $usergroup);
- $add_to = array_diff($usergroup, $old_usergroup);
+ $add_to = array_diff($usergroup, $old_usergroup);
if (count($remove_from)) {
foreach ($remove_from as $group) {
- $db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid
- and group_id = $group");
+ $db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid and group_id = $group");
}
}
if (count($add_to)) {
- foreach ($add_to as $group) {
- $db->query("insert into ".TBL_PROJECT_GROUP
- ." (project_id, group_id, created_by, created_date)
- values ('$projectid' ,'$group', $u, $now)");
- }
- }
+ foreach ($add_to as $group) {
+ $db->query("insert into ".TBL_PROJECT_GROUP." (project_id, group_id, created_by, created_date) values ('$projectid' ,'$group', $u, $now)");
+ }
+ }
}
} elseif (count($old_usergroup)) {
// User selected nothing, so consider it 'All groups'
$db->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
}
- header("Location: $me?op=edit&id=$projectid");
+ header("Location: $me?op=edit&id=$projectid");
}
function show_project($projectid = 0, $error = null) {
- global $db, $me, $t, $TITLE, $_gv, $_pv, $QUERY, $perm;
+ global $db, $me, $t, $QUERY, $perm;
if (is_array($error)) $t->assign($error);
else $t->assign('error', $error);
- $t->assign('project_groups', $db->getCol('select group_id from '.
- TBL_PROJECT_GROUP." where project_id = $projectid"));
+ $t->assign('project_groups',
+ $db->getCol('select group_id from '.TBL_PROJECT_GROUP." where project_id = $projectid"));
if ($perm->have_perm('Administrator')) {
- $t->assign('project_admins', $db->getCol('select user_id from '.
- TBL_PROJECT_PERM." where project_id = $projectid"));
-
+ $t->assign('project_admins',
+ $db->getCol('select user_id from '.TBL_PROJECT_PERM." where project_id = $projectid"));
+
} else {
- $t->assign('project_admins', $db->getCol('select u.login from '.TBL_AUTH_USER.' as u, '.TBL_PROJECT_PERM.' as p where u.user_id = p.user_id and p.project_id = '.$projectid));
+ $t->assign('project_admins',
+ $db->getCol('select u.login from '.TBL_AUTH_USER.' as u, '.TBL_PROJECT_PERM.' as p where u.user_id = p.user_id and p.project_id = '.$projectid));
}
if ($projectid) {
- $t->assign($db->getRow('select * from '.TBL_PROJECT
- ." where project_id = $projectid"));
- $t->assign(array(
- 'components' => $db->getAll(sprintf($QUERY['admin-list-components'],
- $projectid)),
- 'versions' => $db->getAll(sprintf($QUERY['admin-list-versions'],
- $projectid))
- ));
-
- $t->wrap('admin/project-edit.html', 'editproject');
+ $t->assign($db->getRow('select * from '.TBL_PROJECT." where project_id = $projectid"));
+ $t->assign(array(
+ 'components' => $db->getAll(sprintf($QUERY['admin-list-components'], $projectid)),
+ 'versions' => $db->getAll(sprintf($QUERY['admin-list-versions'], $projectid))
+ ));
+
+ $t->render('project-edit.html', translate("Edit Project"));
} else {
- if (!empty($_pv)) {
- $t->assign($_pv);
- } else {
- $t->assign('active', 1);
- }
- $t->wrap('admin/project-add.html', 'addproject');
+ if (!empty($_POST)) {
+ $t->assign($_POST);
+ } else {
+ $t->assign('active', 1);
+ }
+ $t->render('project-add.html', translate("Edit Project"));
}
}
function list_projects() {
- global $me, $db, $t, $selrange, $_gv, $STRING, $TITLE;
+ global $me, $db, $t, $selrange;
- if (!isset($_gv['order'])) { $order = 'created_date'; $sort = 'asc'; }
- else { $order = $_gv['order']; $sort = $_gv['sort']; }
- $page = isset($_gv['page']) ? $_gv['page'] : 1;
+ if (!isset($_GET['order'])) {
+ $order = 'created_date'; $sort = 'asc';
+ }
+ else {
+ $order = $_GET['order']; $sort = $_GET['sort'];
+ }
+ $page = isset($_GET['page']) ? $_GET['page'] : 1;
- $nr = $db->getOne("select count(*) from ".TBL_PROJECT);
+ $nr = $db->getOne("select count(*) from ".TBL_PROJECT);
- list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort");
+ list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort");
- $t->assign('projects', $db->getAll($db->modifyLimitQuery(
- "select * from ".TBL_PROJECT." order by $order $sort", $llimit, $selrange)));
+ $t->assign('projects',
+ $db->getAll($db->modifyLimitQuery("select * from ".TBL_PROJECT." order by $order $sort", $llimit, $selrange)));
- $headers = array(
- 'projectid' => 'project_id',
- 'name' => 'project_name',
- 'description' => 'project_desc',
- 'active' => 'active',
- 'createdby' => 'created_by',
- 'createddate' => 'created_date'
- );
+ $headers = array(
+ 'projectid' => 'project_id',
+ 'name' => 'project_name',
+ 'description' => 'project_desc',
+ 'active' => 'active',
+ 'createdby' => 'created_by',
+ 'createddate' => 'created_date'
+ );
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
- $t->wrap('admin/projectlist.html', 'project');
+ $t->render('projectlist.html', translate("Project List"));
}
// $perm->check('Admin');
-if (isset($_gv['op'])) {
- switch($_gv['op']) {
- case 'add' : show_project(); break;
- case 'edit' : show_project($_gv['id']); break;
- case 'edit_component' : show_component($_gv['id']); break;
- case 'edit_version' : show_version($_gv['id']); break;
- case 'del_component' : del_component($_gv['id'], $_gv['project_id']); break;
- case 'del_version' : del_version($_gv['id'], $_gv['project_id']); break;
- }
-} elseif (isset($_pv['do'])) {
- switch($_pv['do']) {
- case 'project' : save_project($_pv['id']); break;
- case 'version' : save_version($_pv['version_id']); break;
- case 'component' : save_component($_pv['component_id']); break;
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'add' : show_project(); break;
+ case 'edit' : show_project($_REQUEST['id']); break;
+ case 'edit_component' : show_component($_REQUEST['id']); break;
+ case 'edit_version' : show_version($_REQUEST['id']); break;
+ case 'del_component' : del_component($_REQUEST['id'], $_REQUEST['project_id']); break;
+ case 'del_version' : del_version($_REQUEST['id'], $_REQUEST['project_id']); break;
+ case 'save_project' : save_project($_POST['id']); break;
+ case 'save_version' : save_version($_POST['version_id']); break;
+ case 'save_component' : save_component($_POST['component_id']); break;
}
} else list_projects();
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.30
retrieving revision 1.30.6.1
diff -u -r1.30 -r1.30.6.1
--- resolution.php 26 Aug 2002 18:06:01 -0000 1.30
+++ resolution.php 30 Aug 2003 21:59:16 -0000 1.30.6.1
@@ -2,7 +2,7 @@
// resolution.php - Interface to the Resolution table
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -31,11 +31,9 @@
if ($resolutionid) {
// Make sure we are going after a valid record
- $itemexists = $db->getOne('select count(*) from '.TBL_RESOLUTION.
- " where resolution_id = $resolutionid");
+ $itemexists = $db->getOne('select count(*) from '.TBL_RESOLUTION." where resolution_id = $resolutionid");
// Are there any bugs tied to this one?
- $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
- " where resolution_id = $resolutionid");
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG." where resolution_id = $resolutionid");
if ($itemexists and !$bugcount) {
$db->query('delete from '.TBL_RESOLUTION." where resolution_id = $resolutionid");
}
@@ -44,64 +42,59 @@
}
function do_form($resolutionid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$resolution_name = trim($resolution_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
elseif (!$resolution_desc = trim($resolution_desc))
- $error = $STRING['givedesc'];
+ $error = translate("Please enter a description");
if ($error) { show_form($resolutionid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$resolutionid) {
$db->query("insert into ".TBL_RESOLUTION.
- " (resolution_id, resolution_name, resolution_desc, sort_order)"
- ." values (".$db->nextId(TBL_RESOLUTION).", ".
- $db->quote(stripslashes($resolution_name)).', '.
- $db->quote(stripslashes($resolution_desc)).', '.$sort_order.')');
+ " (resolution_id, resolution_name, resolution_desc, sort_order) values (".$db->nextId(TBL_RESOLUTION).", ".$db->quote(stripslashes($resolution_name)).', '.$db->quote(stripslashes($resolution_desc)).', '.$sort_order.')');
} else {
$db->query("update ".TBL_RESOLUTION.
- ' set resolution_name = '.$db->quote(stripslashes($resolution_name)).
- ', resolution_desc = '.$db->quote(stripslashes($resolution_desc)).
- ", sort_order = $sort_order where resolution_id = $resolutionid");
+ ' set resolution_name = '.$db->quote(stripslashes($resolution_name)).', resolution_desc = '.$db->quote(stripslashes($resolution_desc)).", sort_order = $sort_order where resolution_id = $resolutionid");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?");
}
}
function show_form($resolutionid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
if ($resolutionid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_RESOLUTION.
- " where resolution_id = '$resolutionid'"));
+ $t->assign($db->getRow("select * from ".TBL_RESOLUTION." where resolution_id = '$resolutionid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/resolution-edit.html', ($resolutionid ? 'editresolution' : 'addresolution'));
+ $t->render('resolution-edit.html', translate("Edit Resolution"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function list_items($resolutionid = 0, $error = '') {
- global $me, $db, $t, $STRING, $TITLE, $_gv, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_RESOLUTION);
@@ -118,16 +111,17 @@
sorting_headers($me, $headers, $order, $sort, "page=$page");
- $t->wrap('admin/resolutionlist.html', 'resolution');
+ $t->render('resolutionlist.html', translate("Resolution List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'edit' : show_form($_gv['resolution_id']); break;
- case 'del' : del_item($_gv['resolution_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['resolution_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'edit' : show_form($_GET['resolution_id']); break;
+ case 'del' : del_item($_GET['resolution_id']); break;
+ case 'save' : do_form($_POST['resolution_id']); break;
+ }
} else list_items();
?>
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.25
retrieving revision 1.25.6.1
diff -u -r1.25 -r1.25.6.1
--- severity.php 26 Aug 2002 18:11:13 -0000 1.25
+++ severity.php 30 Aug 2003 21:59:16 -0000 1.25.6.1
@@ -2,7 +2,7 @@
// severity.php - Interface to the severity table
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -31,11 +31,9 @@
if ($severityid) {
// Make sure we are going after a valid record
- $itemexists = $db->getOne('select count(*) from '.TBL_SEVERITY.
- " where severity_id = $severityid");
+ $itemexists = $db->getOne('select count(*) from '.TBL_SEVERITY." where severity_id = $severityid");
// Are there any bugs tied to this one?
- $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
- " where severity_id = $severityid");
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG." where severity_id = $severityid");
if ($itemexists and !$bugcount) {
$db->query('delete from '.TBL_SEVERITY." where severity_id = $severityid");
}
@@ -44,65 +42,56 @@
}
function do_form($severityid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$severity_name = trim($severity_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
elseif (!$severity_desc = trim($severity_desc))
- $error = $STRING['givedesc'];
+ $error = translate("Please enter a description");
if ($error) { show_form($severityid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$severityid) {
- $db->query("insert into ".TBL_SEVERITY.
- " (severity_id, severity_name, severity_desc, sort_order, severity_color)
- values (".$db->nextId(TBL_SEVERITY).', '.
- $db->quote(stripslashes($severity_name)).', '.
- $db->quote(stripslashes($severity_desc)).", $sort_order, ".
- $db->quote(stripslashes($severity_color)).')');
+ $db->query("insert into ".TBL_SEVERITY." (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$db->nextId(TBL_SEVERITY).', '.$db->quote(stripslashes($severity_name)).', '.$db->quote(stripslashes($severity_desc)).", $sort_order, ".$db->quote(stripslashes($severity_color)).')');
} else {
- $db->query("update ".TBL_SEVERITY.
- " set severity_name = ".$db->quote(stripslashes($severity_name)).
- ', severity_desc = '.$db->quote(stripslashes($severity_desc)).
- ", sort_order = $sort_order, severity_color = ".
- $db->quote(stripslashes($severity_color))." where severity_id = $severity_id");
+ $db->query("update ".TBL_SEVERITY." set severity_name = ".$db->quote(stripslashes($severity_name)).', severity_desc = '.$db->quote(stripslashes($severity_desc)).", sort_order = $sort_order, severity_color = ".$db->quote(stripslashes($severity_color))." where severity_id = $severity_id");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?");
}
}
function show_form($severityid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
if ($severityid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_SEVERITY.
- " where severity_id = '$severityid'"));
+ $t->assign($db->getRow("select * from ".TBL_SEVERITY." where severity_id = '$severityid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/severity-edit.html', ($severityid ? 'editseverity' : 'addseverity'));
+ $t->render('severity-edit.html', translate("Edit Severity"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function list_items($severityid = 0, $error = '') {
- global $me, $db, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_SEVERITY);
@@ -121,17 +110,18 @@
sorting_headers($me, $headers, $order, $sort);
- $t->wrap('admin/severitylist.html', 'severity');
+ $t->render('severitylist.html', translate("Severity List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : show_form($_gv['severity_id']); break;
- case 'del' : del_item($_gv['severity_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['severity_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'add' : list_items(); break;
+ case 'edit' : show_form($_GET['severity_id']); break;
+ case 'del' : del_item($_GET['severity_id']); break;
+ case 'save' : do_form($_POST['severity_id']);
+ }
} else list_items();
?>
Index: site.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/site.php,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -r1.2 -r1.2.6.1
--- site.php 26 Aug 2002 18:11:13 -0000 1.2
+++ site.php 30 Aug 2003 21:59:16 -0000 1.2.6.1
@@ -44,57 +44,53 @@
}
function do_form($siteid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$site_name = trim($site_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
if ($error) { show_form($siteid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$siteid) {
- $db->query('insert into '.TBL_SITE.' (site_id, site_name, sort_order) '.
- 'values ('.$db->nextId(TBL_SITE).', '.$db->quote(stripslashes($site_name)).
- ', '.$sort_order.')');
+ $db->query('insert into '.TBL_SITE.' (site_id, site_name, sort_order) values ('.$db->nextId(TBL_SITE).', '.$db->quote(stripslashes($site_name)).', '.$sort_order.')');
} else {
- $db->query('update '.TBL_SITE.' set site_name = '.
- $db->quote(stripslashes($site_name)).', sort_order = '.
- $sort_order.' where site_id = '.$site_id);
+ $db->query('update '.TBL_SITE.' set site_name = '.$db->quote(stripslashes($site_name)).', sort_order = '.$sort_order.' where site_id = '.$site_id);
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?");
}
}
function show_form($siteid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
if ($siteid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_SITE.
- " where site_id = '$siteid'"));
+ $t->assign($db->getRow("select * from ".TBL_SITE." where site_id = '$siteid'"));
} else {
- $t->assign($_pv);
+ $t->assign($_POST);
}
$t->assign('error', $error);
- $t->wrap('admin/site-edit.html', ($siteid ? 'editsite' : 'addsite'));
+ $t->render('site-edit.html', translate("Edit Site"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function list_items($siteid = 0, $error = '') {
- global $me, $db, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_SITE);
@@ -110,25 +106,18 @@
sorting_headers($me, $headers, $order, $sort);
- $t->wrap('admin/sitelist.html', 'site');
+ $t->render('sitelist.html', translate("Site List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) {
- switch($_gv['op']) {
- case 'add':
- list_items();
- break;
- case 'edit':
- show_form($_gv['site_id']);
- break;
- case 'del':
- del_item($_gv['site_id']);
- break;
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'add' : list_items(); break;
+ case 'edit' : show_form($_REQUEST['site_id']); break;
+ case 'del' : del_item($_REQUEST['site_id']); break;
+ case 'save' : do_form($_POST['site_id']); break;
}
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['site_id']);
} else {
list_items();
}
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- status.php 24 Jul 2003 04:47:13 -0000 1.30
+++ status.php 30 Aug 2003 21:59:16 -0000 1.30.2.1
@@ -2,7 +2,7 @@
// status.php - Interface to the Status table
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -31,11 +31,9 @@
if ($statusid) {
// Make sure we are going after a valid record
- $itemexists = $db->getOne('select count(*) from '.TBL_STATUS.
- " where status_id = $statusid");
+ $itemexists = $db->getOne('select count(*) from '.TBL_STATUS." where status_id = $statusid");
// Are there any bugs tied to this one?
- $bugcount = $db->getOne('select count(*) from '.TBL_BUG.
- " where status_id = $statusid");
+ $bugcount = $db->getOne('select count(*) from '.TBL_BUG." where status_id = $statusid");
if ($itemexists and !$bugcount) {
$db->query('delete from '.TBL_STATUS." where status_id = $statusid");
}
@@ -44,67 +42,58 @@
}
function do_form($statusid = 0) {
- global $db, $me, $_pv, $STRING, $t;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
$error = '';
// Validation
if (!$status_name = trim($status_name))
- $error = $STRING['givename'];
+ $error = translate("Please enter a name");
elseif (!$status_desc = trim($status_desc))
- $error = $STRING['givedesc'];
+ $error = translate("Please enter a description");
if ($error) { show_form($statusid, $error); return; }
if (empty($sort_order)) $sort_order = 0;
if (!$statusid) {
- $db->query("insert into ".TBL_STATUS.
- " (status_id, status_name, status_desc, bug_open, sort_order) values (".
- $db->nextId(TBL_STATUS).', '.
- $db->quote(stripslashes($status_name)).', '.
- $db->quote(stripslashes($status_desc)).', '.
- (int)$bug_open.", '$sort_order')");
+ $db->query("insert into ".TBL_STATUS." (status_id, status_name, status_desc, bug_open, sort_order) values (".$db->nextId(TBL_STATUS).', '.$db->quote(stripslashes($status_name)).', '.$db->quote(stripslashes($status_desc)).', '.(int)$bug_open.", '$sort_order')");
} else {
- $db->query("update ".TBL_STATUS.
- " set status_name = ".$db->quote(stripslashes($status_name)).
- ', status_desc = '.$db->quote(stripslashes($status_desc)).
- ', bug_open = '.(int)$bug_open.
- ", sort_order = $sort_order where status_id = $statusid");
+ $db->query("update ".TBL_STATUS." set status_name = ".$db->quote(stripslashes($status_name)).', status_desc = '.$db->quote(stripslashes($status_desc)).', bug_open = '.(int)$bug_open.", sort_order = $sort_order where status_id = $statusid");
}
if ($use_js) {
- $t->display('admin/edit-submit.html');
+ $t->render('edit-submit.html');
} else {
header("Location: $me?");
}
}
function show_form($statusid = 0, $error = '') {
- global $db, $me, $t, $_pv, $STRING;
+ global $db, $me, $t;
- extract($_pv);
+ extract($_POST);
if ($statusid && !$error) {
- $t->assign($db->getRow("select * from ".TBL_STATUS.
- " where status_id = '$statusid'"));
+ $t->assign($db->getRow("select * from ".TBL_STATUS." where status_id = '$statusid'"));
} else {
- $t->assign($_pv);
- $t->assign(array('bug_open' => 1)); // new bugs def. open :)
+ $t->assign($_POST);
+ if (empty($_POST)) $t->assign('bug_open', 1); // new bugs def. open :)
}
$t->assign('error', $error);
- $t->wrap('admin/status-edit.html', ($statusid ? 'editstatus' : 'addstatus'));
+ $t->render('status-edit.html', translate("Edit Status"),
+ !empty($_REQUEST['use_js']) ? 'wrap-popup.html' : 'wrap.html');
}
function list_items($statusid = 0, $error = '') {
- global $me, $db, $t, $_gv, $STRING, $TITLE, $QUERY;
+ global $me, $db, $t, $QUERY;
- if (empty($_gv['order'])) {
+ if (empty($_GET['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
- $order = $_gv['order'];
- $sort = $_gv['sort'];
+ $order = $_GET['order'];
+ $sort = $_GET['sort'];
}
- $page = isset($_gv['page']) ? $_gv['page'] : 0;
+ $page = isset($_GET['page']) ? $_GET['page'] : 0;
$nr = $db->getOne("select count(*) from ".TBL_STATUS);
@@ -121,17 +110,18 @@
sorting_headers($me, $headers, $order, $sort);
- $t->wrap('admin/statuslist.html', 'status');
+ $t->render('statuslist.html', translate("Status List"));
}
$perm->check('Admin');
-if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : show_form($_gv['status_id']); break;
- case 'del' : del_item($_gv['status_id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['status_id']);
+if (isset($_REQUEST['op'])) {
+ switch($_REQUEST['op']) {
+ case 'add' : list_items(); break;
+ case 'edit' : show_form($_REQUEST['status_id']); break;
+ case 'del' : del_item($_REQUEST['status_id']); break;
+ case 'save' : do_form($_POST['status_id']); break;
+ }
} else list_items();
?>
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.49
retrieving revision 1.49.6.1
diff -u -r1.49 -r1.49.6.1
--- user.php 18 May 2002 03:00:00 -0000 1.49
+++ user.php 30 Aug 2003 21:59:16 -0000 1.49.6.1
@@ -2,7 +2,7 @@
// user.php - Create and update users
// ------------------------------------------------------------------------
-// Copyright (c) 2001, 2002 The phpBugTracker Group
+// Copyright (c) 2001 - 2003 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
@@ -27,82 +27,62 @@
include 'include.php';
function do_form($userid = 0) {
- global $db, $me, $_pv, $STRING, $now, $u, $QUERY, $t;
+ global $db, $me, $now, $u, $QUERY, $t;
$error = '';
// Validation
- if (!EMAIL_IS_LOGIN && !$_pv['login'] = trim($_pv['login'])) {
- $error = $STRING['givelogin'];
- } elseif (!bt_valid_email($_pv['email'])) {
- $error = $STRING['giveemail'];
- } elseif (!$_pv['password'] = trim($_pv['password'])) {
- $error = $STRING['givepassword'];
+ if (!EMAIL_IS_LOGIN && !$_POST['login'] = trim($_POST['login'])) {
+ $error = translate("Please enter a login");
+ } elseif (!bt_valid_email($_POST['email'])) {
+ $error = translate("Please enter an email");
+ } elseif (!$_POST['password'] = trim($_POST['password'])) {
+ $error = translate("Please enter a password");
}
if ($error) {
show_form($userid, $error);
return;
}
- if (!isset($_pv['active'])) $_pv['active'] = 0;
- if (!isset($_pv['fe_notice'])) $_pv['fe_notice'] = 0;
+ if (!isset($_POST['active'])) $_POST['active'] = 0;
+ if (!isset($_POST['fe_notice'])) $_POST['fe_notice'] = 0;
if (EMAIL_IS_LOGIN) {
- $login = $_pv['email'];
+ $login = $_POST['email'];
} else {
- $login = $_pv['login'];
+ $login = $_POST['login'];
}
if (!$userid) {
- if (ENCRYPT_PASS) $mpassword = $db->quote(md5($_pv['password']));
- else $mpassword = $db->quote(stripslashes($_pv['password']));
+ if (ENCRYPT_PASS) $mpassword = $db->quote(md5($_POST['password']));
+ else $mpassword = $db->quote(stripslashes($_POST['password']));
$new_user_id = $db->nextId(TBL_AUTH_USER);
- $db->query('insert into '.TBL_AUTH_USER
- ." (user_id, first_name, last_name, login, email, password, active,
- created_by, created_date, last_modified_by, last_modified_date)
- values (".join(', ', array($new_user_id,
- $db->quote(stripslashes($_pv['first_name'])),
- $db->quote(stripslashes($_pv['last_name'])),
- $db->quote(stripslashes($login)), $db->quote($_pv['email']), $mpassword,
- $_pv['active'], $u, $now, $u, $now)).')');
+ $db->query('insert into '.TBL_AUTH_USER." (user_id, first_name, last_name, login, email, password, active,created_by, created_date, last_modified_by, last_modified_date) values (".join(', ', array($new_user_id, $db->quote(stripslashes($_POST['first_name'])), $db->quote(stripslashes($_POST['last_name'])), $db->quote(stripslashes($login)), $db->quote($_POST['email']), $mpassword, $_POST['active'], $u, $now, $u, $now)).')');
// Add to the selected groups
- if (isset($_pv['fusergroup']) and is_array($_pv['fusergroup']) and
- $_pv['fusergroup'][0]) {
- foreach ($_pv['fusergroup'] as $group) {
- $db->query("insert into ".TBL_USER_GROUP
- ." (user_id, group_id, created_by, created_date)
- values ('$new_user_id' ,'$group', $u, $now)");
+ if (isset($_POST['fusergroup']) and is_array($_POST['fusergroup']) and
+ $_POST['fusergroup'][0]) {
+ foreach ($_POST['fusergroup'] as $group) {
+ $db->query("insert into ".TBL_USER_GROUP." (user_id, group_id, created_by, created_date) values ('$new_user_id' ,'$group', $u, $now)");
}
}
// Add to prefs
- $db->query("INSERT INTO ".TBL_USER_PREF." (user_id, email_notices)
- VALUES ($new_user_id, '{$_pv['fe_notice']}')");
+ $db->query("INSERT INTO ".TBL_USER_PREF." (user_id, email_notices) VALUES ($new_user_id, '{$_POST['fe_notice']}')");
// And add to the user group
- $db->query("insert into ".TBL_USER_GROUP.
- " (user_id, group_id, created_by, created_date)
- select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP.
- " where group_name = 'User'");
+ $db->query("insert into ".TBL_USER_GROUP." (user_id, group_id, created_by, created_date) select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP." where group_name = 'User'");
} else {
if (ENCRYPT_PASS) {
- $oldpass = $db->getOne("select password from ".TBL_AUTH_USER
- ." where user_id = $userid");
- if ($oldpass != $_pv['password']) {
- $pquery = "password = '".md5($_pv['password'])."',";
+ $oldpass = $db->getOne("select password from ".TBL_AUTH_USER." where user_id = $userid");
+ if ($oldpass != $_POST['password']) {
+ $pquery = "password = '".md5($_POST['password'])."',";
} else {
$pquery = '';
}
} else {
- $pquery = "password = ".$db->quote(stripslashes($_pv['password'])).",";
+ $pquery = "password = ".$db->quote(stripslashes($_POST['password'])).",";
}
- $db->query("update ".TBL_AUTH_USER.
- " set first_name = ".$db->quote(stripslashes($_pv['first_name'])).
- ", last_name = ".$db->quote(stripslashes($_pv['last_name'])).
- ", login = ".$db->quote(stripslashes($login)).
- ", email = '{$_pv['email']}', $pquery active = {$_pv['active']} ".
- "where user_id = $userid");
+ $db->query("update ".TBL_AUTH_USER." set first_name = ".$db->quote(stripslashes($_POST['first_name'])).", last_name = ".$db->quote(stripslashes($_POST['last_name'])).", login = ".$db->quote(stripslashes($login)).", email = '{$_POST['email']}', $pquery active = {$_POST['active']} where user_id = $userid");
// Update preferences
- $db->query("update ".TBL_USER_PREF.
- " set email_notices = {$_pv['fe_notice']} where user_id = $userid");
+ $db->query("update ".TBL_USER_PREF." set email_notices = {$_POST['fe_notice']} where user_id = $userid");
// Update group memberships
// Get user's groups (without dropping the user group)
@@ -112,82 +92,79 @@
if (!isset($user_groups) or !is_array($user_groups)) {
$user_groups = array();
}
- if (!isset($_pv['fusergroup']) or !is_array($_pv['fusergroup']) or
- !$_pv['fusergroup'][0]) {
- $_pv['fusergroup'] = array();
+ if (!isset($_POST['fusergroup']) or !is_array($_POST['fusergroup']) or
+ !$_POST['fusergroup'][0]) {
+ $_POST['fusergroup'] = array();
}
- $remove_from = array_diff($user_groups, $_pv['fusergroup']);
- $add_to = array_diff($_pv['fusergroup'], $user_groups);
+ $remove_from = array_diff($user_groups, $_POST['fusergroup']);
+ $add...
[truncated message content] |
|
From: Benjamin C. <bc...@us...> - 2003-08-10 15:24:35
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1:/tmp/cvs-serv22833 Removed Files: login.html Log Message: --- login.html DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2003-08-10 15:18:39
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1:/tmp/cvs-serv21957 Removed Files: header.html header-popup.html Log Message: --- header.html DELETED --- --- header-popup.html DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2003-08-10 14:53:44
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1:/tmp/cvs-serv18783 Removed Files: footer.html footer-popup.html Log Message: --- footer.html DELETED --- --- footer-popup.html DELETED --- |
|
From: Ken T. <ke...@to...> - 2003-07-27 21:45:38
|
Ken Tossell wrote: > would someone in the know please fix the pgsql schema? :) and what's with sf mail? why do i ask? it's not like this will reach anyone anytime soon... > > thanks, > ken > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Ken T. <ke...@us...> - 2003-07-26 02:28:21
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv22010
Modified Files:
Tag: phpbt-1_0
config-dist.php config.php upgrade.php
Log Message:
DB_VERSION => CUR_DB_VERSION
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.25.2.1
retrieving revision 1.25.2.2
diff -u -r1.25.2.1 -r1.25.2.2
--- config-dist.php 25 Jul 2003 02:50:07 -0000 1.25.2.1
+++ config-dist.php 25 Jul 2003 19:26:33 -0000 1.25.2.2
@@ -34,7 +34,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -u -r1.37.2.1 -r1.37.2.2
--- config.php 25 Jul 2003 02:50:07 -0000 1.37.2.1
+++ config.php 25 Jul 2003 19:26:33 -0000 1.37.2.2
@@ -37,7 +37,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', ''); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
define ('TBL_DB_SEQUENCE', TBL_PREFIX.'db_sequence');
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.34.2.1
retrieving revision 1.34.2.2
diff -u -r1.34.2.1 -r1.34.2.2
--- upgrade.php 25 Jul 2003 02:50:08 -0000 1.34.2.1
+++ upgrade.php 25 Jul 2003 19:26:33 -0000 1.34.2.2
@@ -30,7 +30,7 @@
global $db;
$thisvers = $db->getOne('select varvalue from '.TBL_CONFIGURATION.' where varname = \'DB_VERSION\'');
- if ($thisvers == DB_VERSION) $upgraded = 1;
+ if ($thisvers == CUR_DB_VERSION) $upgraded = 1;
if (!$upgraded or DB::isError($thisvers)) {
if (!@is_writeable('c_templates')) {
include('templates/default/base/templatesperm.html');
@@ -68,7 +68,12 @@
$db->query("UPDATE ".TBL_AUTH_GROUP." SET assignable = 1 WHERE group_id = 3");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool');");
/* add db-version attribute */
- $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
+ $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".CUR_DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
+ }
+
+ if ($thisvers < 4) {
+ $db->query('DELETE FROM '.TBL_CONFIGURATION.' WHERE varname = \'BUG_CLOSED\'');
+ echo 'You must set your Statuses to either open or closed. Default settings should be modified so that "resolved", "closed", and "verified" are shown as being closed, and all other statuses are set to open.';
}
if ($thisvers < 4) {
@@ -77,7 +82,7 @@
}
/* update to current DB_VERSION */
- $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".DB_VERSION."' WHERE varname = 'DB_VERSION'");
+ $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".CUR_DB_VERSION."' WHERE varname = 'DB_VERSION'");
}
include 'templates/default/upgrade-finished.html';
|
|
From: Ken T. <ke...@us...> - 2003-07-26 01:39:23
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv21031
Modified Files:
config-dist.php config.php upgrade.php
Log Message:
changed DB_VERSION to CUR_DB_VERSION to avoid naming conflicts
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- config-dist.php 24 Jul 2003 04:47:13 -0000 1.26
+++ config-dist.php 25 Jul 2003 19:22:26 -0000 1.27
@@ -34,7 +34,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- config.php 24 Jul 2003 04:47:13 -0000 1.38
+++ config.php 25 Jul 2003 19:22:26 -0000 1.39
@@ -37,7 +37,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', ''); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
define ('TBL_DB_SEQUENCE', TBL_PREFIX.'db_sequence');
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- upgrade.php 24 Jul 2003 04:47:13 -0000 1.35
+++ upgrade.php 25 Jul 2003 19:22:26 -0000 1.36
@@ -30,7 +30,7 @@
global $db;
$thisvers = $db->getOne('select varvalue from '.TBL_CONFIGURATION.' where varname = \'DB_VERSION\'');
- if ($thisvers == DB_VERSION) $upgraded = 1;
+ if ($thisvers == CUR_DB_VERSION) $upgraded = 1;
if (!$upgraded or DB::isError($thisvers)) {
if (!@is_writeable('c_templates')) {
include('templates/default/base/templatesperm.html');
@@ -68,7 +68,7 @@
$db->query("UPDATE ".TBL_AUTH_GROUP." SET assignable = 1 WHERE group_id = 3");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool');");
/* add db-version attribute */
- $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
+ $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".CUR_DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
}
if ($thisvers < 4) {
@@ -77,7 +77,7 @@
}
/* update to current DB_VERSION */
- $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".DB_VERSION."' WHERE varname = 'DB_VERSION'");
+ $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".CUR_DB_VERSION."' WHERE varname = 'DB_VERSION'");
}
include 'templates/default/upgrade-finished.html';
|
|
From: Ken T. <ke...@to...> - 2003-07-25 02:53:01
|
would someone in the know please fix the pgsql schema? :) thanks, ken |
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/templates/default/admin
Modified Files:
Tag: phpbt-1_0
status-edit.html statuslist.html
Log Message:
transfer
Index: status-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/status-edit.html,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- status-edit.html 5 Nov 2002 20:58:19 -0000 1.5
+++ status-edit.html 25 Jul 2003 02:50:08 -0000 1.5.2.1
@@ -41,7 +41,10 @@
<td align="right" valign="top">Sort Order:</td>
<td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td>
</tr>
-
+<tr>
+ <td align="right" valign="top">Bugs Are:</td>
+ <td><input type="radio" name="bug_open" value="1"{if $bug_open neq 0} checked="checked"{/if}/>Open <input type="radio" name="bug_open" value="0"{if $bug_open eq 0} checked="checked"{/if}/>Closed</td>
+</tr>
</table>
<br>
<input type='submit' name='submit' value='Submit'>
Index: statuslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/statuslist.html,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- statuslist.html 21 Jun 2003 13:42:57 -0000 1.10
+++ statuslist.html 25 Jul 2003 02:50:08 -0000 1.10.2.1
@@ -19,6 +19,7 @@
<th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th>
<th class="{$headers.description.class}"><a href="{$headers.description.url}">Description</a></th>
<th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">Sort Order</a></th>
+ <th>Bugs are</th>
<th>Delete</th>
</tr>
{section name=status loop=$statuses}
@@ -26,6 +27,13 @@
<td><a href="{$smarty.server.PHP_SELF}?op=edit&status_id={$statuses[status].status_id}" onClick="popupStatus({$statuses[status].status_id}); return false;">{$statuses[status].status_name|stripslashes}</a></td>
<td> {$statuses[status].status_desc}</td>
<td align="center">{$statuses[status].sort_order}</td>
+ <td align="center">
+ {if $statuses[status].bug_open eq 1}
+ Open
+ {else}
+ Closed
+ {/if}
+ </td>
<td align="center">
{if not $statuses[status].bug_count and $statuses[status].status_id neq BUG_UNCONFIRMED}
<a href="{$smarty.server.PHP_SELF}?op=del&status_id={$statuses[status].status_id}" onClick="return confirm('Are you sure you want to delete this status?')">Delete</a>
|
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/admin
Modified Files:
Tag: phpbt-1_0
status.php
Log Message:
transfer
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -u -r1.29 -r1.29.4.1
--- status.php 26 Aug 2002 18:11:13 -0000 1.29
+++ status.php 25 Jul 2003 02:50:08 -0000 1.29.4.1
@@ -58,14 +58,16 @@
if (empty($sort_order)) $sort_order = 0;
if (!$statusid) {
$db->query("insert into ".TBL_STATUS.
- " (status_id, status_name, status_desc, sort_order) values (".
+ " (status_id, status_name, status_desc, bug_open, sort_order) values (".
$db->nextId(TBL_STATUS).', '.
$db->quote(stripslashes($status_name)).', '.
- $db->quote(stripslashes($status_desc)).", '$sort_order')");
+ $db->quote(stripslashes($status_desc)).', '.
+ (int)$bug_open.", '$sort_order')");
} else {
$db->query("update ".TBL_STATUS.
" set status_name = ".$db->quote(stripslashes($status_name)).
', status_desc = '.$db->quote(stripslashes($status_desc)).
+ ', bug_open = '.(int)$bug_open.
", sort_order = $sort_order where status_id = $statusid");
}
if ($use_js) {
@@ -84,6 +86,7 @@
" where status_id = '$statusid'"));
} else {
$t->assign($_pv);
+ $t->assign(array('bug_open' => 1)); // new bugs def. open :)
}
$t->assign('error', $error);
$t->wrap('admin/status-edit.html', ($statusid ? 'editstatus' : 'addstatus'));
|
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/schemas
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/schemas
Modified Files:
Tag: phpbt-1_0
mysql.in
Log Message:
transfer
Index: mysql.in
===================================================================
RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v
retrieving revision 1.41
retrieving revision 1.41.2.1
diff -u -r1.41 -r1.41.2.1
--- mysql.in 4 Jun 2003 18:47:20 -0000 1.41
+++ mysql.in 25 Jul 2003 02:50:08 -0000 1.41.2.1
@@ -221,6 +221,7 @@
status_name varchar(30) NOT NULL default '',
status_desc text NOT NULL,
sort_order tinyint(3) unsigned NOT NULL default '0',
+ bug_open tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (status_id)
) TYPE=MyISAM;
@@ -290,7 +291,7 @@
# Start off with three user levels...
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (1, 'Admin', 1);
INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (2, 'User', 1);
-INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked) VALUES (3, 'Developer', 1);
+INSERT INTO TBL_AUTH_GROUP (group_id, group_name, locked, assignable) VALUES (3, 'Developer', 1, 1);
create table TBL_AUTH_GROUP_seq (id int unsigned auto_increment not null primary key);
insert into TBL_AUTH_GROUP_seq values (3);
@@ -338,8 +339,6 @@
INSERT INTO TBL_CONFIGURATION VALUES ('BUG_PROMOTED','2','The status to assign a bug when it is promoted (if enabled).','multi');
INSERT INTO TBL_CONFIGURATION VALUES ('BUG_ASSIGNED','3','The status to assign a bug when it is assigned.','multi');
INSERT INTO TBL_CONFIGURATION VALUES ('BUG_REOPENED','4','The status to assign a bug when it is reopened.','multi');
-INSERT INTO TBL_CONFIGURATION VALUES ('BUG_CLOSED','7','The status to assign a bug when it is closed.','multi');
-INSERT INTO TBL_CONFIGURATION VALUES ('GROUP_ASSIGN_TO', '3', 'The group to whom bugs can be assigned', 'multi');
INSERT INTO TBL_CONFIGURATION VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool');
INSERT INTO TBL_OS VALUES (1,'All',1,'');
@@ -395,13 +394,13 @@
create table TBL_SEVERITY_seq (id int unsigned auto_increment not null primary key);
insert into TBL_SEVERITY_seq values (7);
-INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1);
-INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2);
-INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3);
-INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4);
-INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5);
-INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
-INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7);
+INSERT INTO TBL_STATUS VALUES (1,'Unconfirmed','Reported but not confirmed',1, 1);
+INSERT INTO TBL_STATUS VALUES (2,'New','A new bug',2,1);
+INSERT INTO TBL_STATUS VALUES (3,'Assigned','Assigned to a developer',3,1);
+INSERT INTO TBL_STATUS VALUES (4,'Reopened','Closed but opened again for further inspection',4,1);
+INSERT INTO TBL_STATUS VALUES (5,'Resolved','Set by engineer with a resolution',5,0);
+INSERT INTO TBL_STATUS VALUES (6,'Verified','The resolution is confirmed by the reporter',6,0);
+INSERT INTO TBL_STATUS VALUES (7,'Closed','The bug is officially squashed (QA)',7,0);
create table TBL_STATUS_seq (id int unsigned auto_increment not null primary key);
insert into TBL_STATUS_seq values (7);
|
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/languages
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/languages
Modified Files:
Tag: phpbt-1_0
en.php
Log Message:
transfer
Index: en.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/languages/en.php,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- en.php 4 Jun 2003 18:47:20 -0000 1.38
+++ en.php 25 Jul 2003 02:50:08 -0000 1.38.2.1
@@ -103,7 +103,7 @@
'Database' => 'Database',
'ReportedOnSite' => 'Reported on Site',
'Summary' => 'Summary',
- 'DescriptionEntry' => 'A description entry',
+ 'DescriptionEntry' => 'Description / Comment',
'SortBy' => 'Sort By',
'SortBy_BugNumber' => 'Bug Number',
'SortBy_Severity' => 'Severity',
|
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/inc/db
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/inc/db
Modified Files:
Tag: phpbt-1_0
mysql.php
Log Message:
transfer
Index: mysql.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- mysql.php 21 Jun 2003 13:36:30 -0000 1.17
+++ mysql.php 25 Jul 2003 02:50:08 -0000 1.17.2.1
@@ -40,7 +40,7 @@
TBL_BUG.' using (site_id) group by s.site_id, site_name, sort_order '.
'order by %s %s',
'admin-list-statuses' => 'select s.status_id, status_name, status_desc, '.
- 'sort_order, count(bug_id) as bug_count '.
+ 'sort_order, bug_open, count(bug_id) as bug_count '.
'from '.TBL_STATUS.' s left join '. TBL_BUG.' using (status_id) '.
'group by s.status_id, status_name, status_desc, sort_order '.
'order by %s %s',
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv24962
Modified Files:
Tag: phpbt-1_0
CHANGELOG bug.php config-dist.php config.php index.php
install.php query.php upgrade.php
Log Message:
transfer
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v
retrieving revision 1.66
retrieving revision 1.66.2.1
diff -u -r1.66 -r1.66.2.1
--- CHANGELOG 9 Apr 2003 12:41:30 -0000 1.66
+++ CHANGELOG 25 Jul 2003 02:50:07 -0000 1.66.2.1
@@ -11,6 +11,7 @@
: Added ability to disable all email sent from the system.
: Fixed a bug with not being able to change the name of the 'Developer' group.
: Added tracking of changes in priority to the bug history.
+: You can now search on "additional comments" and "description".
-- 0.9.1 -- 4 Jan 2003
: Fixed bugs with PostgreSQL
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.133
retrieving revision 1.133.2.1
diff -u -r1.133 -r1.133.2.1
--- bug.php 6 Jul 2003 22:57:33 -0000 1.133
+++ bug.php 25 Jul 2003 02:50:07 -0000 1.133.2.1
@@ -437,7 +437,7 @@
$os_id = $os_id ? $os_id : 0;
$severity_id = $severity_id ? $severity_id : 0;
- if ($status_id == BUG_CLOSED) {
+ if (is_closed($status_id)) {
$closed_query = ", close_date = $now";
} else {
$closed_query = '';
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- config-dist.php 10 Jun 2003 16:18:59 -0000 1.25
+++ config-dist.php 25 Jul 2003 02:50:07 -0000 1.25.2.1
@@ -34,7 +34,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 3); // the version of the database
+define ('DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.37
retrieving revision 1.37.2.1
diff -u -r1.37 -r1.37.2.1
--- config.php 4 Jun 2003 18:47:19 -0000 1.37
+++ config.php 25 Jul 2003 02:50:07 -0000 1.37.2.1
@@ -37,7 +37,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 3); // the version of the database
+define ('DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', ''); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
define ('TBL_DB_SEQUENCE', TBL_PREFIX.'db_sequence');
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- index.php 18 Feb 2003 12:50:57 -0000 1.38
+++ index.php 25 Jul 2003 02:50:07 -0000 1.38.2.1
@@ -171,7 +171,7 @@
$db->getAll($db->modifyLimitQuery('select b.bug_id, title, project_name from '.TBL_BUG.' b, '.
TBL_PROJECT.' p'.
" where b.project_id not in ($restricted_projects)".
- ' and status_id = '.BUG_CLOSED.
+ ' and '.in_closed('status_id').
' and b.project_id = p.project_id order by close_date desc', 0, 5)));
if ($u != 'nobody') {
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- install.php 11 Jun 2003 12:05:17 -0000 1.38
+++ install.php 25 Jul 2003 02:50:07 -0000 1.38.2.1
@@ -193,6 +193,12 @@
$db->query(stripslashes($do_query));
$do_query = '';
}
+ /*!! BAD! Must figure out how to get db_version from config-dist.php... */
+ $query = preg_replace(array_keys($tables), array_values($tables), 'INSERT INTO '.TBL_CONFIGURATION.' (varname,varvalue,description,vartype) VALUES (\'DB_VERSION\', './*!!!*/4/*!!!*/.', \'Database Version <b>Warning:</b> Changing this might make things go horribly wrong, so don\\\'t change it.\', \'mixed\')');
+ $res = $db->query($query);
+ if (PEAR::isError($res)) {
+ echo 'DB_VERSION not set!';
+ }
}
function check_vars() {
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.96.2.1
retrieving revision 1.96.2.2
diff -u -r1.96.2.1 -r1.96.2.2
--- query.php 13 Jul 2003 14:20:18 -0000 1.96.2.1
+++ query.php 25 Jul 2003 02:50:07 -0000 1.96.2.2
@@ -20,7 +20,7 @@
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
-// $Id$
+
include 'include.php';
@@ -123,8 +123,14 @@
$query[] = '('.@join(' and ',$equery).')';
}
+ // Search for additional comments with 'description'
+ $bugs_with_comment = array();
+ foreach ($db->getAll('SELECT bug_id FROM '.TBL_COMMENT.' WHERE comment_text LIKE \'%'.$description.'%\'') as $row) {
+ $bugs_with_comment[] = $row['bug_id'];
+ }
+
// Text search field(s)
- foreach(array('title','description','url') as $searchfield) {
+ foreach(array('title','url') as $searchfield) {
if (!empty($$searchfield)) {
switch (${$searchfield."_type"}) {
case 'like' : $cond = "like '%".$$searchfield."%'"; break;
@@ -133,6 +139,14 @@
}
$fields[] = "$searchfield $cond";
}
+ }
+ if (!empty($description)) {
+ switch($description_type) {
+ case 'like' : $cond = 'like \'%'.$description.'%\''; break;
+ case 'rlike' : $cond = 'rlike \''.$description.'\''; break;
+ case 'not rlike' : $cond = 'not rlike \''.$description.'\'';
+ }
+ $fields[] = '(description '.$cond.(count($bugs_with_comment) ? ' OR bug_id = '.join(' OR bug_id = ', $bugs_with_comment):'').')';
}
if (!empty($fields)) $query[] = '('.@join(' and ',$fields).')';
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -r1.34 -r1.34.2.1
--- upgrade.php 4 Jun 2003 18:47:19 -0000 1.34
+++ upgrade.php 25 Jul 2003 02:50:08 -0000 1.34.2.1
@@ -43,10 +43,15 @@
break;
case 'mysql' :
$db->query("create table if not exists ".TBL_PROJECT_PERM." ( project_id int(11) NOT NULL default '0', user_id int(11) NOT NULL default '0' )");
- if ($thisvers < 2)
+ if ($thisvers < 2) {
$db->query("alter table ".TBL_AUTH_GROUP." ADD assignable TINYINT DEFAULT 0 NOT NULL AFTER locked");
- if ($thisvers < 3)
+ }
+ if ($thisvers < 3) {
$db->query("ALTER TABLE ".TBL_USER_PREF." ADD def_results INT DEFAULT '20' NOT NULL");
+ }
+ if ($thisvers < 4) {
+ $db->query('ALTER TABLE '.TBL_STATUS.' ADD bug_open TINYINT DEFAULT \'1\' NOT NULL');
+ }
break;
case 'pgsql' :
//! Missing Alter/Create's
@@ -57,12 +62,18 @@
break;
}
+ /** Database-independent changes */
if ($thisvers < 2) {
$db->query("DELETE FROM ".TBL_CONFIGURATION." WHERE varname = 'GROUP_ASSIGN_TO'");
$db->query("UPDATE ".TBL_AUTH_GROUP." SET assignable = 1 WHERE group_id = 3");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool');");
/* add db-version attribute */
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
+ }
+
+ if ($thisvers < 4) {
+ $db->query('DELETE FROM '.TBL_CONFIGURATION.' WHERE varname = \'BUG_CLOSED\'');
+ echo 'You must set your Statuses to either open or closed. Default settings should be modified so that "resolved", "closed", and "verified" are shown as being closed, and all other statuses are set to open.';
}
/* update to current DB_VERSION */
|
|
From: Ken T. <ke...@us...> - 2003-07-25 02:50:11
|
Update of /cvsroot/phpbt/phpbt/inc
In directory sc8-pr-cvs1:/tmp/cvs-serv24962/inc
Modified Files:
Tag: phpbt-1_0
functions.php
Log Message:
transfer
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -r1.42 -r1.42.2.1
--- functions.php 5 Jul 2003 22:54:26 -0000 1.42
+++ functions.php 25 Jul 2003 02:50:08 -0000 1.42.2.1
@@ -571,4 +571,27 @@
return ($retval);
}
+// Generate a testable WHERE expression for closed bugs
+function in_closed($column) {
+ global $db;
+
+ $closed_statuses = array();
+
+ foreach($db->getAll('SELECT status_id FROM '.TBL_STATUS.' WHERE bug_open = 0') as $row) {
+ $closed_statuses[] = (int)$row['status_id'];
+ }
+
+ return '('.$column.' = '.(count($closed_statuses ? join(' OR '.$column.' = ', $closed_statuses) : '1')).')';
+}
+
+// Check whether or not a status-id means BUG_CLOSED
+function is_closed($status_id) {
+ global $db;
+
+ if ($db->getOne('SELECT status_id FROM '.TBL_STATUS.' WHERE bug_open = 0 AND status_id = '.$status_id)) {
+ return true;
+ } else {
+ return false;
+ }
+}
?>
|
|
From: Ken T. <ke...@to...> - 2003-07-24 16:01:59
|
php...@be... wrote: >I have considered this in the past, but I haven't done it yet because of >the time that would be involved in maintaining it. Of course you would >want it to be the latest version, but you would also want it to be very >stable, and that would require some effort. Since I have very little >time to work on this project, so far I have hesitated to do this simply >because it would eat up some of that available time. > I've started putting together an installation on the bftm site. I was planning to write/find something that will allow us to mark an "entry" -- not "bug" -- as one of "feature request" or "bug." >Another thing that >would take some time is writing a script to convert the sourceforge >artifacts for use with phpBT. > Well that has to happen sooner or later... >Finally, you'd have to determine what to >do with the artifacts submitted by 'nobody' since phpBT doesn't allow >for anonymous bug submission. > I'll try making a new user: de...@ke..., aliased to, amazingly, /dev/null! Such a user can be treated as a normal account, and its bugs will gradually find their way onto the trash heap... >In theory, I like the idea of running phpBT for our own bugs -- it >simple gives a better impression. However, to date I haven't been >willing to surrender the time required to make that happen. > >On Wed, Jul 23, 2003 at 12:40:06PM -0400, Ken Tossell wrote: > > >>hey all, >> >>what would you think of moving from the sf.net tracker to phpbt? i think >>it'd be a good way to demo our product. >> >>ken >> >> >> >>------------------------------------------------------- >>This SF.Net email sponsored by: Free pre-built ASP.NET sites including >>Data Reports, E-commerce, Portals, and Forums are available now. >>Download today and enter to win an XBOX or Visual Studio .NET. >>http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 >>_______________________________________________ >>phpbt-dev mailing list >>php...@li... >>https://lists.sourceforge.net/lists/listinfo/phpbt-dev >> >> > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >phpbt-dev mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phpbt-dev > > |
|
From: Ken T. <ke...@to...> - 2003-07-24 15:50:47
|
php...@be... wrote: >Please remember that we are currently branched for a version 1.0 >release. This means that all changes committed to the HEAD will not be >available in the 1.0 release unless they are committed to the branch as >well. It is my hope that new feature additions will be kept to a >minimum on the branch as we should be trying to stabilize that code for >a release. > > We're actually branched? Very interesting.... sounds like some backporting would be useful.. > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >phpbt-dev mailing list >php...@li... >https://lists.sourceforge.net/lists/listinfo/phpbt-dev > > |