* ?? arrayClean.. what's it doing here?!? ;)
*
* Usefull implemetors
- * DB_DataObject::toEventString (for logging - this is generically prefixed to all database operations.)
+ * DB_DataObject*:*toEventString (for logging - this is generically prefixed to all database operations.)
+ * - any data object where this method exists, the result will get prefixed to the log remarks
*/
class Pman extends HTML_FlexyFramework_Page
require_once 'Services/JSON.php';
$json = new Services_JSON();
+ // log all errors!!!
+ $this->addEvent("ERROR", false, $str);
+
if (!empty($_REQUEST['returnHTML']) ||
(isset($_SERVER['CONTENT_TYPE']) && preg_match('#multipart/form-data#i', $_SERVER['CONTENT_TYPE']))
) {
echo $json->encodeUnsafe(array(
'success'=> false,
'errorMsg' => $str,
- 'message' => $str, // compate with exeption / loadexception.
+ 'message' => $str, // compate with exeption / loadexception.
'errors' => $errors ? $errors : true, // used by forms to flag errors.
'authFailure' => !empty($errors['authFailure']),
echo "</BODY></HTML>";
exit;
}
-
+
echo $json->encode(array(
'success'=> false,
'data'=> array(),
mkdir(dirname($file),0700,true);
}
file_put_contents($file, var_export(array(
- 'REQUEST_URI' => $_SERVER['REQUEST_URI'],
+ 'REQUEST_URI' => empty($_SERVER['REQUEST_URI']) ? 'cli' : $_SERVER['REQUEST_URI'],
'GET' => empty($_GET) ? array() : $_GET,
'POST' => empty($_POST) ? array() : $_POST,
), true));