r77774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77773‎ | r77774 | r77775 >
Date:05:50, 5 December 2010
Author:demon
Status:deferred
Tags:
Comment:
One less $wgTitle
Modified paths:
  • /trunk/extensions/YouTubeAuthSub/YouTubeAuthSub_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/YouTubeAuthSub/YouTubeAuthSub_body.php
@@ -15,13 +15,14 @@
1616 }
1717
1818 function execute( $par ) {
19 - global $wgRequest, $wgTitle, $wgOut, $wgMemc, $wgUser;
 19+ global $wgRequest, $wgOut, $wgMemc, $wgUser;
2020 global $wgYTAS_User, $wgYTAS_Password, $wgYTAS_DeveloperId;
2121 global $wgYTAS_DefaultCategory, $wgYTAS_UseClientLogin, $wgYTAS_EnableLogging, $wgYTAS_UseNamespace, $wgYTAS_ClientId;
2222
2323 wfLoadExtensionMessages( 'YouTubeAuthSub' );
2424
2525 $this->setHeaders();
 26+ $spTitle = $this->getTitle();
2627
2728 # Check permissions
2829 if( !$wgUser->isAllowed( 'upload' ) ) {
@@ -111,7 +112,7 @@
112113 <script type='text/javascript' src='/extensions/YouTubeAuthSub/youtubeauthsub.js'>
113114 </script>
114115 <form action='https://www.google.com/accounts/AuthSubRequest' method='POST' onsubmit='return checkYTASForm();' name='ytas_form'/>
115 - <input type='hidden' name='next' value='{$wgTitle->getFullURL()}'/>
 116+ <input type='hidden' name='next' value='{$spTitle()->getFullURL()}'/>
116117 <input type='hidden' name='scope' value='http://gdata.youtube.com/feeds'/>
117118 <input type='hidden' name='session' value='0'/>
118119 <input type='hidden' name='secure' value='0'/>
@@ -174,7 +175,7 @@
175176 $meta_id =$dbw->insertId();
176177 }
177178
178 - $next_url = urlencode($wgTitle->getFullURL() . "?metaid={$meta_id}");
 179+ $next_url = urlencode($spTitle()->getFullURL() . "?metaid={$meta_id}");
179180
180181 $wgOut->addHTML(wfMsg('youtubeauthsub_uploadhere') . "<br /><br />
181182 <form action='{$url}?nexturl={$next_url}' METHOD='post' enctype='multipart/form-data' name='videoupload'>
@@ -200,7 +201,7 @@
201202 </script>
202203 <script type='text/javascript' src='/extensions/YouTubeAuthSub/youtubeauthsub.js'>
203204 </script>
204 - <form action='{$wgTitle->getFullURL()}' method='POST' name='ytas_form' onsubmit='return checkYTASForm();'>
 205+ <form action='{$spTitle->getFullURL()}' method='POST' name='ytas_form' onsubmit='return checkYTASForm();'>
205206 <table cellpadding='10'>
206207 ");
207208 if (!$wgYTAS_UseClientLogin) {

Status & tagging log