148a149,150
154a157
>   global $user;
160c163,169
<     $result = db_query_range('SELECT * FROM {comments} WHERE status = 0 ORDER BY timestamp DESC', 0, 10);
---
>     $result = db_query_range('SELECT c.subject as subject, c.nid as nid, n.nid as spork, n.type as type, n.title as title, c.cid as cid, c.timestamp as timestamp FROM {comments} c,{node} n WHERE c.status = 0 AND c.nid = n.nid ORDER BY c.timestamp DESC', 0, 10); 
>     if (empty($comments_per_page)) {
>       $comments_per_page = $user->comments_per_page ? $user->comments_per_page : ($_SESSION['comment_comments_per_page'] ? $_SESSION['comment_comments_per_page'] : variable_get('comment_default_per_page', '50'));
>     }		
>     if (empty($order)) {
>       $order = $user->sort ? $user->sort : ($_SESSION['comment_sort'] ? $_SESSION['comment_sort'] : variable_get('comment_default_order', 1));
>     }
163c172,181
<       $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));
---
>       $all = comment_num_all($comment->nid);
>       $numpages = floor($all/$comments_per_page);
>       $frompage = ($numpages * $comments_per_page);
>       if($frompage == $all){
>         $frompage = $frompage-10;
>       }
>       if($frompage < 0){
>         $frompage = 0;
>       }
>       $items[] =   l( strip_tags($comment->subject), 'node/'. $comment->nid.'?from='.$frompage.'&comments_per_page='.$comments_per_page, NULL, NULL, 'comment-'. $comment->cid)          .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));
165d182
< 
170a188,189