|
From: Benjamin C. <bc...@us...> - 2001-12-06 14:28:35
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6198
Modified Files:
dbchanges.sql include.php
Log Message:
Changes for project -> group management
Index: dbchanges.sql
===================================================================
RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dbchanges.sql 2001/12/05 04:46:12 1.14
+++ dbchanges.sql 2001/12/06 14:28:31 1.15
@@ -1,3 +1,12 @@
alter table auth_group add locked tinyint(1) not null default 0 after group_name;
update auth_group set locked = 1;
insert into db_sequence values('auth_group', 3);
+
+create table project_group (
+ project_id int(10) unsigned NOT NULL default '0',
+ group_id int(10) unsigned NOT NULL default '0',
+ created_by int(10) unsigned NOT NULL default '0',
+ created_date bigint(20) unsigned NOT NULL default '0',
+ PRIMARY KEY (project_id,group_id),
+ KEY group_id (group_id)
+) TYPE=MyISAM;
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- include.php 2001/12/01 19:51:20 1.79
+++ include.php 2001/12/06 14:28:31 1.80
@@ -77,6 +77,19 @@
return $retval;
}
+ function grab_set($q_string = '') {
+ $retary = array();
+ if ($q_string) $this->query($q_string);
+ while ($row = $this->grab()) { $retary[] = $row; }
+ return $retary;
+ }
+
+ function grab_field_set($q_string = '') {
+ $retary = array();
+ if ($q_string) $this->query($q_string);
+ while ($item = $this->grab_field()) { $retary[] = $item; }
+ return $retary;
+ }
function nextid($seq_name) {
global $auth;
@@ -252,6 +265,14 @@
switch($box) {
case 'group' :
+ if ($project) { // If we are building for project admin page
+ if (!count($value) or (count($value) && in_array(0, $value))) {
+ $sel = ' selected';
+ } else {
+ $sel = '';
+ }
+ $text = "<option value=\"all\"$sel>All Groups</option>";
+ }
$q->query($queries[$box]);
while ($row = $q->grab()) {
if (count($value) && in_array($row[$box.'_id'], $value)) $sel = ' selected';
|