Changeset 1480

Show
Ignore:
Timestamp:
12/19/07 00:09:50 (9 months ago)
Author:
timh
Message:

-fix for a silly mistake in weblog widget custom css fix
see http://elgg.org/mod/vanillaforum/vanilla/comments.php?DiscussionID=402

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/blog/lib.php

    r1447 r1480  
    338338 
    339339  if (is_array($posts) && !empty ($posts)) { 
    340     foreach ($posts as $post) { 
    341       //$body .= run("weblogs:posts:view", $post); 
    342            
    343                 $postedby = __gettext("Posted by"); 
    344                 $commentsStr = __gettext("Comments"); 
    345                 $date = gmdate("H:i",$post->posted); 
    346                 $username = user_info('username', $post->owner); 
    347                 $anyComments = __gettext("comment(s)"); 
    348            
    349                 $body .= '<h3><a href="' . $CFG->wwwroot . user_info('username', $post->weblog) . '/weblog/' . $post->ident . '.html">' . $post->title . '</a></h3>'; 
    350                 $body .= $postedby . ' ' . $username . ' (' . $date . ')<br><br>'; 
    351                 $body .= $post->body . '<br>'; 
    352                  
    353                 if (!isset($_SESSION['comment_cache'][$post->ident]) || (time() - $_SESSION['comment_cache'][$post->ident]->created > 120)) { 
    354                         $numcomments = count_records('weblog_comments','post_id',$post->ident); 
    355                         $_SESSION['comment_cache'][$post->ident]->created = time(); 
    356                         $_SESSION['comment_cache'][$post->ident]->data = $numcomments; 
    357                 } 
    358                 $numcomments = $_SESSION['comment_cache'][$post->ident]->data; 
    359                 $comments = "<a href=\"".url.$username."/weblog/{$post->ident}.html\">$numcomments $anyComments</a>"; 
    360          
    361                 $body .= $comments; 
    362     } 
     340        foreach ($posts as $post) { 
     341        $body .= run("weblogs:posts:view", $post); 
     342        } 
    363343  } 
    364344  $body .= '</div>';