var $do = false; // the dataobject being worked on..
+
+ var $countWhat; // set in loadMap
+ var $colsJname;
+ var $old;
+
function getAuth()
{
parent::getAuth(); // load company!
$au = $this->getAuthUser();
if (!$au) {
- $this->jerr("Not authenticated", array('authFailure' => true));
+ $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true));
}
if (!$au->pid() ) { // not set up yet..
- $this->jerr("Not authenticated", array('authFailure' => true));
+ $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true));
}
$this->init(); // from pman.
//DB_DataObject::debuglevel(1);
HTML_FlexyFramework::get()->generateDataobjectsCache($this->isDev && !empty($_REQUEST['isDev']));
-
-
-
+
// debugging...
-
-
-
+
if ( $this->checkDebugPost()) {
$tab = array_shift($tt);
$x = $this->dataObject($tab);
- $_columns = !empty($_REQUEST['_columns']) ? explode(',', $_REQUEST['_columns']) : false;
+ $_columns = !empty($_REQUEST['_columns']) && is_string($_REQUEST['_columns']) ? explode(',', $_REQUEST['_columns']) : false;
+
if (isset( $_REQUEST['lookup'] ) && is_array($_REQUEST['lookup'] )) { // single fetch based on key/value pairs
$this->selectSingle($x, $_REQUEST['lookup'],$_REQUEST);
$this->setFilters($x,$_REQUEST);
if (!$this->checkPerm($x,'S', $_REQUEST)) {
- $this->jerr("PERMISSION DENIED (g)");
+ $this->jerror("NOTICE-NOPERM", "PERMISSION DENIED (g)");
}
//print_r($x);
{
// Db_DataObject::debugLevel(1);
- $sort = empty($_REQUEST['sort']) ? $sort : $_REQUEST['sort'];
- $dir = empty($_REQUEST['dir']) ? $dir : $_REQUEST['dir'];
+ $sort = empty($_REQUEST['sort']) || !is_string($_REQUEST['sort']) ? $sort : $_REQUEST['sort'];
+ $dir = empty($_REQUEST['dir']) || !is_string($_REQUEST['dir']) ? $dir : $_REQUEST['dir'];
$dir = $dir == 'ASC' ? 'ASC' : 'DESC';
- $ms = empty($_REQUEST['_multisort']) ? false : $_REQUEST['_multisort'];
+ $ms = empty($_REQUEST['_multisort']) || !is_string($_REQUEST['_multisort']) ? false : $_REQUEST['_multisort'];
//var_Dump($ms);exit;
$sorted = false;
if (method_exists($x, 'applySort')) {
if (method_exists($x, 'setFromRoo')) {
$res = $x->setFromRoo($req, $this);
if (is_string($res)) {
- $this->jerr($res);
+ $this->jerror("NOTICE-INSERT", $res);
}
} else {
$x->setFrom($req);
$x->whereAdd($this->key .' IN ('. implode(',', $bits) .')');
if (!$x->find()) {
- $this->jerr("Nothing found to delete");
+ $this->jerror("NOTICE-DELETE","Nothing found to delete");
}
$errs = array();
while ($x->fetch()) {
if (method_exists($chk, 'toEventString')) {
$desc .= ' : ' . $o[0]->toEventString();
}
- $this->jerr("Delete Dependant records ($match_total found), " .
+ $this->jerror("NOTICE-DELETE-DEP", "Delete Dependant records ($match_total found), " .
"first is ( $desc )");
}
function loadMap($do, $cfg =array()) //$onlycolumns=false, $distinct = false)
{
-
- //DB_DataObject::debugLevel(5);
+ //DB_DataObject::debugLevel(5);
$onlycolumns = !empty($cfg['columns']) ? $cfg['columns'] : false;
$distinct = !empty($cfg['distinct']) ? $cfg['distinct'] : false;
$excludecolumns = !empty($cfg['exclude']) ? $cfg['exclude'] : array();