* Try to exec sql, if error return, fix user upgrade zentao bug.
This commit is contained in:
@@ -241,6 +241,10 @@ class pivotModel extends model
|
||||
}
|
||||
$querySQL = $this->chart->parseSqlVars($sql, $filters);
|
||||
|
||||
$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
|
||||
$stmt = $this->dbh->query($querySQL);
|
||||
if(!$stmt) return $pivot;
|
||||
|
||||
$columns = $this->dataview->getColumns($querySQL);
|
||||
$columnFields = array();
|
||||
foreach($columns as $column => $type) $columnFields[$column] = $column;
|
||||
|
||||
@@ -9363,7 +9363,7 @@ class upgradeModel extends model
|
||||
|
||||
foreach($pivotList as $pivotID)
|
||||
{
|
||||
$pivot = $this->pivot->getbyID($pivotID);
|
||||
$pivot = $this->pivot->getByID($pivotID);
|
||||
$sql = $this->chart->parseSqlVars($pivot->sql, $pivot->filters);
|
||||
$stage = $pivot->stage;
|
||||
if($stage == 'draft') continue;
|
||||
|
||||
Reference in New Issue
Block a user