From 4b5df392ec8ccceffbe43302335b88ebf58db8eb Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 25 Dec 2023 16:06:44 +0800 Subject: [PATCH] * Refactor zanode::browseSnapshot. --- module/zanode/control.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/module/zanode/control.php b/module/zanode/control.php index f2a4f701fe..d8486ac9a4 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -370,11 +370,11 @@ class zanode extends control } /** + * 快照列表。 * Browse snapshot. * * @param int $nodeID * @param string $browseType - * @param int $param * @param string $orderBy * @param int $recTotal * @param int $recPerPage @@ -382,21 +382,18 @@ class zanode extends control * @access public * @return void */ - public function browseSnapshot($nodeID, $browseType = 'all', $param = 0, $orderBy = 'id', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function browseSnapshot(int $nodeID, string $browseType = 'all', string $orderBy = 'id', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1) { $this->app->loadLang('zahost'); - $this->app->loadClass('pager', $static = true); + $this->app->loadClass('pager', true); $pager = pager::init($recTotal, $recPerPage, $pageID); - $snapshotList = $this->zanode->getSnapshotList($nodeID, $orderBy, $pager); - $this->view->title = $this->lang->zanode->browseSnapshot; $this->view->nodeID = $nodeID; $this->view->node = $this->zanode->getNodeByID($nodeID); - $this->view->snapshotList = $snapshotList; + $this->view->snapshotList = $this->zanode->getSnapshotList($nodeID, $orderBy, $pager); $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->pager = $pager; - $this->view->param = $param; $this->view->orderBy = $orderBy; $this->view->browseType = $browseType;