From: Andrew Dolgov Date: Tue, 30 Jan 2018 08:45:15 +0000 (+0300) Subject: import_export: use legacy true/false values X-Git-Tag: 18.8~79 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=365f5c8b53e949fe02c41dde7b313195ac1171ec;p=tt-rss.git import_export: use legacy true/false values --- diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php old mode 100644 new mode 100755 index 27cb7369..1f7a31ba --- a/plugins/import_export/init.php +++ b/plugins/import_export/init.php @@ -15,6 +15,10 @@ class Import_Export extends Plugin implements IHandler { "fox"); } + private function bool_to_sql_bool($s) { + return $s ? 'true' : 'false'; + } + function xml_import($args) { $filename = $args['xml_import']; @@ -354,8 +358,8 @@ class Import_Export extends Plugin implements IHandler { 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']; @@ -474,4 +478,4 @@ class Import_Export extends Plugin implements IHandler { return 2; } -} \ No newline at end of file +}