summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Bellinson <thread@gentoo.org>2001-07-27 20:47:27 +0000
committerAdam Bellinson <thread@gentoo.org>2001-07-27 20:47:27 +0000
commit5062c0304e61de60cb6e36ab6b34c6f892e52c32 (patch)
treec494d806c30edc4fd8e581289f2af09e0ecb991d
parentupdated to 1.1.11 (diff)
downloadgentoo-2-5062c0304e61de60cb6e36ab6b34c6f892e52c32.tar.gz
gentoo-2-5062c0304e61de60cb6e36ab6b34c6f892e52c32.tar.bz2
gentoo-2-5062c0304e61de60cb6e36ab6b34c6f892e52c32.zip
*** empty log message ***
-rw-r--r--app-doc/gentoo-web/files/wiki/functions.php23
-rw-r--r--app-doc/gentoo-web/files/wiki/index.php25
-rw-r--r--app-doc/gentoo-web/files/wiki/teams.php2
-rw-r--r--app-doc/gentoo-web/files/wiki/teamtasks.php8
4 files changed, 34 insertions, 24 deletions
diff --git a/app-doc/gentoo-web/files/wiki/functions.php b/app-doc/gentoo-web/files/wiki/functions.php
index 943a1bcac85e..0cedde7f0257 100644
--- a/app-doc/gentoo-web/files/wiki/functions.php
+++ b/app-doc/gentoo-web/files/wiki/functions.php
@@ -175,7 +175,7 @@ global $uid, $dbusername, $show_privates, $list; ?>
</html>
<?php } #main_footer ?>
-<?php function print_todo( $title, $tid, $owner, $date, $public, $priority, $longdesc, $team, $branch ) {
+<?php function print_todo( $title, $tid, $owner, $date, $public, $priority, $longdesc, $team, $branch, $illdoitlink ) {
// all args should be passed hot off the database
global $list, $uid, $allow_tags;
@@ -237,7 +237,7 @@ global $uid, $dbusername, $show_privates, $list; ?>
</td>
</tr>
<tr>
- <td bgcolor="#e0e0e0"><p><?php if ($uid && $public == 1) { print "<a href=\"index.php?action=grab_todo&tid=$tid\">I'll do it</a> | "; } ?><a href="single.php?tid=<?=$tid;?>">details</a> (<?=$followups;?>)</td>
+ <td bgcolor="#e0e0e0"><p><?php if ($uid && $public == 1) { print '<a href="'.$illdoitlink."\">I'll do it</a> | "; } ?><a href="single.php?tid=<?=$tid;?>">details</a> (<?=$followups;?>)</td>
<td bgcolor="#e0e0e0" align="right"><p><?php if ( $public ) print 'Posted'; else print 'Owned'; ?> by <a href="devtodo.php?devid=<?=$owner;?>"><b><?=$developer;?></b></a> (team: <?=$team.$branch;?>)</p></td>
</tr>
</table>
@@ -287,3 +287,22 @@ global $uid, $dbusername, $show_privates, $list; ?>
// we found nothing; we should never get here.
return 0;
} ?>
+
+<?php function grabtodo ( $tid ) {
+ global $uid;
+ $public = mysql_query( "select owner,public from todos where tid=$tid" );
+ list( $todo_uid, $todo_public ) = mysql_fetch_row( $public );
+ if ( $public == 0 ) {
+ print '<p style="color:red;">That todo, if it even exists, isn\'t public.</p>';
+ } else {
+ if ( $uid == $todo_uid ) {
+ // it's already theirs! let's just make it private
+ $result = mysql_query( "update todos set public=0 where tid=$tid" );
+ } else {
+ // it's someone elses, let's move it over and make it private
+ $result = mysql_query( "update todos set public=0 where tid=$tid" );
+ $result = mysql_query( "update todos set owner=$uid where tid=$tid" );
+ }
+ }
+} ?>
+
diff --git a/app-doc/gentoo-web/files/wiki/index.php b/app-doc/gentoo-web/files/wiki/index.php
index c272899a69dd..fd1d11dde055 100644
--- a/app-doc/gentoo-web/files/wiki/index.php
+++ b/app-doc/gentoo-web/files/wiki/index.php
@@ -18,20 +18,7 @@
session_unregister( 'dbpassword' );
unset( $uid, $dbusername, $dbpassword );
} elseif ( $action == 'grab_todo' && $uid ) {
- $public = mysql_query( "select owner,public from todos where tid=$tid" );
- list( $todo_uid, $todo_public ) = mysql_fetch_row( $public );
- if ( $public == 0 ) {
- print '<p style="color:red;">That todo, if it even exists, isn\'t public.</p>';
- } else {
- if ( $uid == $todo_uid ) {
- // it's already theirs! let's just make it private
- $result = mysql_query( "update todos set public=0 where tid=$tid" );
- } else {
- // it's someone elses, let's move it over and make it private
- $result = mysql_query( "update todos set public=0 where tid=$tid" );
- $result = mysql_query( "update todos set owner=$uid where tid=$tid" );
- }
- }
+ grabtodo( $tid );
}
#if ( !isset($show_privates) ) $show_privates = 1; // default
@@ -67,29 +54,29 @@
print "<p style=\"font-size:medium;font-weight:bold;\">Sorted by priority/date$disptxt</p>";
$result = mysql_query( "select * from todos where priority!=0$query_where order by priority desc,date desc" );
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'index.php?action=grab_todo&tid='.$todo['tid'] );
}
} elseif ( $list == 'by_date' ) {
print "<p style=\"font-size:medium;font-weight:bold;\">Sorted by date$disptxt</p>";
$result = mysql_query( "select * from todos where priority!=0$query_where order by date desc,priority desc" );
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'index.php?action=grab_todo&tid='.$todo['tid'] );
}
} elseif ( $list == 'by_developer' && !$uid ) {
print "<p style=\"font-size:medium;font-weight:bold;\">Sorted by developer/priority/date$disptxt</p>";
$result = mysql_query( "select * from todos where priority!=0$query_where order by owner,priority desc,date desc" );
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'index.php?action=grab_todo&tid='.$todo['tid'] );
}
} elseif ( $list == 'by_developer' && $uid ) {
print "<p style=\"font-size:medium;font-weight:bold;\">Sorted by developer/priority/date$disptxt</p>";
$result = mysql_query( "select * from todos where priority!=0 and owner=$uid$query_where order by priority desc,date desc" );
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'index.php?action=grab_todo&tid='.$todo['tid'] );
}
$result = mysql_query( "select * from todos where owner!=$uid and priority!=0$query_where order by owner,priority desc,date desc" );
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'index.php?action=grab_todo&tid='.$todo['tid'] );
}
}
main_footer();
diff --git a/app-doc/gentoo-web/files/wiki/teams.php b/app-doc/gentoo-web/files/wiki/teams.php
index 5250d6065276..7c32d8ab7700 100644
--- a/app-doc/gentoo-web/files/wiki/teams.php
+++ b/app-doc/gentoo-web/files/wiki/teams.php
@@ -166,7 +166,7 @@
<p><b>Team Members</b></p>
<ul>
<?php
- $result = mysql_query( "select username,title,email,realname,location from users where team=$team_num" );
+ $result = mysql_query( "select username,title,email,realname,location from users where team like '%$team_num%'" );
while ( $dude = mysql_fetch_array($result) ) {
?>
<li> <a href="mailto:<?=$dude['email'];?>"><?=$dude['realname'];?></a> (aka <?=$dude['username'];?>) - <?=$dude['title'];?> from <?=$dude['location'];?>
diff --git a/app-doc/gentoo-web/files/wiki/teamtasks.php b/app-doc/gentoo-web/files/wiki/teamtasks.php
index 4ef133df235e..c2c54c5cdb75 100644
--- a/app-doc/gentoo-web/files/wiki/teamtasks.php
+++ b/app-doc/gentoo-web/files/wiki/teamtasks.php
@@ -9,7 +9,11 @@ if ( !$q || !$team ) {
print '<p style="font-color:red;">You must access this page from a teams page.</p>';
main_footer();
exit;
-} elseif ( $team == 6 ) {
+}
+
+if ( $action == 'grab_todo' && $tid ) { grabtodo( $tid ); }
+
+if ( $team == 6 ) {
if ( $q == 'u' ) {
$result = mysql_query( "select * from todos where public=1 and team=$team" );
?><p style="font-size:medium;font-weight:bold;">Unassigned Tasks for <?=$teamname;?> Team</p><?php
@@ -49,7 +53,7 @@ if ( !$q || !$team ) {
while ( $todo = mysql_fetch_array($result) ) {
- print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'] );
+ print_todo( $todo['title'], $todo['tid'], $todo['owner'], $todo['date'], $todo['public'], $todo['priority'], $todo['longdesc'], $todo['team'], $todo['branch'], 'teamtasks.php?action=grab_todo&tid='.$todo['tid']."&team=$team&q=$q" );
}
main_footer();
?>