r38005 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38004‎ | r38005 | r38006 >
Date:18:10, 24 July 2008
Author:simetrical
Status:old
Tags:
Comment:
Break at 80 columns in some comments. Also improve documentation for $wgArticleRobotPolicies.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -3380,9 +3380,10 @@
33813381 wfDebug( __METHOD__.": [[MediaWiki:hidden-category-category]] is not a valid title!\n" );
33823382 }
33833383 }
3384 - # (bug 8068) Allow control over whether robots index a page. FIXME:
3385 - # __INDEX__ always overrides __NOINDEX__ here! This is not desirable,
3386 - # the last one on the page should win.
 3384+ # (bug 8068) Allow control over whether robots index a page.
 3385+ #
 3386+ # FIXME (bug 14899): __INDEX__ always overrides __NOINDEX__ here! This
 3387+ # is not desirable, the last one on the page should win.
33873388 if( isset( $this->mDoubleUnderscores['noindex'] ) ) {
33883389 $this->mOutput->setIndexPolicy( 'noindex' );
33893390 } elseif( isset( $this->mDoubleUnderscores['index'] ) ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2793,9 +2793,9 @@
27942794 $wgNoFollowNsExceptions = array();
27952795
27962796 /**
2797 - * Default robot policy.
2798 - * The default policy is to encourage indexing and following of links.
2799 - * It may be overridden on a per-namespace and/or per-page basis.
 2797+ * Default robot policy. The default policy is to encourage indexing and fol-
 2798+ * lowing of links. It may be overridden on a per-namespace and/or per-page
 2799+ * basis.
28002800 */
28012801 $wgDefaultRobotPolicy = 'index,follow';
28022802
@@ -2814,12 +2814,21 @@
28152815 $wgNamespaceRobotPolicies = array();
28162816
28172817 /**
2818 - * Robot policies per article.
2819 - * These override the per-namespace robot policies.
2820 - * Must be in the form of an array where the key part is a properly
2821 - * canonicalised text form title and the value is a robot policy.
 2818+ * Robot policies per article. These override the per-namespace robot policies.
 2819+ * Must be in the form of an array where the key part is a properly canonical-
 2820+ * ised text form title and the value is a robot policy.
28222821 * Example:
2823 - * $wgArticleRobotPolicies = array( 'Main Page' => 'noindex' );
 2822+ * $wgArticleRobotPolicies = array( 'Main Page' => 'noindex,follow',
 2823+ * 'User:Bob' => 'index,follow' );
 2824+ * Example that DOES NOT WORK because the names are not canonical text forms:
 2825+ * $wgArticleRobotPolicies = array(
 2826+ * # Underscore, not space!
 2827+ * 'Main_Page' => 'noindex,follow',
 2828+ * # "Project", not the actual project name!
 2829+ * 'Project:X' => 'index,follow',
 2830+ * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false)!
 2831+ * 'abc' => 'noindex,nofollow'
 2832+ * );
28242833 */
28252834 $wgArticleRobotPolicies = array();
28262835
@@ -2833,8 +2842,8 @@
28342843 $wgExemptFromUserRobotsControl = null;
28352844
28362845 /**
2837 - * Specifies the minimal length of a user password. If set to
2838 - * 0, empty passwords are allowed.
 2846+ * Specifies the minimal length of a user password. If set to 0, empty pass-
 2847+ * words are allowed.
28392848 */
28402849 $wgMinimalPasswordLength = 0;
28412850
@@ -2849,9 +2858,8 @@
28502859 $wgSortSpecialPages = true;
28512860
28522861 /**
2853 - * Specify the name of a skin that should not be presented in the
2854 - * list of available skins.
2855 - * Use for blacklisting a skin which you do not want to remove
 2862+ * Specify the name of a skin that should not be presented in the list of a-
 2863+ * vailable skins. Use for blacklisting a skin which you do not want to remove
28562864 * from the .../skins/ directory
28572865 */
28582866 $wgSkipSkin = '';
@@ -2863,7 +2871,8 @@
28642872 $wgDisabledActions = array();
28652873
28662874 /**
2867 - * Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link
 2875+ * Disable redirects to special pages and interwiki redirects, which use a 302
 2876+ * and have no "redirected from" link.
28682877 */
28692878 $wgDisableHardRedirects = false;
28702879
@@ -2874,21 +2883,19 @@
28752884 $wgSorbsUrl = 'http.dnsbl.sorbs.net.';
28762885
28772886 /**
2878 - * Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other
2879 - * methods might say
 2887+ * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
 2888+ * what the other methods might say.
28802889 */
28812890 $wgProxyWhitelist = array();
28822891
28832892 /**
2884 - * Simple rate limiter options to brake edit floods.
2885 - * Maximum number actions allowed in the given number of seconds;
2886 - * after that the violating client receives HTTP 500 error pages
2887 - * until the period elapses.
 2893+ * Simple rate limiter options to brake edit floods. Maximum number actions
 2894+ * allowed in the given number of seconds; after that the violating client re-
 2895+ * ceives HTTP 500 error pages until the period elapses.
28882896 *
28892897 * array( 4, 60 ) for a maximum of 4 hits in 60 seconds.
28902898 *
2891 - * This option set is experimental and likely to change.
2892 - * Requires memcached.
 2899+ * This option set is experimental and likely to change. Requires memcached.
28932900 */
28942901 $wgRateLimits = array(
28952902 'edit' => array(

Status & tagging log