summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 4 insertions, 0 deletions
diff --git a/it.class b/it.class
index 7e6e541..554da52 100644
--- a/it.class
+++ b/it.class
@@ -697,6 +697,8 @@ function file_get($filename, $p = array())
$result[$arr[0]] = $arr[1];
}
}
+ else if ($p['lines'])
+ $result = explode("\n", rtrim($data, "\n"));
else
$result = $data;
@@ -713,6 +715,8 @@ function file_put($filename, $data, $p = array())
{
if ($p['keyval'])
$data = join("", it::map('"$k\t$v\n"', $data));
+ else if ($p['lines'])
+ $data = join("", it::map('"$v\n"', $data));
return file_put_contents($filename == "-" ? "php://stdout" : $filename, $data);
}