Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1182,9 +1182,6 @@ |
1183 | 1183 | 'protect-summary-cascade', |
1184 | 1184 | 'protect-expiring', |
1185 | 1185 | 'protect-cascade', |
1186 | | - 'protect-robotspolicy', |
1187 | | - 'protect-robots-noindex', |
1188 | | - 'protect-robots-nofollow', |
1189 | 1186 | 'restriction-type', |
1190 | 1187 | 'restriction-level', |
1191 | 1188 | 'minimum-size', |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -43,7 +43,6 @@ |
44 | 44 | // but the db allows multiples separated by commas. |
45 | 45 | $this->mRestrictions[$action] = implode( '', $this->mTitle->getRestrictions( $action ) ); |
46 | 46 | } |
47 | | - $this->mRestrictions['robots'] = implode( ',', $this->mTitle->getRestrictions( 'robots' ) ); |
48 | 47 | |
49 | 48 | $this->mCascade = $this->mTitle->areRestrictionsCascading(); |
50 | 49 | |
— | — | @@ -73,17 +72,9 @@ |
74 | 73 | $this->mRestrictions[$action] = $val; |
75 | 74 | } |
76 | 75 | } |
77 | | - |
78 | | - // Read checkboxes only if user is allowed to change robots policy, otherwise keep previous policy |
79 | | - if ( $wgUser->isAllowed( 'editrobots' ) ) { |
80 | | - $robotspolicy = $wgRequest->getBool( 'mwProtect-robots-noindex' ) ? 'noindex' : 'index'; |
81 | | - $robotspolicy .= $wgRequest->getBool( 'mwProtect-robots-nofollow' ) ? ',nofollow' : ',follow'; |
82 | | - // 'index,follow' is default, no need to set this explicitly at this point; is done at Article::view() |
83 | | - $this->mRestrictions['robots'] = ( $robotspolicy == 'index,follow' ) ? '' : $robotspolicy; |
84 | | - } |
85 | 76 | } |
86 | 77 | } |
87 | | - |
| 78 | + |
88 | 79 | function execute() { |
89 | 80 | global $wgRequest; |
90 | 81 | if( $wgRequest->wasPosted() ) { |
— | — | @@ -208,7 +199,7 @@ |
209 | 200 | } |
210 | 201 | |
211 | 202 | function buildForm() { |
212 | | - global $wgUser, $wgRestrictionTypes; |
| 203 | + global $wgUser; |
213 | 204 | |
214 | 205 | $out = ''; |
215 | 206 | if( !$this->disabled ) { |
— | — | @@ -232,17 +223,14 @@ |
233 | 224 | $out .= "<tr>\n"; |
234 | 225 | foreach( $this->mRestrictions as $action => $required ) { |
235 | 226 | /* Not all languages have V_x <-> N_x relation */ |
236 | | - if ( in_array( $action, $wgRestrictionTypes ) ) |
237 | | - $out .= "<th>" . wfMsgHtml( 'restriction-' . $action ) . "</th>\n"; |
| 227 | + $out .= "<th>" . wfMsgHtml( 'restriction-' . $action ) . "</th>\n"; |
238 | 228 | } |
239 | 229 | $out .= "</tr>\n"; |
240 | 230 | $out .= "<tr>\n"; |
241 | 231 | foreach( $this->mRestrictions as $action => $selected ) { |
242 | | - if ( in_array( $action, $wgRestrictionTypes ) ) { |
243 | | - $out .= "<td>\n"; |
244 | | - $out .= $this->buildSelector( $action, $selected ); |
245 | | - $out .= "</td>\n"; |
246 | | - } |
| 232 | + $out .= "<td>\n"; |
| 233 | + $out .= $this->buildSelector( $action, $selected ); |
| 234 | + $out .= "</td>\n"; |
247 | 235 | } |
248 | 236 | $out .= "</tr>\n"; |
249 | 237 | |
— | — | @@ -258,7 +246,6 @@ |
259 | 247 | if( $wgEnableCascadingProtection ) |
260 | 248 | $out .= '<tr><td></td><td>' . $this->buildCascadeInput() . "</td></tr>\n"; |
261 | 249 | |
262 | | - $out .= $this->buildRobotsInput(); |
263 | 250 | $out .= $this->buildExpiryInput(); |
264 | 251 | |
265 | 252 | if( !$this->disabled ) { |
— | — | @@ -328,21 +315,6 @@ |
329 | 316 | return $ci; |
330 | 317 | } |
331 | 318 | |
332 | | - function buildRobotsInput() { |
333 | | - global $wgUser, $wgContLang; |
334 | | - $robotsallowed = $wgUser->isAllowed( 'editrobots' ) ? array() : array( 'disabled' => 'disabled' ); |
335 | | - $noindexset = ( isset( $this->mRestrictions['robots'] ) && strstr( $this->mRestrictions['robots'], 'noindex' ) ) ? true : false; |
336 | | - $nofollowset = ( isset( $this->mRestrictions['robots'] ) && strstr( $this->mRestrictions['robots'], 'nofollow' ) ) ? true : false; |
337 | | - $ret = "<tr><td align=\"right\">"; |
338 | | - $ret .= '<label>' . wfMsgExt( 'protect-robotspolicy', array( 'parseinline' ) ) . '</label>'; |
339 | | - $ret .= "</td><td align=\"left\" width=\"60\">"; |
340 | | - $ret .= Xml::checkLabel( wfMsgHtml( 'protect-robots-noindex' ), 'mwProtect-robots-noindex', 'mwProtect-robots-noindex', $noindexset, $robotsallowed ); |
341 | | - $ret .= $wgContLang->getDirMark(); |
342 | | - $ret .= Xml::checkLabel( wfMsgHtml( 'protect-robots-nofollow' ), 'mwProtect-robots-nofollow', 'mwProtect-robots-nofollow', $nofollowset, $robotsallowed ); |
343 | | - $ret .= "</td></tr>"; |
344 | | - return $ret; |
345 | | - } |
346 | | - |
347 | 319 | function buildExpiryInput() { |
348 | 320 | $attribs = array( 'id' => 'expires' ) + $this->disabledAttrib; |
349 | 321 | return '<tr>' |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -641,8 +641,6 @@ |
642 | 642 | } elseif( isset( $wgNamespaceRobotPolicies[$ns] ) ) { |
643 | 643 | # Honour customised robot policies for this namespace |
644 | 644 | $policy = $wgNamespaceRobotPolicies[$ns]; |
645 | | - } elseif ( $this->mTitle->getRestrictions( 'robots' ) ) { |
646 | | - $policy = implode( ',', $this->mTitle->getRestrictions( 'robots' ) ); |
647 | 645 | } else { |
648 | 646 | # Default to encourage indexing and following links |
649 | 647 | $policy = 'index,follow'; |
— | — | @@ -1677,7 +1675,6 @@ |
1678 | 1676 | $current = array(); |
1679 | 1677 | foreach( $wgRestrictionTypes as $action ) |
1680 | 1678 | $current[$action] = implode( '', $this->mTitle->getRestrictions( $action ) ); |
1681 | | - $current['robots'] = implode( '', $this->mTitle->getRestrictions( 'robots' ) ); |
1682 | 1679 | |
1683 | 1680 | $current = Article::flattenRestrictions( $current ); |
1684 | 1681 | $updated = Article::flattenRestrictions( $limit ); |
— | — | @@ -1713,9 +1710,7 @@ |
1714 | 1711 | foreach( $limit as $action => $restrictions ) { |
1715 | 1712 | # Check if the group level required to edit also can protect pages |
1716 | 1713 | # Otherwise, people who cannot normally protect can "protect" pages via transclusion |
1717 | | - if ( in_array( $restrictions, $wgRestrictionTypes ) ) { |
1718 | | - $cascade = ( $cascade && isset($wgGroupPermissions[$restrictions]['protect']) && $wgGroupPermissions[$restrictions]['protect'] ); |
1719 | | - } |
| 1714 | + $cascade = ( $cascade && isset($wgGroupPermissions[$restrictions]['protect']) && $wgGroupPermissions[$restrictions]['protect'] ); |
1720 | 1715 | } |
1721 | 1716 | |
1722 | 1717 | $cascade_description = ''; |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -940,9 +940,6 @@ |
941 | 941 | if( $this->getNamespace() == NS_SPECIAL ) |
942 | 942 | return true; |
943 | 943 | |
944 | | - if ( $this->getRestrictions( 'robots' ) && $this->getRestrictions( 'robots' ) != '' ) |
945 | | - return true; |
946 | | - |
947 | 944 | # Check regular protection levels |
948 | 945 | if( $action == 'edit' || $action == '' ) { |
949 | 946 | $r = $this->getRestrictions( 'edit' ); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1063,7 +1063,6 @@ |
1064 | 1064 | $wgGroupPermissions['sysop']['upload_by_url'] = true; |
1065 | 1065 | $wgGroupPermissions['sysop']['ipblock-exempt'] = true; |
1066 | 1066 | $wgGroupPermissions['sysop']['blockemail'] = true; |
1067 | | -$wgGroupPermissions['sysop']['editrobots'] = true; |
1068 | 1067 | |
1069 | 1068 | // Permission to change users' group assignments |
1070 | 1069 | $wgGroupPermissions['bureaucrat']['userrights'] = true; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1839,9 +1839,6 @@ |
1840 | 1840 | 'protect-summary-cascade' => 'cascading', |
1841 | 1841 | 'protect-expiring' => 'expires $1 (UTC)', |
1842 | 1842 | 'protect-cascade' => 'Protect pages included in this page (cascading protection)', |
1843 | | -'protect-robotspolicy' => 'Robot policy:', |
1844 | | -'protect-robots-noindex' => 'Do not index', |
1845 | | -'protect-robots-nofollow' => 'Do not follow links', |
1846 | 1843 | 'restriction-type' => 'Permission:', |
1847 | 1844 | 'restriction-level' => 'Restriction level:', |
1848 | 1845 | 'minimum-size' => 'Min size', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -1440,9 +1440,6 @@ |
1441 | 1441 | 'protect-summary-cascade' => 'kaskadierend', |
1442 | 1442 | 'protect-expiring' => 'bis $1 (UTC)', |
1443 | 1443 | 'protect-cascade' => 'Kaskadierende Sperre – alle in diese Seite eingebundenen Vorlagen werden ebenfalls gesperrt.', |
1444 | | -'protect-robotspolicy' => 'Anweisung für Suchroboter:', |
1445 | | -'protect-robots-noindex' => 'nicht indizieren (noindex)', |
1446 | | -'protect-robots-nofollow' => 'Links nicht folgen (nofollow)', |
1447 | 1444 | 'restriction-type' => 'Schutzstatus', |
1448 | 1445 | 'restriction-level' => 'Schutzhöhe', |
1449 | 1446 | 'minimum-size' => 'Mindestgröße:', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -95,8 +95,6 @@ |
96 | 96 | * Throw a showstopper exception when a hook function fails to return a value. |
97 | 97 | Forgetting to give a 'true' return value is a very common error which tends |
98 | 98 | to cause hard-to-track-down interactions between extensions. |
99 | | -* (bug 9415) Added options to Special:Protect to allow setting of per-page robot |
100 | | - policies. This can be done only by users with the 'editrobots' permission |
101 | 99 | * Use $wgJobClasses to determine the correct Job to instantiate for a particular |
102 | 100 | queued task; allows extensions to introduce custom jobs |
103 | 101 | |