Dotclear

Changeset 2188


Ignore:
Timestamp:
04/14/10 13:35:27 (13 years ago)
Author:
JcDenis
Message:
  • Fixed bug on trackback report (closes #439)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/activityReport/inc/class.activity.report.behaviors.php

    r2018 r2188  
    344344     { 
    345345          global $core; 
    346           if (!$cur->comment_trackback) return; 
    347  
    348           $posts = $core->blog->getPosts(array('post_id'=>$cur->post_id,'limit'=>1)); 
    349  
    350           $logs = array( 
    351                $cur->comment_author, 
    352                $cur->comment_url, 
     346 
     347          // From blog args are $blog,$cur #thks to bruno 
     348          $c = $cur instanceOf dcBlog ? $comment_id : $cur; 
     349          if (!$c->comment_trackback || !$c->comment_site) return; 
     350 
     351          $posts = $core->blog->getPosts( 
     352               array('post_id'=>$c->post_id,'no_content'=>true,'limit'=>1)); 
     353          if ($posts->isEmpty()) return; 
     354 
     355          $logs = array( 
     356               $c->comment_author, 
     357               $c->comment_site, 
    353358               $posts->post_title, 
    354359               $core->blog->url.$core->url->getBase($posts->post_type). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map