Hi guys!
I'm writing the EditPage::showEditForm:fields and I want to get a Request object. The use of wgRequest considered to be deprecated, so how is it possible to get request object in my hook function?
static public function showBacklinks($editpage, &$output){ return true; }
Cheers, Yury Katkov, WikiVote
Of course I mean WebRequest class. ----- Yury Katkov, WikiVote
On Tue, Dec 18, 2012 at 4:48 PM, Yury Katkov katkov.juriy@gmail.com wrote:
Hi guys!
I'm writing the EditPage::showEditForm:fields and I want to get a Request object. The use of wgRequest considered to be deprecated, so how is it possible to get request object in my hook function?
static public function showBacklinks($editpage, &$output){ return true; }
Cheers, Yury Katkov, WikiVote
On Tue, Dec 18, 2012 at 4:48 PM, Yury Katkov katkov.juriy@gmail.com wrote:
Hi guys!
I'm writing the EditPage::showEditForm:fields and I want to get a Request object. The use of wgRequest considered to be deprecated, so how is it possible to get request object in my hook function?
static public function showBacklinks($editpage, &$output){ return true; }
OutputPage is a context source, so you can do $output->getRequest(). Less nicer way is $editpage->getArticle()->getContext()->getRequest().
-Niklas
-- Niklas Laxström
Nice, thank you! ----- Yury Katkov, WikiVote
On Tue, Dec 18, 2012 at 8:09 PM, Niklas Laxström niklas.laxstrom@gmail.com wrote:
On Tue, Dec 18, 2012 at 4:48 PM, Yury Katkov katkov.juriy@gmail.com wrote:
Hi guys!
I'm writing the EditPage::showEditForm:fields and I want to get a Request object. The use of wgRequest considered to be deprecated, so how is it possible to get request object in my hook function?
static public function showBacklinks($editpage, &$output){ return true; }
OutputPage is a context source, so you can do $output->getRequest(). Less nicer way is $editpage->getArticle()->getContext()->getRequest().
-Niklas
-- Niklas Laxström
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 18.12.2012 16:51, Yury Katkov wrote:
Of course I mean WebRequest class.
Yury Katkov, WikiVote
On Tue, Dec 18, 2012 at 4:48 PM, Yury Katkov katkov.juriy@gmail.com wrote:
Hi guys!
I'm writing the EditPage::showEditForm:fields and I want to get a Request object. The use of wgRequest considered to be deprecated, so how is it possible to get request object in my hook function?
static public function showBacklinks($editpage, &$output){ return true; }
Cheers, Yury Katkov, WikiVote
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
$output->getContext() or $editpage->getArticle()->getContext()
Dmitriy
wikitech-l@lists.wikimedia.org