MTrackWeb/Wiki.php
[web.mtrack] / MTrackWeb / Wiki.php
index c17f01d..ca74f0d 100644 (file)
@@ -36,11 +36,12 @@ class MTrackWeb_Wiki extends MTrackWeb
     function get($pi='')
     {
         // non 'json' request...
+      
         if (!isset($_REQUEST['ajax_body'])) {
             $this->title = "Browse: " . $pi;
             return;
         }
-        //DB_DataObject::debugLevel(1);
+        
         $p = DB_DataObject::Factory('Mtrack_wiki');
         $p->project_id =  $this->currentProject();
 
@@ -52,8 +53,11 @@ class MTrackWeb_Wiki extends MTrackWeb
             $px->project_id =  $this->currentProject();
             $px->orderBy('path');
             
+            $pr = DB_DataObject::factory('core_project');
+            $pr->get($px->project_id);
+            
             $ar = $px->fetchAll('path');
-            $wikidata = "## Index of pages in Wiki\n\n";
+            $wikidata = "## Index of pages in Wiki - {$pr->name} \n\n";
             foreach($ar as $pp) {
                 $wikidata .= " * [$pp](wiki:$pp)\n";
             }
@@ -86,7 +90,8 @@ class MTrackWeb_Wiki extends MTrackWeb
  
     function post()
     {
-        
+              DB_DataObject::debugLevel(1);
+  
         $au = $this->getAuthUser();
         if (!$au) {
             // autherr?