summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-01-30 11:45:15 +0300
committerAndrew Dolgov <[email protected]>2018-01-30 11:45:15 +0300
commit365f5c8b53e949fe02c41dde7b313195ac1171ec (patch)
tree6fbdba9c0da952432093fc4a10a7b288f82e220b /plugins
parent7f4a404566221231a7b1f16630ee4b15b6391810 (diff)
import_export: use legacy true/false values
Diffstat (limited to 'plugins')
-rwxr-xr-x[-rw-r--r--]plugins/import_export/init.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/import_export/init.php b/plugins/import_export/init.php
index 27cb73698..1f7a31bad 100644..100755
--- 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
+}