*
* - applySort($au, $sortcol, $direction)
* - applyFilters($_REQUEST, $authUser) -- apply any query filters on data. and hide stuff not to be seen.
- * - postListExtra - add extra column data on the results (like new messages etc.)
- * -postListFilter($data, $authUser, $request) return $data - add extra data to an object
+ * - postListExtra($_REQUEST) : array(extra_data) - add extra column data on the results (like new messages etc.)
+ * - postListFilter($data, $authUser, $request) return $data - add extra data to an object
*
- * - toRooSingleArray($authUser) // single fetch, add data..
+ * - toRooSingleArray($authUser, $request) // single fetch, add data..
* - toRooArray($request) /// toArray if you need to return different data.. for a list fetch.
*
*
*
* csvCols[0] csvCols[1].... = .... column titles for CSV output
*
- * csvTitle[0], csvTitle[1] .... = columns to use for CSV output
+ * csvTitles[0], csvTitles[1] .... = columns to use for CSV output
*
* sort = sort column (',' comma delimited)
* dir = sort direction ?? in future comma delimited...
function get($tab)
{
// $this->jerr("Not authenticated", array('authFailure' => true));
- //echo '<PRE>';print_R($_GET); DB_DataObject::debuglevel(1);
+ //echo '<PRE>';print_R($_GET);
+ //DB_DataObject::debuglevel(1);
$this->init(); // from pnan.
// debugging...
if (!empty($_GET['_post'])) {
$_POST = $_GET;
- DB_DAtaObject::debuglevel(1);
+ //DB_DAtaObject::debuglevel(1);
return $this->post($tab);
}
$tab = str_replace('/', '',$tab); // basic protection??
$this->jerr("PERMISSION DENIED");
}
- $this->jok(method_exists($x, 'toRooSingleArray') ? $x->toRooSingleArray($this->authUser) : $x->toArray());
+ $this->jok(method_exists($x, 'toRooSingleArray') ? $x->toRooSingleArray($this->authUser, $_REQUEST) : $x->toArray());
}
if (isset($_REQUEST['_delete'])) {
$x->limit(
empty($_REQUEST['start']) ? 0 : (int)$_REQUEST['start'],
- min(empty($_REQUEST['limit']) ? 25 : (int)$_REQUEST['limit'], 1000)
+ min(empty($_REQUEST['limit']) ? 25 : (int)$_REQUEST['limit'], 5000)
);
$queryObj = clone($x);
$this->jerr('Unable to load referenced table, check the links config: ' .$ka[0]);
}
$chk->{$ka[1]} = $xx->$pk;
- if ($chk->count()) {
- $this->jerr('Delete Dependant records first ('. $ka[0]. ':' . $ka[1] .'='.$xx->$pk.')');
+ $matches = $chk->count();
+ if ($matches) {
+ $chk->limit(1);
+ $o = $chk->fetchAll();
+ $desc = $ka[0]. ':' . $ka[1] .'='.$xx->$pk;
+ if (method_exists($chk, 'toEventString')) {
+ $desc = $ka[0] . ' : ' . $o[0]->toEventString();
+ }
+
+ $this->jerr("Delete Dependant records ($matches found), first is ( $desc )");
}
}
// finally log it..
//$ff->DB_DataObject['ini_'. $db->database()];
//echo '<PRE>';print_r($do->links());exit;
//var_dump($mods);
-
+ /*
if (in_array('Builder', $mods) ) {
foreach(in_array('Builder', $mods) ? scandir($this->rootDir.'/Pman') : $mods as $m) {
$map = $conf[$do->tableName()];
}
} else {
+ */
$map = $do->links();
- }
+ //}