The Video extension adds video support to Special:Undelete by subclassing
the SpecialUndelete class so that end-users don't need to hack core.
Currently Video's SpecialUndeleteWithVideoSupport.php duplicates
significant chunks of core SpecialUndelete.php because many
SpecialUndelete methods are private.
Change-Id: Ieec6c297011f2b50027840abd335b9efd54f2158
* @param User $user
* @return bool
*/
* @param User $user
* @return bool
*/
- private function isAllowed( $permission, User $user = null ) {
+ protected function isAllowed( $permission, User $user = null ) {
$user = $user ? : $this->getUser();
if ( $this->mTargetObj !== null ) {
return $this->mTargetObj->userCan( $permission, $user );
$user = $user ? : $this->getUser();
if ( $this->mTargetObj !== null ) {
return $this->mTargetObj->userCan( $permission, $user );
$repo->streamFile( $path );
}
$repo->streamFile( $path );
}
- private function showHistory() {
+ protected function showHistory() {
$out = $this->getOutput();
if ( $this->mAllowed ) {
$out->addModules( 'mediawiki.special.undelete' );
$out = $this->getOutput();
if ( $this->mAllowed ) {
$out->addModules( 'mediawiki.special.undelete' );
- private function formatRevisionRow( $row, $earliestLiveTime, $remaining ) {
+ protected function formatRevisionRow( $row, $earliestLiveTime, $remaining ) {
$rev = Revision::newFromArchiveRow( $row,
array(
'title' => $this->mTargetObj
$rev = Revision::newFromArchiveRow( $row,
array(
'title' => $this->mTargetObj