php8
[web.mtrack] / MTrackWeb / Report.php
index 824c063..0a61fcc 100644 (file)
@@ -18,7 +18,7 @@ class MTrackWeb_Report extends MTrackWeb
     {
        
         if (isset($_REQUEST['ajax_body2'])) {
-            return $this->get2();
+            return $this->get2($pi);
         }
         if (!isset($_REQUEST['ajax_body'])) {
             return;
@@ -100,7 +100,7 @@ class MTrackWeb_Report extends MTrackWeb
 
     }
     
-    function get2()
+    function get2($pi)
     {
         // the ajax version...
         // just returns data which can be rendered using the jtemplate code..
@@ -153,8 +153,9 @@ class MTrackWeb_Report extends MTrackWeb
         }
         // in theory... everything else is a 'save'...
         try {
+            // this does not match api!??
             $cs = DB_DataObject::Factory('mtrack_change');
-            $cs->begin( "report:" . $rep->summary, $_POST['comment']);
+            $cs->beginChange( "report:" . $rep->summary, $_POST['comment']);
             $rep->save($cs);
             $cs->commit();
             return $this->get($pi);