From f21f2907f3c0387a1139b79295bb05f2a313da60 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 16 Mar 2017 14:21:46 +0800 Subject: [PATCH] Process/FixDataObjectCtor.php --- Process/FixDataObjectCtor.php | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Process/FixDataObjectCtor.php b/Process/FixDataObjectCtor.php index e69de29b..95ea8d44 100644 --- a/Process/FixDataObjectCtor.php +++ b/Process/FixDataObjectCtor.php @@ -0,0 +1,65 @@ + array( + 'desc' => 'File to process', + 'short' => 'f', + 'min' => 1, + 'max' => 1, + + ), + + ); + + function getAuth() { + $ff = HTML_FlexyFramework::get(); + + if (!$ff->cli) { + die("cli only"); + } + + } + + + + function get($p,$opts) + { + $file = realpath($opts['file']); + if (!file_exists($file) || !is_writable($file)) { + echo "$file: NOT readable or writable\n"; + exit; + } + + $c = file_get_contents($file); + $old_c = $c; + if (strpos($c, '