"fox");
}
+ private function bool_to_sql_bool($s) {
+ return $s ? 'true' : 'false';
+ }
+
function xml_import($args) {
$filename = $args['xml_import'];
if (db_num_rows($result) == 0) {
- $marked = bool_to_sql_bool(sql_bool_to_bool($article['marked']));
- $published = bool_to_sql_bool(sql_bool_to_bool($article['published']));
+ $marked = $this->bool_to_sql_bool(sql_bool_to_bool($article['marked']));
+ $published = $this->bool_to_sql_bool(sql_bool_to_bool($article['published']));
$score = (int) $article['score'];
$tag_cache = $article['tag_cache'];
if (is_array($label_cache) && $label_cache["no-labels"] != 1) {
foreach ($label_cache as $label) {
- label_create($label[1],
+ Labels::create($label[1],
$label[2], $label[3], $owner_uid);
- label_add_article($ref_id, $label[1], $owner_uid);
+ Labels::add_article($ref_id, $label[1], $owner_uid);
}
}
return 2;
}
-}
\ No newline at end of file
+}