Index: trunk/phase3/includes/Defines.php |
— | — | @@ -224,3 +224,5 @@ |
225 | 225 | define( 'APCOND_AGE', 2 ); |
226 | 226 | define( 'APCOND_EMAILCONFIRMED', 3 ); |
227 | 227 | define( 'APCOND_INGROUPS', 4 ); |
| 228 | +define( 'APCOND_ISIP', 5 ); |
| 229 | +define( 'APCOND_IPINRANGE', 6 ); |
Index: trunk/phase3/includes/Autopromote.php |
— | — | @@ -109,6 +109,10 @@ |
110 | 110 | case APCOND_INGROUPS: |
111 | 111 | $groups = array_slice( $cond, 1 ); |
112 | 112 | return count( array_intersect( $groups, $user->getGroups() ) ) == count( $groups ); |
| 113 | + case APCOND_ISIP: |
| 114 | + return $cond[1] == wfGetIP(); |
| 115 | + case APCOND_IPINRANGE: |
| 116 | + return IP::isInRange( wfGetIP(), $cond[1] ); |
113 | 117 | default: |
114 | 118 | $result = null; |
115 | 119 | wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -230,6 +230,8 @@ |
231 | 231 | * (bug 16635) The "view and edit watchlist" page (Special:Watchlist/edit) now |
232 | 232 | includes a table of contents |
233 | 233 | * File objects returned by wfFindFile() are now cached by default |
| 234 | +* (bug 7492) Rights can now be assigned to specific IP addresses and ranges by |
| 235 | + using $wgAutopromote (new defines: APCOND_ISIP and APCOND_IPINRANGE) |
234 | 236 | |
235 | 237 | === Bug fixes in 1.14 === |
236 | 238 | |