Revert merge of DismissableSiteNotice into the core (r41679 and subsequent edits...
[lhc/web/wiklou.git] / maintenance / cleanupCaps.php
index f128357..e959d4b 100644 (file)
  *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @author Brion Vibber <brion at pobox.com>
- * @package MediaWiki
- * @subpackage maintenance
+ * @ingroup maintenance
  */
 
 $options = array( 'dry-run' );
@@ -34,6 +34,9 @@ $options = array( 'dry-run' );
 require_once( 'commandLine.inc' );
 require_once( 'FiveUpgrade.inc' );
 
+/**
+ * @ingroup Maintenance
+ */
 class CapsCleanup extends FiveUpgrade {
        function CapsCleanup( $dryrun = false, $namespace=0 ) {
                parent::FiveUpgrade();
@@ -100,7 +103,7 @@ class CapsCleanup extends FiveUpgrade {
                $result = $this->dbr->query( $sql, $fname );
 
                while( $row = $this->dbr->fetchObject( $result ) ) {
-                       $updated = call_user_func( $callback, $row );
+                       call_user_func( $callback, $row );
                }
                $this->log( "Finished $table... $this->updated of $this->processed rows updated" );
                $this->dbr->freeResult( $result );
@@ -137,7 +140,6 @@ class CapsCleanup extends FiveUpgrade {
 
                        if( $row->page_namespace == $this->namespace ) {
                                $talk = $target->getTalkPage();
-                               $xrow = $row;
                                $row->page_namespace = $talk->getNamespace();
                                if( $talk->exists() ) {
                                        return $this->processPage( $row );
@@ -154,5 +156,3 @@ $wgUser->setName( 'Conversion script' );
 $ns = isset( $options['namespace'] ) ? $options['namespace'] : 0;
 $caps = new CapsCleanup( isset( $options['dry-run'] ), $ns );
 $caps->cleanup();
-
-?>