Fix #7468 - updating template scanner
[Pman.Cms] / UpdateBjsTemplates.php
index 0f98ab0..6e0176c 100644 (file)
@@ -58,13 +58,13 @@ class Pman_Cms_UpdateBjsTemplates extends Pman
         }
         
         $base = $ff->Pman_Cms['project_name'];
-        
-        $dh = opendir($base);
+        $dir = $ff->Pman_Cms['site_dir'][$base];
+        $dh = opendir($dir);
         
         $ret = array();
         
         if(!$dh){
-            $this->jerr("could not open dir: config[Pman_Cms] = " . $base);
+            $this->jerr("could not open dir: config[Pman_Cms] = " . $dir);
             return $ret; // something went wrong!?
         }
          
@@ -73,7 +73,7 @@ class Pman_Cms_UpdateBjsTemplates extends Pman
             if(empty($fn) || $fn[0] == '.' || !preg_match('/\.bjs$/', $fn)){
                 continue;
             }
-            
+            // var_dump($fn);exit;
             if($this->cli){
                 echo "Processing {$fn} \n";
             }
@@ -102,8 +102,8 @@ class Pman_Cms_UpdateBjsTemplates extends Pman
             $x = DB_DataObject::Factory('cms_templatestr');
             $x->syncTemplateWords($template, false);
         }
-        
-        $this->scanPmanTemplates();
+        // pman templates are done via core templates
+       // $this->scanPmanTemplates();
         
     }