$this->appName= $boot->appName;
$this->appNameShort= $boot->appNameShort;
$this->appModules= $boot->enable;
- $this->isDev = empty($opts['isDev']) ? false : $opts['isDev'];
+ $this->isDev = empty($boot->Pman['isDev']) ? false : $boot->Pman['isDev'];
$this->appDisable = $boot->disable;
$this->version = $boot->version;
+
+ if (!empty($ff->Pman['local_autoauth']) &&
+ ($_SERVER['SERVER_ADDR'] == '127.0.0.1') &&
+ ($_SERVER['REMOTE_ADDR'] == '127.0.0.1')
+ ) {
+ $this->isDev = true;
+ }
+
}
}
// getting this to work with xhtml is a nightmare
// = nbsp / <img> issues screw everyting up.
-
+ //var_dump($this->isDev);
// force regeneration on load for development enviroments..
HTML_FlexyFramework::get()->generateDataobjectsCache($this->isDev);
if (file_exists($cfile)) {
// $ctime = max(filemtime($cfile), filectime($cfile));
// otherwise use compile dfile..
- $cfile = basename(array_pop(glob($cfile . '/' . $mod . '*.js')));
+ $maxm = 0;
+ $ar = glob($cfile . '/' . $mod . '*.js');
+ // default to first..
+ $cfile = basename($ar[count($ar) -1]);
+ foreach($ar as $fn) {
+ if (filemtime($fn) > $maxm) {
+ $cfile = basename($fn);
+ $maxm = filemtime($fn);
+ }
+
+ }
+
$files = array( $this->rootURL. "/_compiled_/".$mod . "/" . $cfile);
if (file_exists($lfile)) {
array_push($files, $this->rootURL."/_translations_/$mod.js");
$e->ipaddr = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : 'cli';
$e->action = $act;
$e->on_table = $obj ? $obj->tableName() : '';
- $e->on_id = $obj ? $obj->id : 0;
+
+ $pk = $obj ? $obj->keys() : false;
+
+ $e->on_id = $obj && $pk ? $obj->{$pk[0]}: 0;
$e->remarks = $remarks;
- $e->insert();
+ $eid = $e->insert();
+ $ff = HTML_FlexyFramework::get();
+ if (empty($ff->Pman['event_log_dir'])) {
+ return;
+ }
+ $file = $ff->Pman['event_log_dir']. date('/Y/m/d/'). $eid . ".php";
+ if (!file_exists(dirname($file))) {
+ mkdir(dirname($file),0700,true);
+ }
+ file_put_contents($file, var_export(array(
+ 'REQUEST_URI' => $_SERVER['REQUEST_URI'],
+ 'GET' => empty($_GET) ? array() : $_GET,
+ 'POST' => empty($_POST) ? array() : $_POST,
+ ), true));
+
+
}