Merge branch ztflow-sunguangming-dev/task-144288#sunguangming of zentao/zentaopms (#9086)
This commit is contained in:
@@ -847,7 +847,7 @@ class baseDAO
|
||||
* @access public
|
||||
* @return string the sql string after process.
|
||||
*/
|
||||
public function processSQL()
|
||||
public function processSQL($filterTpl = true)
|
||||
{
|
||||
$sql = $this->sqlobj->get();
|
||||
|
||||
@@ -882,7 +882,7 @@ class baseDAO
|
||||
|
||||
$sql .= '(`' . implode('`,`', array_keys($values)) . '`)' . ' VALUES(' . implode(',', $values) . ')';
|
||||
}
|
||||
elseif($this->method == 'select' && dao::$filterTpl == 'always')
|
||||
elseif($this->method == 'select' && dao::$filterTpl == 'always' && $filterTpl)
|
||||
{
|
||||
/* 过滤模板类型的数据 */
|
||||
foreach(array('project', 'task') as $table)
|
||||
@@ -1294,9 +1294,7 @@ class baseDAO
|
||||
*/
|
||||
public function fetch($field = '')
|
||||
{
|
||||
$this->filterTpl('skip');
|
||||
|
||||
$sql = $this->processSQL();
|
||||
$sql = $this->processSQL(false);
|
||||
$key = $this->createCacheKey('fetch', md5($sql));
|
||||
$result = $this->getCache($key);
|
||||
if($result === self::CACHE_MISS)
|
||||
|
||||
@@ -127,10 +127,10 @@ class docModel extends model
|
||||
*/
|
||||
public function getLibs(string $type = '', string $extra = '', int|string $appendLibs = '', int $objectID = 0, string $excludeType = ''): array
|
||||
{
|
||||
dao::$filterTpl = false;
|
||||
dao::$filterTpl = 'skip';
|
||||
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$projects = $this->loadModel('project')->getPairsByProgram(0, 'all', false, 'order_asc');
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'multiple,leaf');
|
||||
$waterfalls = array();
|
||||
if(empty($objectID) && $type == 'execution')
|
||||
|
||||
Reference in New Issue
Block a user