From dc9c6eb9030a172162916ee0267042ea15bbbbca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 26 Feb 2018 16:03:06 +0100 Subject: [PATCH] Add afterInitObjectList event to MultipleLinkPage This event basically is equivalent to the calculateNumberOfPages event. It does, however, provide a less ambiguous place for additional SQL conditions added by plugins: Pages that extend MultipleLinkPage add their conditions in initObjectList, plugins can use afterInitObjectList instead of calculateNumberOfPages for clarity. --- wcfsetup/install/files/lib/page/MultipleLinkPage.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php b/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php index 45df8c3fdc..bc106983b0 100644 --- a/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php +++ b/wcfsetup/install/files/lib/page/MultipleLinkPage.class.php @@ -110,6 +110,8 @@ abstract class MultipleLinkPage extends AbstractPage { // initialize database object list $this->initObjectList(); + EventHandler::getInstance()->fireAction($this, 'afterInitObjectList'); + // calculates page number $this->calculateNumberOfPages(); -- 2.20.1