* [perf] Rename the processParams parameter to cacheSearchParams.

This commit is contained in:
liugang
2025-08-18 09:09:10 +08:00
parent eb56003159
commit a2227c2e0d
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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
View File
@@ -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');
+1 -1
View File
@@ -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;
}