SMF importer, uses tags now
This commit is contained in:
parent
b684f986fe
commit
917c7b93a7
@ -242,8 +242,25 @@ class Serendipity_Import_smf extends Serendipity_Import {
|
||||
}
|
||||
}
|
||||
|
||||
/* Comments */
|
||||
$topic_id = $entries[$x]['topic_id'];
|
||||
|
||||
// Store original ID, we might need it at some point.
|
||||
serendipity_db_insert('entryproperties', array('entryid' => $entries[$x]['entryid'], 'property' => 'foreign_import_id', 'value' => $entries[$x]['topic_id']));
|
||||
|
||||
// Convert SMF tags
|
||||
$t_res = @$this->nativeQuery("SELECT t.tag
|
||||
FROM {$this->data['prefix']}tags_log AS tl
|
||||
JOIN {$this->data['prefix']}tags AS t
|
||||
ON tl.ID_TAG = t.ID_TAG
|
||||
WHERE tl.ID_TOPIC = {$topic_id}
|
||||
AND t.approved = 1");
|
||||
if (mysql_num_rows($t_res) > 0) {
|
||||
while ($a = mysql_fetch_assoc($t_res)) {
|
||||
serendipity_db_insert('entrytags', array('entryid' => $entries[$x]['entryid'], 'tag' => $t_res['tag']));
|
||||
}
|
||||
}
|
||||
|
||||
/* Comments */
|
||||
$c_res = @$this->nativeQuery("SELECT
|
||||
tm.subject AS post_subject,
|
||||
tm.body AS post_text,
|
||||
|
Loading…
x
Reference in New Issue
Block a user