'rights' => 'SELECT rightId FROM rights WHERE userId = ?',
'newitem' => 'INSERT INTO locations (id, parent) VALUES(?, ?)',
'newhistory' => 'INSERT INTO history (location, owner, discussion, nodename, nodenote) VALUES(?, ?, ?, ?, ?)',
- 'history' => 'SELECT history.id, history.discussion, history.time, history.nodename, history.nodenote, history.seen, users.login FROM history LEFT OUTER JOIN users ON history.owner = users.id WHERE history.location = ? ORDER BY history.time',
+ 'history' => 'SELECT history.id, history.discussion, history.time, history.nodename, history.nodenote, history.seen, users.login, users.email FROM history LEFT OUTER JOIN users ON history.owner = users.id WHERE history.location = ? ORDER BY history.time',
'admindump' => 'SELECT
locations.id, locations.name, locations.note, locations.mainhistory, musers.login, main.discussion,
history.id, history.discussion, history.nodename, history.nodenote, users.login
print "<div class='discussion'>\n<h2>Discussion</h2>";
$diss = 1;
}
- my( $id, $text, $time, $name, $note, $seen, $user ) = @{$history};
+ my( $id, $text, $time, $name, $note, $seen, $user, $email ) = @{$history};
my $type = $seen ? 'history' : 'unseen-history';
$type = 'main-history' if( defined( $mid ) && ( $id == $mid ) );
print "<div class='$type'>\n";
$text =~ s/\n/<br>/g;
print "<p class='discussion-text'>$text\n";
}
+ ( $user ) = ( $email =~ /^(.*)@/ ) if defined $email && !defined $user;
print "<p class='author'>".encode( $user )."\n" if( defined( $user ) );
print "<p class='time'>".encode( $time )."\n";
print "</div>\n";