Page MenuHomeCode

No OneTemporary

diff --git a/controllers/header.php b/controllers/header.php
index eb19d28..2346dcd 100644
--- a/controllers/header.php
+++ b/controllers/header.php
@@ -1,36 +1,36 @@
<?php
/*
* Zed
* (c) 2010, Dereckson, some rights reserved
* Released under BSD license
*
* Header
*/
//
// Graffiti wall
//
//TODO: this is a potentially very intensive SQL query
-$sql = 'SELECT p.perso_nickname as username, m.motd_text FROM ' . TABLE_PERSOS . ' p, ' . TABLE_MOTD . ' m WHERE p.perso_id = m.perso_id ORDER BY rand() LIMIT 1';
+$sql = 'SELECT p.perso_nickname as username, p.perso_name as name, m.motd_text FROM ' . TABLE_PERSOS . ' p, ' . TABLE_MOTD . ' m WHERE p.perso_id = m.perso_id ORDER BY rand() LIMIT 1';
if (!$result = $db->sql_query($sql)) message_die(SQL_ERROR, "Can't query MOTD", '', __LINE__, __FILE__, $sql);
$row = $db->sql_fetchrow($result);
$smarty->assign('WALL_TEXT', $row['motd_text']);
-$smarty->assign('WALL_USER', $row['username']);
+$smarty->assign('WALL_USER', $row['name']);
$smarty->assign('WALL_USER_URL', get_url('who', $row['username']));
//
// HTML output
//
//Defines DOJO if needed, and assigns DOJO/DIJIT smarty variables
if (!defined('DOJO')) define('DOJO', defined('DIJIT'));
if (defined('DIJIT')) $smarty->assign('DIJIT', true);
$smarty->assign('DOJO', DOJO);
//Prints the template
$smarty->display('header.tpl');
define('HEADER_PRINTED', true);
?>
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 3, 23:57 (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
21119
Default Alt Text
(1 KB)

Event Timeline