}
}
+ /* Trackbacks */
+ $res = @$this->nativeQuery("SELECT * FROM {$this->data['prefix']}comments WHERE type = 'trackback';", $bblogdb);
+ if (!$res) {
+ return sprintf(COULDNT_SELECT_COMMENT_INFO, mysql_error($bblogdb));
+ }
+
+ while ($a = mysql_fetch_assoc($res)) {
+ foreach ($entries as $entry) {
+ if ($entry['postid'] == $a['postid'] ) {
+ $trackback = array('entry_id ' => $entry['entryid'],
+ 'parent_id' => 0,
+ 'timestamp' => $a['posttime'],
+ 'title' => $a['title'],
+ 'author' => $a['postername'],
+ 'email' => $a['posteremail'],
+ 'url' => $a['posterwebsite'],
+ 'ip' => $a['ip'],
+ 'status' => 'approved',
+ 'body' => $a['commenttext'],
+ 'subscribed'=> 'false',
+ 'type' => 'TRACKBACK');
+
+ serendipity_db_insert('comments', $this->strtrRecursive($trackback));
+ $cid = serendipity_db_insert_id('comments', 'id');
+ serendipity_approveComment($cid, $entry['entryid'], true);
+ }
+ }
+ }
+
+
$serendipity['noautodiscovery'] = $noautodiscovery;
// That was fun.