diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-07-25 12:21:49 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-07-25 12:21:49 +0000 |
commit | 491550531fbe1885a12693cecdf02a9970c2672d (patch) | |
tree | 24d4f52624f5a33fcf7666a15fd7e0ffcc4ab772 /modules | |
parent | d016fb14f43976ba184d3e0597065b15f5eca1f0 (diff) | |
download | brdo-491550531fbe1885a12693cecdf02a9970c2672d.tar.gz brdo-491550531fbe1885a12693cecdf02a9970c2672d.tar.bz2 |
common.inc
- format_username() now takes a second optional parameter which gives the
real name of the user.
Rest
- updated the calls to format_username() where appropriate to show the name
of the user instead of the account id. Clicking on a name will still give you
the account info etc. If you find a place where the real name is not shown
let me know.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 | ||||
-rw-r--r-- | modules/queue.module | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/book.module b/modules/book.module index 679b046b4..48ce8162b 100644 --- a/modules/book.module +++ b/modules/book.module @@ -61,7 +61,7 @@ function book_view($node, $main = 0) { $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid, $node->name) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; } if ($node->body) { diff --git a/modules/book/book.module b/modules/book/book.module index 679b046b4..48ce8162b 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -61,7 +61,7 @@ function book_view($node, $main = 0) { $output .= " <TR><TD COLSPAN=\"2\">$location</TD><TD ALIGN=\"right\">". node_control($node) ."</TD></TR>\n"; $output .= " <TR><TD COLSPAN=\"3\"><HR></TD></TR>"; - $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; + $output .= " <TR><TD COLSPAN=\"3\"><B><BIG>". check_output($node->title) ."</BIG></B>". ($node->body ? "<BR><SMALL><I>Last updated by ". format_username($node->userid, $node->name) ." on ". format_date($node->timestamp) ."</I></SMALL> " : "") ."</TD></TR>\n"; } if ($node->body) { diff --git a/modules/queue.module b/modules/queue.module index 613c9b3a9..84670d391 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -64,13 +64,13 @@ function queue_vote($id, $vote) { function queue_overview() { global $status, $theme, $user; - $result = db_query("SELECT n.*, u.userid FROM node n LEFT JOIN users u ON n.author = u.id WHERE n.status = '$status[queued]'"); + $result = db_query("SELECT n.*, u.userid, u.name FROM node n LEFT JOIN users u ON n.author = u.id WHERE n.status = '$status[queued]'"); $content .= "<TABLE BORDER=\"0\" CELLSPACING=\"4\" CELLPADDING=\"4\">\n"; $content .= " <TR><TH>". t("Subject") ."</TH><TH>". t("Author") ."</TH><TH>". t("Type") ."</TH><TH>". t("Score") ."</TH></TR>\n"; while ($node = db_fetch_object($result)) { - if ($user->id == $node->author || field_get($node->users, $user->userid)) $content .= " <TR><TD><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid) ."</TD><TD ALIGN=\"center\">". check_output($node->type) ."</TD><TD ALIGN=\"center\">". queue_score($node->nid) ."</TD></TR>\n"; - else $content .= " <TR><TD><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid) ."</TD><TD ALIGN=\"center\">". check_output($node->type) ."</TD><TD ALIGN=\"center\"><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". t("vote") ."</A></TD></TR>\n"; + if ($user->id == $node->author || field_get($node->users, $user->userid)) $content .= " <TR><TD><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid, $node->name) ."</TD><TD ALIGN=\"center\">". check_output($node->type) ."</TD><TD ALIGN=\"center\">". queue_score($node->nid) ."</TD></TR>\n"; + else $content .= " <TR><TD><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid, $node->name) ."</TD><TD ALIGN=\"center\">". check_output($node->type) ."</TD><TD ALIGN=\"center\"><A HREF=\"module.php?mod=queue&op=view&id=$node->nid\">". t("vote") ."</A></TD></TR>\n"; } $content .= "</TABLE>\n"; |