From a67fbbfaff72bcab2f1eac0a71568a3097b764a6 Mon Sep 17 00:00:00 2001 From: zhaixiaojian Date: Tue, 13 Aug 2024 15:53:54 +0800 Subject: [PATCH] * [task#125055,done,0.1h,0h] Adjust character alignment. --- module/bug/model.php | 2 +- module/repo/control.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 20865e49bf..19f63f7382 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2099,7 +2099,7 @@ class bugModel extends model public function updateLinkedCommits(int $bugID, int $repoID, array $revisions): bool { if(!$bugID || !$repoID || empty($revisions)) return true; - $bug = $this->dao->select('product')->from(TABLE_BUG)->where('id')->eq($bugID)->fetch(); + $bug = $this->dao->select('product, project')->from(TABLE_BUG)->where('id')->eq($bugID)->fetch(); if(!$bug) return true; foreach($revisions as $revision) { diff --git a/module/repo/control.php b/module/repo/control.php index 3c64c8628b..adad2c1007 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -1992,14 +1992,15 @@ class repo extends control $pageSize = 10; $this->app->loadClass('pager', true); - $pager = new pager(0, $pageSize, 1); + $pager = new pager(0, $pageSize, 1); + $pager->recPerPage = $pageSize; $commits = $this->repo->getCommits($repo, '', $branchID, 'dir', $pager, '', '', null); $retCommits = array(); if(!empty($commits)) { - foreach ($commits as $item) array_push($retCommits, array('commitID'=>$item->revision, 'shortID'=>substr($item->revision,0,7), 'message'=>$item->message)); + foreach ($commits as $item) array_push($retCommits, array('commitID'=>$item->revision, 'shortID'=>substr($item->revision, 0, 10), 'message'=>$item->message)); } echo json_encode($retCommits); }