|
From: Benjamin C. <bc...@us...> - 2002-04-13 14:52:00
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv8456/admin
Modified Files:
project.php
Log Message:
Let's re-fix that component creation and fix the same problem with version creation
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- project.php 12 Apr 2002 21:39:19 -0000 1.40
+++ project.php 13 Apr 2002 14:51:57 -0000 1.41
@@ -65,7 +65,7 @@
}
function show_version($versionid = 0, $error = '') {
- global $db, $t, $_pv, $STRING, $QUERY;
+ global $db, $t, $_pv, $STRING, $QUERY, $_gv;
foreach ($_pv as $k => $v) $$k = $v;
@@ -75,7 +75,10 @@
if (!empty($_pv)) {
$t->assign($_pv);
} else {
- $t->assign('active', 1);
+ $t->assign(array(
+ 'active' => 1,
+ 'project_id' => $_gv['project_id']
+ ));
}
}
$t->assign('error', $error);
@@ -128,7 +131,7 @@
}
function show_component($componentid = 0, $error = '') {
- global $db, $t, $_pv, $STRING, $QUERY;
+ global $db, $t, $_pv, $STRING, $QUERY, $_gv;
if ($componentid) {
$t->assign($db->getRow(sprintf($QUERY['admin-show-component'], $componentid)));
@@ -136,7 +139,10 @@
if (!empty($_pv)) {
$t->assign($_pv);
} else {
- $t->assign('active', 1);
+ $t->assign(array(
+ 'active' => 1,
+ 'project_id' => $_gv['project_id']
+ ));
}
}
$t->assign('error', $error);
@@ -295,12 +301,7 @@
switch($_gv['op']) {
case 'add' : show_project(); break;
case 'edit' : show_project($_gv['id']); break;
- case 'edit_component' :
- if (!$_gv['id']) {
- $t->assign('project_id',$_gv['project_id']);
- }
- show_component($_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;
|