* [perf] Rename the processParams parameter to cacheSearchParams.
This commit is contained in:
@@ -4172,14 +4172,14 @@ class executionModel extends model
|
||||
* @param array $executions
|
||||
* @param int $queryID
|
||||
* @param string $actionURL
|
||||
* @param bool $processParams 是否处理搜索参数。默认不处理可以提高性能,构造搜索表单时再处理。
|
||||
* @param bool $cacheSearchParams 是否缓存搜索参数。默认缓存可以提高性能,构造搜索表单时再加载真实值。
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildTaskSearchForm(int $executionID, array $executions, int $queryID, string $actionURL, bool $processParams = false)
|
||||
public function buildTaskSearchForm(int $executionID, array $executions, int $queryID, string $actionURL, bool $cacheSearchParams = true)
|
||||
{
|
||||
$module = $this->config->execution->search['module'];
|
||||
if(!$processParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args());
|
||||
if($cacheSearchParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args());
|
||||
|
||||
$showAll = empty($executionID) && empty($executions) ? true : false;
|
||||
if($showAll)
|
||||
|
||||
+3
-3
@@ -449,14 +449,14 @@ class myModel extends model
|
||||
* @param int $queryID
|
||||
* @param string $actionURL
|
||||
* @param string $rawMethod
|
||||
* @param bool $processParams 是否处理搜索参数。默认不处理可以提高性能,构造搜索表单时再处理。
|
||||
* @param bool $cacheSearchParams 是否缓存搜索参数。默认缓存可以提高性能,构造搜索表单时再加载真实值。
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildTaskSearchForm(int $queryID, string $actionURL, string $rawMethod, bool $processParams = false)
|
||||
public function buildTaskSearchForm(int $queryID, string $actionURL, string $rawMethod, bool $cacheSearchParams = true)
|
||||
{
|
||||
$module = $rawMethod . 'Task';
|
||||
if(!$processParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args());
|
||||
if($cacheSearchParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args());
|
||||
|
||||
$this->loadModel('execution');
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class searchZen extends search
|
||||
$funcArgs = $_SESSION[$searchParams]['funcArgs'] ?? [];
|
||||
if(!$funcModel || !$funcName) return false;
|
||||
|
||||
$funcArgs['processParams'] = true; // 添加处理搜索参数的标记。Add a flag to process search parameters.
|
||||
$funcArgs['cacheSearchParams'] = false; // 不缓存搜索参数以加载真实值。Do not cache search parameters to load real values.
|
||||
$this->loadModel($funcModel)->$funcName(...$funcArgs);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user