/**
* Show a form for filtering namespace and username
*
- * @param $par String
- * @return String
+ * @param string $par
+ * @return string
*/
public function execute( $par ) {
$this->setHeaders();
$rev1 = self::revOrTitle( $data['Revision1'], $data['Page1'] );
$rev2 = self::revOrTitle( $data['Revision2'], $data['Page2'] );
- if( $rev1 && $rev2 ) {
+ if ( $rev1 && $rev2 ) {
$revision = Revision::newFromId( $rev1 );
if ( $revision ) { // NOTE: $rev1 was already checked, should exist.
}
public static function revOrTitle( $revision, $title ) {
- if( $revision ) {
+ if ( $revision ) {
return $revision;
- } elseif( $title ) {
+ } elseif ( $title ) {
$title = Title::newFromText( $title );
- if( $title instanceof Title ) {
+ if ( $title instanceof Title ) {
return $title->getLatestRevID();
}
}
+
return null;
}
if ( !$title->exists() ) {
return $this->msg( 'compare-title-not-exists' )->parseAsBlock();
}
+
return true;
}
if ( $revision === null ) {
return $this->msg( 'compare-revision-not-exists' )->parseAsBlock();
}
+
return true;
}
+
+ protected function getGroupName() {
+ return 'pagetools';
+ }
}