From a5c9c9607e034a00edc79146ec778e3d9c05e50a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Sat, 18 Jul 2015 14:51:07 -0500 Subject: [PATCH] Add public keywords to the QueryPage base class A lot more methods do not have visibility keywords. Some probably should be private, a lot need to be protected, but all this will be a breaking change. In this patch I'm focusing on methods that are already used as public methods. The added public keyword is not a breaking change because it's the default anyway. Change-Id: I52e34209557b00f97a4e68250afbeb7647b64146 --- includes/specialpage/QueryPage.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/specialpage/QueryPage.php b/includes/specialpage/QueryPage.php index 69e1d8cd6b..3c8b74201b 100644 --- a/includes/specialpage/QueryPage.php +++ b/includes/specialpage/QueryPage.php @@ -141,7 +141,7 @@ abstract class QueryPage extends SpecialPage { * @return array * @since 1.18 */ - function getQueryInfo() { + public function getQueryInfo() { return null; } @@ -178,7 +178,7 @@ abstract class QueryPage extends SpecialPage { * @return bool * @since 1.18 */ - function usesTimestamps() { + public function usesTimestamps() { return false; } @@ -198,7 +198,7 @@ abstract class QueryPage extends SpecialPage { * * @return bool */ - function isExpensive() { + public function isExpensive() { return $this->getConfig()->get( 'DisableQueryPages' ); } @@ -219,7 +219,7 @@ abstract class QueryPage extends SpecialPage { * * @return bool */ - function isCached() { + public function isCached() { return $this->isExpensive() && $this->getConfig()->get( 'MiserMode' ); } @@ -294,7 +294,7 @@ abstract class QueryPage extends SpecialPage { * @throws DBError|Exception * @return bool|int */ - function recache( $limit, $ignoreErrors = true ) { + public function recache( $limit, $ignoreErrors = true ) { if ( !$this->isCacheable() ) { return 0; } @@ -370,7 +370,7 @@ abstract class QueryPage extends SpecialPage { * @return ResultWrapper * @since 1.18 */ - function reallyDoQuery( $limit, $offset = false ) { + public function reallyDoQuery( $limit, $offset = false ) { $fname = get_class( $this ) . "::reallyDoQuery"; $dbr = $this->getRecacheDB(); $query = $this->getQueryInfo(); @@ -421,7 +421,7 @@ abstract class QueryPage extends SpecialPage { * @param int|bool $limit * @return ResultWrapper */ - function doQuery( $offset = false, $limit = false ) { + public function doQuery( $offset = false, $limit = false ) { if ( $this->isCached() && $this->isCacheable() ) { return $this->fetchFromCache( $limit, $offset ); } else { @@ -436,7 +436,7 @@ abstract class QueryPage extends SpecialPage { * @return ResultWrapper * @since 1.18 */ - function fetchFromCache( $limit, $offset = false ) { + public function fetchFromCache( $limit, $offset = false ) { $dbr = wfGetDB( DB_SLAVE ); $options = array(); if ( $limit !== false ) { @@ -487,7 +487,7 @@ abstract class QueryPage extends SpecialPage { * real, honest-to-gosh query page. * @param string $par */ - function execute( $par ) { + public function execute( $par ) { $user = $this->getUser(); if ( !$this->userCanExecute( $user ) ) { $this->displayRestrictionError(); -- 2.20.1