summaryrefslogtreecommitdiff
path: root/node.php
diff options
context:
space:
mode:
authornatrak <>2001-07-25 12:21:48 +0000
committernatrak <>2001-07-25 12:21:48 +0000
commitd016fb14f43976ba184d3e0597065b15f5eca1f0 (patch)
treed3303a5c55095cdbbc94926274a1512b1b85387c /node.php
parente0dc03dccd90fb6dc0130233719f74429a547cd4 (diff)
downloadbrdo-d016fb14f43976ba184d3e0597065b15f5eca1f0.tar.gz
brdo-d016fb14f43976ba184d3e0597065b15f5eca1f0.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 'node.php')
-rw-r--r--node.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/node.php b/node.php
index e6db41913..7482e977d 100644
--- a/node.php
+++ b/node.php
@@ -77,7 +77,7 @@ function node_failure() {
function node_history($node) {
global $status;
if ($node->status == $status[expired] || $node->status == $status[posted]) {
- $output .= "<DT><B>". format_date($node->timestamp) ." by ". format_username($node->userid) .":</B></DT><DD>". check_output($node->log, 1) ."<P></DD>";
+ $output .= "<DT><B>". format_date($node->timestamp) ." by ". format_username($node->userid, $node->name) .":</B></DT><DD>". check_output($node->log, 1) ."<P></DD>";
}
if ($node->pid) {
$output .= node_history(node_get_object(array("nid" => $node->pid)));
@@ -88,11 +88,11 @@ function node_history($node) {
$number = ($title ? db_result(db_query("SELECT COUNT(nid) FROM node WHERE title = '$title' AND status = $status[posted]")) : 1);
if ($number > 1) {
- $result = db_query("SELECT n.*, u.userid FROM node n LEFT JOIN users u ON n.author = u.id WHERE n.title = '$title'");
+ $result = db_query("SELECT n.*, u.userid, u.name FROM node n LEFT JOIN users u ON n.author = u.id WHERE n.title = '$title'");
while ($node = db_fetch_object($result)) {
if (node_access($node)) {
- $output .= "<P><B><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></B><BR><SMALL>$node->type - ". format_username($node->userid) ." - ". format_date($node->timestamp, "small") ."</SMALL></P>";
+ $output .= "<P><B><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></B><BR><SMALL>$node->type - ". format_username($node->userid, $node->name) ." - ". format_date($node->timestamp, "small") ."</SMALL></P>";
}
}