Reduced indentation levels, broke long lines
[lhc/web/wiklou.git] / includes / specials / SpecialEditWatchlist.php
index 6d5205a..d2838e0 100644 (file)
@@ -77,6 +77,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                }
 
                $this->checkPermissions();
+               $this->checkReadOnly();
 
                $this->outputHeader();
 
@@ -204,7 +205,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         * @param $output String
         */
        private function showTitles( $titles, &$output ) {
@@ -289,7 +290,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
 
                $res = $dbr->select(
                        array( 'watchlist' ),
-                       array( 'wl_namespace',  'wl_title' ),
+                       array( 'wl_namespace', 'wl_title' ),
                        array( 'wl_user' => $this->getUser()->getId() ),
                        __METHOD__,
                        array( 'ORDER BY' => array( 'wl_namespace', 'wl_title' ) )
@@ -312,7 +313,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         *
         * @param Title $title
         * @param int $namespace
-        * @param String $dbKey
+        * @param string $dbKey
         * @return bool: Whether this item is valid
         */
        private function checkTitle( $title, $namespace, $dbKey ) {
@@ -381,7 +382,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles Array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         */
        private function watchTitles( $titles ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -414,7 +415,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param $titles Array of strings, or Title objects
+        * @param array $titles of strings, or Title objects
         */
        private function unwatchTitles( $titles ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -478,7 +479,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
 
                foreach( $this->getWatchlistInfo() as $namespace => $pages ) {
                        if ( $namespace >= 0 ) {
-                               $fields['TitlesNs'.$namespace] = array(
+                               $fields['TitlesNs' . $namespace] = array(
                                        'class' => 'EditWatchlistCheckboxSeriesField',
                                        'options' => array(),
                                        'section' => "ns$namespace",
@@ -489,7 +490,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                                $title = Title::makeTitleSafe( $namespace, $dbkey );
                                if ( $this->checkTitle( $title, $namespace, $dbkey ) ) {
                                        $text = $this->buildRemoveLine( $title );
-                                       $fields['TitlesNs'.$namespace]['options'][$text] = $title->getPrefixedText();
+                                       $fields['TitlesNs' . $namespace]['options'][$text] = $title->getPrefixedText();
                                        $count++;
                                }
                        }
@@ -519,7 +520,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $form->setTitle( $this->getTitle() );
                $form->setSubmitTextMsg( 'watchlistedit-normal-submit' );
                # Used message keys: 'accesskey-watchlistedit-normal-submit', 'tooltip-watchlistedit-normal-submit'
-               $form->setSubmitTooltip('watchlistedit-normal-submit');
+               $form->setSubmitTooltip( 'watchlistedit-normal-submit' );
                $form->setWrapperLegendMsg( 'watchlistedit-normal-legend' );
                $form->addHeaderText( $this->msg( 'watchlistedit-normal-explain' )->parse() );
                $form->setSubmitCallback( array( $this, 'submitNormal' ) );
@@ -577,7 +578,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $form->setTitle( $this->getTitle( 'raw' ) );
                $form->setSubmitTextMsg( 'watchlistedit-raw-submit' );
                # Used message keys: 'accesskey-watchlistedit-raw-submit', 'tooltip-watchlistedit-raw-submit'
-               $form->setSubmitTooltip('watchlistedit-raw-submit');
+               $form->setSubmitTooltip( 'watchlistedit-raw-submit' );
                $form->setWrapperLegendMsg( 'watchlistedit-raw-legend' );
                $form->addHeaderText( $this->msg( 'watchlistedit-raw-explain' )->parse() );
                $form->setSubmitCallback( array( $this, 'submitRaw' ) );
@@ -667,8 +668,8 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField {
         * form is open (bug 32126), but we know that invalid items will
         * be harmless so we can override it here.
         *
-        * @param $value String the value the field was submitted with
-        * @param $alldata Array the data collected from the form
+        * @param string $value the value the field was submitted with
+        * @param array $alldata the data collected from the form
         * @return Mixed Bool true on success, or String error to display.
         */
        function validate( $value, $alldata ) {