more comments on loading
[Pman.Base] / Pman.php
index 754be87..ff85975 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -69,7 +69,11 @@ class Pman extends HTML_FlexyFramework_Page
     var $serverName = false;
     var $lang = false;
     var $allowSignup = false;
-    
+    var $_hasInit;
+    var $appNameShort;
+    var $appDisable;
+    var $uiConfig;
+     
     /**
      * ------------- Standard getAuth/get/post methods of framework.
      * 
@@ -106,7 +110,8 @@ class Pman extends HTML_FlexyFramework_Page
         
         $this->appDisable = $boot->disable;
         $this->appDisabled = explode(',', $boot->disable);
-        $this->version = $boot->version; 
+        $this->version = $boot->version;
+        $this->appVersion = $boot->version; 
         $this->uiConfig = empty($boot->Pman['uiConfig']) ? false : $boot->Pman['uiConfig']; 
         
         if (!empty($boot->Pman['local_autoauth']) &&
@@ -456,7 +461,7 @@ class Pman extends HTML_FlexyFramework_Page
      */
     function jerrAuth()
     {
-        $au = $this->authUser();
+        $au = $this->authUser;
         if ($au) {
             // is it an authfailure?
             $this->jerr("Permission denied to view this resource", array('authFailure' => true));
@@ -734,6 +739,15 @@ class Pman extends HTML_FlexyFramework_Page
         
         $mods = $this->modulesList();
         
+        // this puts the 'main one' at the end.
+        // as in theory we can override the stuff in the main project?
+        
+         
+        $core = array_shift($mods);
+        $fm = array_shift($mods);
+        array_unshift($mods,$core);
+        $mods[] = $fm;
+       // print_R($mods);exit;
         $is_bootstrap = in_array('BAdmin', $mods);
         
         foreach($mods as $mod) {
@@ -741,7 +755,7 @@ class Pman extends HTML_FlexyFramework_Page
             
             if ($is_bootstrap) {
                 if (!file_exists($this->rootDir."/Pman/$mod/is_bootstrap")) {
-                    echo '<!-- missing '. $this->rootDir."/Pman/$mod/is_bootstrap  - skipping -->";
+                    echo '<!-- missing '. $this->rootDir."/Pman/$mod/is_bootstrap  - skipping -->\n";
                     continue;
                 }
                 
@@ -1053,7 +1067,7 @@ class Pman extends HTML_FlexyFramework_Page
     
     function onException($ex)
     {
-         static $reported = false;
+        static $reported = false;
         if ($reported) {
             return;
         }
@@ -1139,6 +1153,12 @@ class Pman extends HTML_FlexyFramework_Page
     {
         
         if (!empty(HTML_FlexyFramework::get()->Pman['disable_events'])) {
+            $str = $obj !== false ? "{$obj->tableName()}:{$obj->id} " : '';
+            $de = ini_set('display_errors', 0);
+            trigger_error("$act {$str}{$remarks}" , E_USER_NOTICE);
+            ini_set('display_errors', $de );
+            
+            
             return;
         }
         $au = $this->getAuthUser();