From: Alan Knowles Date: Thu, 16 Mar 2017 06:21:46 +0000 (+0800) Subject: Process/FixDataObjectCtor.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=f21f2907f3c0387a1139b79295bb05f2a313da60 Process/FixDataObjectCtor.php --- 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, '