|
From: Benjamin C. <bc...@us...> - 2002-06-12 12:43:52
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv8369/inc
Modified Files:
functions.php
Log Message:
Updated for closed_version and to_be_closed_version. May be a little buggy -- needs testing
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- functions.php 5 Jun 2002 15:25:08 -0000 1.30
+++ functions.php 12 Jun 2002 12:43:49 -0000 1.31
@@ -31,7 +31,7 @@
'text' => $text,
'iserror' => $iserror
));
- $t->display('error.html');
+ $t->wrap('error.html');
}
$select['priority'] = array(
@@ -364,7 +364,7 @@
global $db, $u, $perm, $_sv, $QUERY;
extract($params);
- $js = '';
+ $js = ''; $js2 = '';
// Build the javascript-powered select boxes
if ($perm->have_perm('Admin')) {
@@ -376,17 +376,24 @@
}
while (list($pid, $pname) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) {
$pname = addslashes($pname);
- // Version array
- $js .= "versions['$pname'] = new Array(";
- $js .= (!isset($no_all) || !$no_all) ? "new Array('','All')," : '';
+ // Version arrays
+ $js .= "versions['$pname'] = new Array(".
+ ((!isset($no_all) or !$no_all) ? "new Array('','All')," : '');
+ $js2 = "closedversions['$pname'] = new Array(".
+ ((!isset($no_all) or !$no_all) ? "new Array('','All'),"
+ : "new Array(0, 'Choose One'),");
$rs2 = $db->query("select version_name, version_id from ".TBL_VERSION.
" where project_id = $pid and active = 1");
while (list($version,$vid) = $rs2->fetchRow(DB_FETCHMODE_ORDERED)) {
$version = addslashes($version);
$js .= "new Array($vid,'$version'),";
+ $js2 .= "new Array($vid,'$version'),";
}
if (substr($js,-1) == ',') $js = substr($js,0,-1);
$js .= ");\n";
+ if (substr($js2,-1) == ',') $js2 = substr($js2,0,-1);
+ $js2 .= ");\n";
+ $js .= $js2;
// Component array
$js .= "components['$pname'] = new Array(";
|