function get($pi=0)
{
-
+ if (isset($_REQUEST['ajax_body2'])) {
+ return $this->get2($pi);
+ }
if (!isset($_REQUEST['ajax_body'])) {
return;
}
}
- function get2()
+ function get2($pi)
{
// the ajax version...
// just returns data which can be rendered using the jtemplate code..
-
- if (!isset($_REQUEST['ajax_body'])) {
- return;
- }
+
$this->id = $pi ? $pi: (isset($_GET['id']) ? $_GET['id'] : 0);
$this->id = $this->id == 'new' ? 0 : $this->id;
$this->id = (int) $this->id;
}
// 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);