[tools] testbot/web: Use SimpleCollectionPage for the branches page.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> --- 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 a325818e5..037023762 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(); -- 2.30.2
participants (1)
-
Francois Gouget