(bug 16865) Access to pages via "curid" parameter should include meta noindex
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Jan 2009 05:51:15 +0000 (05:51 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Jan 2009 05:51:15 +0000 (05:51 +0000)
includes/Article.php

index 72cc880..74bf29c 100644 (file)
@@ -850,6 +850,10 @@ class Article {
                                wfProfileOut( __METHOD__ );
                                return;
                        }
+                       
+                       # For ?curid=x urls, disallow indexing
+                       if( $wgRequest->getInt('curid') )
+                               $wgOut->setRobotPolicy( 'noindex,follow' );
 
                        # We're looking at an old revision
                        if( !empty( $oldid ) ) {