From 5e9b63d102e81ad98d3fc5af6826fab7980e5274 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Wed, 30 Jan 2013 09:45:49 +0100 Subject: [PATCH] Basic handling of #comments and empty lines in import tools. --- ykval-import | 2 ++ ykval-import-clients | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ykval-import b/ykval-import index 8827322..bbeb7f4 100755 --- a/ykval-import +++ b/ykval-import @@ -20,6 +20,8 @@ if (!$db->connect()) { while ($res=fgetcsv(STDIN, 0, ",")) { + if($res[0]===null || strpos($res[0], '#')===0) continue; + $params=array("active"=>$res[0], "created"=>$res[1], "modified"=>$res[2], diff --git a/ykval-import-clients b/ykval-import-clients index 109e40d..a9a3ca4 100755 --- a/ykval-import-clients +++ b/ykval-import-clients @@ -20,6 +20,8 @@ if (!$db->connect()) { while ($res=fgetcsv(STDIN, 0, ",")) { + if($res[0]===null || strpos($res[0], '#')===0) continue; + $params=array("id"=>$res[0], "active"=>$res[1], "created"=>$res[2],