diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php
index d94602256..4c1ec89db 100644
--- a/e107_admin/includes/infopanel.php
+++ b/e107_admin/includes/infopanel.php
@@ -474,60 +474,58 @@ EOF;
function renderLatestComments()
{
- return;
+ $sql = e107::getDb();
+ $tp = e107::getParser();
+
+ if(!check_class('B')) // XXX problems?
+ {
+ // return;
+ }
+
+ if(!$rows = $sql->retrieve('comments','*','comment_blocked=2 ORDER BY comment_id DESC LIMIT 5',true) )
+ {
+ return;
+ }
+
+
+
+
+ $sc = e107::getScBatch('comment');
+
+
$text = '
-
';
+ $text .= "Note: Not fully functional at the moment.";
$ns = e107::getRender();
return $ns->tablerender("Latest Comments",$text,'core-infopanel_online',true);
@@ -672,7 +670,12 @@ EOF;
if(file_exists(e_PLUGIN."awstats/awstats.graph.php"))
{
require_once(e_PLUGIN."awstats/awstats.graph.php");
- return $data;
+
+ if($data)
+ {
+ return $data;
+ }
+
// return;
}
diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php
index 4c5eb5f3f..c9fdbd2cc 100644
--- a/e107_core/shortcodes/batch/comment_shortcodes.php
+++ b/e107_core/shortcodes/batch/comment_shortcodes.php
@@ -59,9 +59,9 @@ class comment_shortcodes extends e_shortcode
function sc_username($parm='')
{
global $USERNAME;
- if (isset($this->var['user_id']) && $this->var['user_id'])
+ if (isset($this->var['comment_author_id']) && $this->var['comment_author_id'])
{
- $USERNAME = $parm == 'raw' ? $this->var['user_name'] : " $this->var['user_id'], 'name' => $this->var['user_name']))."'>".$this->var['user_name']."\n";
+ $USERNAME = $parm == 'raw' ? $this->var['comment_author_name'] : " $this->var['comment_author_id'], 'name' => $this->var['comment_author_name']))."'>".$this->var['comment_author_name']."\n";
}
else
{