Index: trunk/extensions/Push/api/ApiPush.php |
— | — | @@ -217,9 +217,15 @@ |
218 | 218 | protected function doPush( Title $title, array $revision, array $targets ) { |
219 | 219 | foreach ( $targets as $target ) { |
220 | 220 | $token = $this->getEditToken( $title, $target ); |
221 | | - |
| 221 | + |
222 | 222 | if ( $token !== false ) { |
223 | | - $this->pushToTarget( $title, $revision, $target, $token ); |
| 223 | + $doPush = true; |
| 224 | + |
| 225 | + wfRunHooks( 'PushAPIBeforePush', array( &$title, &$revision, &$target, &$token, &$doPush ) ); |
| 226 | + |
| 227 | + if ( $doPush ) { |
| 228 | + $this->pushToTarget( $title, $revision, $target, $token ); |
| 229 | + } |
224 | 230 | } |
225 | 231 | } |
226 | 232 | } |
Index: trunk/extensions/Push/api/ApiPushImages.php |
— | — | @@ -152,7 +152,13 @@ |
153 | 153 | $token = $this->getEditToken( $title, $target ); |
154 | 154 | |
155 | 155 | if ( $token !== false ) { |
156 | | - $this->pushToTarget( $title, $target, $token ); |
| 156 | + $doPush = true; |
| 157 | + |
| 158 | + wfRunHooks( 'PushAPIBeforeImagePush', array( &$title, &$target, &$token, &$doPush ) ); |
| 159 | + |
| 160 | + if ( $doPush ) { |
| 161 | + $this->pushToTarget( $title, $target, $token ); |
| 162 | + } |
157 | 163 | } |
158 | 164 | } |
159 | 165 | } |