https://bugzilla.wikimedia.org/show_bug.cgi?id=14900
Happy-melon <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5670 is|0 |1 obsolete| | --- Comment #3 from Happy-melon <[email protected]> 2009-07-19 15:21:53 UTC --- Created an attachment (id=6366) --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6366) Updated patch, against r53416 Updated patch. This moves all robots handling to a new Article::setRobotPolicyForView (reborn from Article::getRobotPolicyForView ), which uses array_merge to build a single policy from the various layers of config. This has the nice freebie that you can now say something like: $wgDefaultRobotPolicy = 'index, nofollow'; $wgNamespaceRobotPolicies[NS_USER] = 'noindex'; And the 'nofollow' attribute will be inherited from the default policy, which would be expected behaviour. Currently the policy would be lost and the hardcoded default of 'follow' would be used... :( The patch also cleans up Article::view() a little, to avoid the fourfold duplication of the do-this-when-the-body-has-been-constructed section; prompted because the call to setRobotPolicyForView() is moved there, so it has access to the parser output (which is now stored as a member variable $mParserOutput, rather than discarded) to check for __NOINDEX__ tags. I've also encapsulated the "do we allow __NOINDEX__ tags in this namespace" logic in Title::canUseNoindex(), so it can be called from both Article::setRobotPolicyForView() and the Parser. This makes it trivial to resolve bug16979, which I've done in this patch; the modifications to Parser.php aren't strictly necessary to resolve *this* bug, but it's quite a nice (and useful) change. My first efforts at the change involved using the page_props table, which might still be a good idea. This led me to improve the documentation for $wgPagePropLinkInvalidations, which I've left in because at the moment it's totally rubbish. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
