Francois Gouget : testbot/web: Use SimpleCollectionPage for the branches page.
Alexandre Julliard
julliard at winehq.org
Fri Apr 1 15:30:27 CDT 2022
Module: tools
Branch: master
Commit: eef76aa218e60a0400dde666741d38f5a35f425d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=eef76aa218e60a0400dde666741d38f5a35f425d
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Apr 1 17:10:34 2022 +0200
testbot/web: Use SimpleCollectionPage for the branches page.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/admin/BranchesList.pl | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
diff --git a/testbot/web/admin/BranchesList.pl b/testbot/web/admin/BranchesList.pl
index a325818..0370237 100644
--- a/testbot/web/admin/BranchesList.pl
+++ b/testbot/web/admin/BranchesList.pl
@@ -2,6 +2,7 @@
# Branch list page
#
# Copyright 2009 Ge van Geldorp
+# Copyright 2022 Francois Gouget
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,33 +20,11 @@
use strict;
-package BranchesListPage;
-
-use ObjectModel::CGI::CollectionPage;
-our @ISA = qw(ObjectModel::CGI::CollectionPage);
+package main;
+use ObjectModel::CGI::SimpleCollectionPage;
use WineTestBot::Branches;
-
-sub _initialize($$$)
-{
- my ($self, $Request, $RequiredRole) = @_;
-
- $self->SUPER::_initialize($Request, $RequiredRole, CreateBranches());
-}
-
-sub SortKeys($$$)
-{
- my ($self, $CollectionBlock, $Keys) = @_;
-
- my @SortedKeys = sort { $a cmp $b } @$Keys;
- return \@SortedKeys;
-}
-
-
-package main;
-
my $Request = shift;
-
-my $BranchesListPage = BranchesListPage->new($Request, "admin");
-$BranchesListPage->GeneratePage();
+my $Page = ObjectModel::CGI::SimpleCollectionPage->new($Request, "admin", CreateBranches());
+$Page->GeneratePage();
More information about the wine-cvs
mailing list