mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 13:25:54 +00:00
import_export: use legacy true/false values
This commit is contained in:
10
plugins/import_export/init.php
Normal file → Executable file
10
plugins/import_export/init.php
Normal file → Executable file
@@ -15,6 +15,10 @@ class Import_Export extends Plugin implements IHandler {
|
|||||||
"fox");
|
"fox");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function bool_to_sql_bool($s) {
|
||||||
|
return $s ? 'true' : 'false';
|
||||||
|
}
|
||||||
|
|
||||||
function xml_import($args) {
|
function xml_import($args) {
|
||||||
|
|
||||||
$filename = $args['xml_import'];
|
$filename = $args['xml_import'];
|
||||||
@@ -354,8 +358,8 @@ class Import_Export extends Plugin implements IHandler {
|
|||||||
|
|
||||||
if (db_num_rows($result) == 0) {
|
if (db_num_rows($result) == 0) {
|
||||||
|
|
||||||
$marked = bool_to_sql_bool(sql_bool_to_bool($article['marked']));
|
$marked = $this->bool_to_sql_bool(sql_bool_to_bool($article['marked']));
|
||||||
$published = bool_to_sql_bool(sql_bool_to_bool($article['published']));
|
$published = $this->bool_to_sql_bool(sql_bool_to_bool($article['published']));
|
||||||
$score = (int) $article['score'];
|
$score = (int) $article['score'];
|
||||||
|
|
||||||
$tag_cache = $article['tag_cache'];
|
$tag_cache = $article['tag_cache'];
|
||||||
@@ -474,4 +478,4 @@ class Import_Export extends Plugin implements IHandler {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user