Added transaction stats. Added (possibly unwanted) columns.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@389 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -309,15 +309,37 @@ class AppController extends Controller {
|
||||
}
|
||||
|
||||
$table = $this->gridDataFilterTablesTable($params, $model, $tbl);
|
||||
if (!$table || $table == $model->alias)
|
||||
if (!$table)
|
||||
continue;
|
||||
|
||||
// If the table is already part of the query, don't replace it
|
||||
if (isset($query[$link][$table]) || in_array($table, $query[$link]))
|
||||
continue;
|
||||
$config = $this->gridDataFilterTablesConfig($params, $model, $tbl);
|
||||
|
||||
/* pr(array('pre-filter-table-config' => */
|
||||
/* array('query[link]' => $query[$link], */
|
||||
/* 'config' => $config))); */
|
||||
|
||||
// If the table is already part of the query, append to it
|
||||
if ($table == $model->alias) {
|
||||
$query[$link] =
|
||||
array_merge_recursive($query[$link], $config);
|
||||
}
|
||||
elseif (isset($query[$link][$table])) {
|
||||
$query[$link][$table] =
|
||||
array_merge_recursive($query[$link][$table], $config);
|
||||
}
|
||||
elseif (in_array($table, $query[$link])) {
|
||||
$key = array_search($table, $query[$link]);
|
||||
$query[$link][$key] =
|
||||
array_merge_recursive($query[$link][$key], $config);
|
||||
}
|
||||
else {
|
||||
// Table is NOT already part of the query... set it now
|
||||
$query[$link][$table] = $config;
|
||||
}
|
||||
|
||||
/* pr(array('post-filter-table-config' => */
|
||||
/* array('query[link]' => $query[$link]))); */
|
||||
|
||||
$query[$link][$table]
|
||||
= $this->gridDataFilterTablesConfig($params, $model, $table);
|
||||
}
|
||||
|
||||
return $query;
|
||||
@@ -351,12 +373,12 @@ class AppController extends Controller {
|
||||
if (!$table)
|
||||
continue;
|
||||
|
||||
$key = $this->gridDataFilterConditionsKey($params, $model, $table, $id);
|
||||
$key = $this->gridDataFilterConditionsKey($params, $model, $tbl, $id);
|
||||
if (!$key)
|
||||
continue;
|
||||
|
||||
$conditions[]
|
||||
= $this->gridDataFilterConditionsStatement($params, $model, $table, $key, $value);
|
||||
= $this->gridDataFilterConditionsStatement($params, $model, $tbl, $key, $value);
|
||||
}
|
||||
|
||||
return $conditions;
|
||||
|
||||
Reference in New Issue
Block a user