Show
Ignore:
Timestamp:
12/23/07 19:45:19 (5 years ago)
Author:
d0nut
Message:

trackbacks can only be added to the first posting

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trackback/files/lib/system/event/listener/ThreadAddFormTrackbackListener.class.php

    r134 r135  
    6262         */ 
    6363        protected function assignVariables () { 
    64                 WBBCore::getTPL()->assign('hasTrackback', $this->hasTrackback); 
    65                 WBBCore::getTPL()->append('additionalSettings', WBBCore::getTPL()->fetch('postTrackbackSetting')); 
     64                // only the first post can have trackbacks 
     65                if($this->eventObj->postID == $this->eventObj->thread->firstPostID) { 
     66                        WBBCore::getTPL()->assign('hasTrackback', $this->hasTrackback); 
     67                        WBBCore::getTPL()->append('additionalSettings', WBBCore::getTPL()->fetch('postTrackbackSetting')); 
     68                } 
    6669        } 
    6770 
     
    8184                                break; 
    8285                        case 'PostAddForm': 
    83                                 $postID = $this->eventObj->newPost->getID(); 
     86                                // only the first post can have trackbacks 
     87                                // $postID = $this->eventObj->newPost->getID(); 
    8488                        break; 
    8589                }