Index: branches/REL1_18/phase3/includes/SpecialPageFactory.php |
— | — | @@ -398,12 +398,12 @@ |
399 | 399 | * page, and true if it was successful. |
400 | 400 | * |
401 | 401 | * @param $title Title object |
402 | | - * @param $context RequestContext |
| 402 | + * @param $context IContextSource |
403 | 403 | * @param $including Bool output is being captured for use in {{special:whatever}} |
404 | 404 | * |
405 | 405 | * @return bool |
406 | 406 | */ |
407 | | - public static function executePath( Title &$title, RequestContext &$context, $including = false ) { |
| 407 | + public static function executePath( Title &$title, IContextSource &$context, $including = false ) { |
408 | 408 | wfProfileIn( __METHOD__ ); |
409 | 409 | |
410 | 410 | // @todo FIXME: Redirects broken due to this call |
Property changes on: branches/REL1_18/phase3/includes/SpecialPageFactory.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
411 | 411 | Merged /trunk/phase3/includes/SpecialPageFactory.php:r97159 |
Index: branches/REL1_18/phase3/includes/Article.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | */ |
25 | 25 | |
26 | 26 | /** |
27 | | - * @var RequestContext |
| 27 | + * @var IContextSource |
28 | 28 | */ |
29 | 29 | protected $mContext; |
30 | 30 | |
— | — | @@ -88,10 +88,10 @@ |
89 | 89 | * Create an Article object of the appropriate class for the given page. |
90 | 90 | * |
91 | 91 | * @param $title Title |
92 | | - * @param $context RequestContext |
| 92 | + * @param $context IContextSource |
93 | 93 | * @return Article object |
94 | 94 | */ |
95 | | - public static function newFromTitle( $title, RequestContext $context ) { |
| 95 | + public static function newFromTitle( $title, IContextSource $context ) { |
96 | 96 | if ( NS_MEDIA == $title->getNamespace() ) { |
97 | 97 | // FIXME: where should this go? |
98 | 98 | $title = Title::makeTitle( NS_FILE, $title->getDBkey() ); |
— | — | @@ -1852,7 +1852,7 @@ |
1853 | 1853 | /** |
1854 | 1854 | * Sets the context this Article is executed in |
1855 | 1855 | * |
1856 | | - * @param $context RequestContext |
| 1856 | + * @param $context IContextSource |
1857 | 1857 | * @since 1.18 |
1858 | 1858 | */ |
1859 | 1859 | public function setContext( $context ) { |
— | — | @@ -1862,11 +1862,11 @@ |
1863 | 1863 | /** |
1864 | 1864 | * Gets the context this Article is executed in |
1865 | 1865 | * |
1866 | | - * @return RequestContext |
| 1866 | + * @return IContextSource |
1867 | 1867 | * @since 1.18 |
1868 | 1868 | */ |
1869 | 1869 | public function getContext() { |
1870 | | - if ( $this->mContext instanceof RequestContext ) { |
| 1870 | + if ( $this->mContext instanceof IContextSource ) { |
1871 | 1871 | return $this->mContext; |
1872 | 1872 | } else { |
1873 | 1873 | wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" ); |
Index: branches/REL1_18/phase3/includes/HTMLForm.php |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | protected $mSubmitText; |
104 | 104 | protected $mSubmitTooltip; |
105 | 105 | |
106 | | - protected $mContext; // <! RequestContext |
| 106 | + protected $mContext; // <! IContextSource |
107 | 107 | protected $mTitle; |
108 | 108 | protected $mMethod = 'post'; |
109 | 109 | |
— | — | @@ -115,12 +115,12 @@ |
116 | 116 | /** |
117 | 117 | * Build a new HTMLForm from an array of field attributes |
118 | 118 | * @param $descriptor Array of Field constructs, as described above |
119 | | - * @param $context RequestContext available since 1.18, will become compulsory in 1.18. |
| 119 | + * @param $context IContextSource available since 1.18, will become compulsory in 1.18. |
120 | 120 | * Obviates the need to call $form->setTitle() |
121 | 121 | * @param $messagePrefix String a prefix to go in front of default messages |
122 | 122 | */ |
123 | | - public function __construct( $descriptor, /*RequestContext*/ $context = null, $messagePrefix = '' ) { |
124 | | - if( $context instanceof RequestContext ){ |
| 123 | + public function __construct( $descriptor, /*IContextSource*/ $context = null, $messagePrefix = '' ) { |
| 124 | + if( $context instanceof IContextSource ){ |
125 | 125 | $this->mContext = $context; |
126 | 126 | $this->mTitle = false; // We don't need them to set a title |
127 | 127 | $this->mMessagePrefix = $messagePrefix; |
— | — | @@ -637,10 +637,10 @@ |
638 | 638 | } |
639 | 639 | |
640 | 640 | /** |
641 | | - * @return RequestContext |
| 641 | + * @return IContextSource |
642 | 642 | */ |
643 | 643 | public function getContext(){ |
644 | | - return $this->mContext instanceof RequestContext |
| 644 | + return $this->mContext instanceof IContextSource |
645 | 645 | ? $this->mContext |
646 | 646 | : RequestContext::getMain(); |
647 | 647 | } |
Index: branches/REL1_18/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | * to wrap bulk update operations. |
9 | 9 | */ |
10 | 10 | abstract class RevDel_List extends Rev_List { |
11 | | - function __construct( RequestContext $context, Title $title, array $ids ) { |
| 11 | + function __construct( IContextSource $context, Title $title, array $ids ) { |
12 | 12 | parent::__construct( $context, $title ); |
13 | 13 | $this->ids = $ids; |
14 | 14 | } |
Index: branches/REL1_18/phase3/includes/RequestContext.php |
— | — | @@ -306,14 +306,14 @@ |
307 | 307 | abstract class ContextSource implements IContextSource { |
308 | 308 | |
309 | 309 | /** |
310 | | - * @var RequestContext |
| 310 | + * @var IContextSource |
311 | 311 | */ |
312 | 312 | private $context; |
313 | 313 | |
314 | 314 | /** |
315 | | - * Get the RequestContext object |
| 315 | + * Get the IContextSource object |
316 | 316 | * |
317 | | - * @return RequestContext |
| 317 | + * @return IContextSource |
318 | 318 | */ |
319 | 319 | public function getContext() { |
320 | 320 | if ( $this->context === null ) { |
— | — | @@ -325,11 +325,11 @@ |
326 | 326 | } |
327 | 327 | |
328 | 328 | /** |
329 | | - * Set the RequestContext object |
| 329 | + * Set the IContextSource object |
330 | 330 | * |
331 | | - * @param $context RequestContext |
| 331 | + * @param $context IContextSource |
332 | 332 | */ |
333 | | - public function setContext( RequestContext $context ) { |
| 333 | + public function setContext( IContextSource $context ) { |
334 | 334 | $this->context = $context; |
335 | 335 | } |
336 | 336 | |
Index: branches/REL1_18/phase3/includes/OutputPage.php |
— | — | @@ -225,7 +225,7 @@ |
226 | 226 | * Instead a new RequestContext should be created and it will implicitly create |
227 | 227 | * a OutputPage tied to that context. |
228 | 228 | */ |
229 | | - function __construct( RequestContext $context = null ) { |
| 229 | + function __construct( IContextSource $context = null ) { |
230 | 230 | $this->mContext = $context; |
231 | 231 | } |
232 | 232 | |
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
233 | 233 | Merged /trunk/phase3/includes/OutputPage.php:r97159 |
Index: branches/REL1_18/phase3/includes/Wiki.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * TODO: fold $output, etc, into this |
33 | | - * @var RequestContext |
| 33 | + * @var IContextSource |
34 | 34 | */ |
35 | 35 | private $context; |
36 | 36 | |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | return $old; |
47 | 47 | } |
48 | 48 | |
49 | | - public function __construct( RequestContext $context = null ) { |
| 49 | + public function __construct( IContextSource $context = null ) { |
50 | 50 | if ( !$context ) { |
51 | 51 | $context = RequestContext::getMain(); |
52 | 52 | } |
— | — | @@ -257,10 +257,10 @@ |
258 | 258 | * |
259 | 259 | * @deprecated in 1.18; use Article::newFromTitle() instead |
260 | 260 | * @param $title Title |
261 | | - * @param $context RequestContext |
| 261 | + * @param $context IContextSource |
262 | 262 | * @return Article object |
263 | 263 | */ |
264 | | - public static function articleFromTitle( $title, RequestContext $context ) { |
| 264 | + public static function articleFromTitle( $title, IContextSource $context ) { |
265 | 265 | return Article::newFromTitle( $title, $context ); |
266 | 266 | } |
267 | 267 | |
Index: branches/REL1_18/phase3/includes/ChangesList.php |
— | — | @@ -45,10 +45,10 @@ |
46 | 46 | /** |
47 | 47 | * Changeslist contructor |
48 | 48 | * |
49 | | - * @param $obj Skin or RequestContext |
| 49 | + * @param $obj Skin or IContextSource |
50 | 50 | */ |
51 | 51 | public function __construct( $obj ) { |
52 | | - if ( $obj instanceof RequestContext ) { |
| 52 | + if ( $obj instanceof IContextSource ) { |
53 | 53 | $this->setContext( $obj ); |
54 | 54 | $this->skin = $obj->getSkin(); |
55 | 55 | } else { |
— | — | @@ -74,10 +74,10 @@ |
75 | 75 | * Fetch an appropriate changes list class for the specified context |
76 | 76 | * Some users might want to use an enhanced list format, for instance |
77 | 77 | * |
78 | | - * @param $context RequestContext to use |
| 78 | + * @param $context IContextSource to use |
79 | 79 | * @return ChangesList|EnhancedChangesList|OldChangesList derivative |
80 | 80 | */ |
81 | | - public static function newFromContext( RequestContext $context ) { |
| 81 | + public static function newFromContext( IContextSource $context ) { |
82 | 82 | $user = $context->getUser(); |
83 | 83 | $sk = $context->getSkin(); |
84 | 84 | $list = null; |
Property changes on: branches/REL1_18/phase3/includes/ChangesList.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
85 | 85 | Merged /trunk/phase3/includes/ChangesList.php:r97159 |
Index: branches/REL1_18/phase3/includes/RevisionList.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | */ |
10 | 10 | var $title; |
11 | 11 | /** |
12 | | - * @var RequestContext |
| 12 | + * @var IContextSource |
13 | 13 | */ |
14 | 14 | var $context; |
15 | 15 | |
— | — | @@ -16,10 +16,10 @@ |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Construct a revision list for a given title |
20 | | - * @param $context RequestContext |
| 20 | + * @param $context IContextSource |
21 | 21 | * @param $title Title |
22 | 22 | */ |
23 | | - function __construct( RequestContext $context, Title $title ) { |
| 23 | + function __construct( IContextSource $context, Title $title ) { |
24 | 24 | $this->context = $context; |
25 | 25 | $this->title = $title; |
26 | 26 | } |
Index: branches/REL1_18/phase3/includes/SpecialPage.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Current request context |
61 | | - * @var RequestContext |
| 61 | + * @var IContextSource |
62 | 62 | */ |
63 | 63 | protected $mContext; |
64 | 64 | |
— | — | @@ -226,12 +226,12 @@ |
227 | 227 | * page, and true if it was successful. |
228 | 228 | * |
229 | 229 | * @param $title Title object |
230 | | - * @param $context RequestContext |
| 230 | + * @param $context IContextSource |
231 | 231 | * @param $including Bool output is being captured for use in {{special:whatever}} |
232 | 232 | * @return Bool |
233 | 233 | * @deprecated since 1.18 call SpecialPageFactory method directly |
234 | 234 | */ |
235 | | - public static function executePath( &$title, RequestContext &$context, $including = false ) { |
| 235 | + public static function executePath( &$title, IContextSource &$context, $including = false ) { |
236 | 236 | return SpecialPageFactory::executePath( $title, $context, $including ); |
237 | 237 | } |
238 | 238 | |
— | — | @@ -605,7 +605,7 @@ |
606 | 606 | /** |
607 | 607 | * Sets the context this SpecialPage is executed in |
608 | 608 | * |
609 | | - * @param $context RequestContext |
| 609 | + * @param $context IContextSource |
610 | 610 | * @since 1.18 |
611 | 611 | */ |
612 | 612 | public function setContext( $context ) { |
— | — | @@ -615,11 +615,11 @@ |
616 | 616 | /** |
617 | 617 | * Gets the context this SpecialPage is executed in |
618 | 618 | * |
619 | | - * @return RequestContext |
| 619 | + * @return IContextSource |
620 | 620 | * @since 1.18 |
621 | 621 | */ |
622 | 622 | public function getContext() { |
623 | | - if ( $this->mContext instanceof RequestContext ) { |
| 623 | + if ( $this->mContext instanceof IContextSource ) { |
624 | 624 | return $this->mContext; |
625 | 625 | } else { |
626 | 626 | wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" ); |
Property changes on: branches/REL1_18/phase3/includes/SpecialPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
627 | 627 | Merged /trunk/phase3/includes/SpecialPage.php:r97159 |
Index: branches/REL1_18/phase3/includes/Action.php |
— | — | @@ -32,8 +32,8 @@ |
33 | 33 | protected $page; |
34 | 34 | |
35 | 35 | /** |
36 | | - * RequestContext if specified; otherwise we'll use the Context from the Page |
37 | | - * @var RequestContext |
| 36 | + * IContextSource if specified; otherwise we'll use the Context from the Page |
| 37 | + * @var IContextSource |
38 | 38 | */ |
39 | 39 | protected $context; |
40 | 40 | |
— | — | @@ -96,11 +96,11 @@ |
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
100 | | - * Get the RequestContext in use here |
101 | | - * @return RequestContext |
| 100 | + * Get the IContextSource in use here |
| 101 | + * @return IContextSource |
102 | 102 | */ |
103 | 103 | protected final function getContext() { |
104 | | - if ( $this->context instanceof RequestContext ) { |
| 104 | + if ( $this->context instanceof IContextSource ) { |
105 | 105 | return $this->context; |
106 | 106 | } |
107 | 107 | return $this->page->getContext(); |