Index: trunk/extensions/YouTubeAuthSub/YouTubeAuthSub_body.php |
— | — | @@ -15,13 +15,14 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | function execute( $par ) { |
19 | | - global $wgRequest, $wgTitle, $wgOut, $wgMemc, $wgUser; |
| 19 | + global $wgRequest, $wgOut, $wgMemc, $wgUser; |
20 | 20 | global $wgYTAS_User, $wgYTAS_Password, $wgYTAS_DeveloperId; |
21 | 21 | global $wgYTAS_DefaultCategory, $wgYTAS_UseClientLogin, $wgYTAS_EnableLogging, $wgYTAS_UseNamespace, $wgYTAS_ClientId; |
22 | 22 | |
23 | 23 | wfLoadExtensionMessages( 'YouTubeAuthSub' ); |
24 | 24 | |
25 | 25 | $this->setHeaders(); |
| 26 | + $spTitle = $this->getTitle(); |
26 | 27 | |
27 | 28 | # Check permissions |
28 | 29 | if( !$wgUser->isAllowed( 'upload' ) ) { |
— | — | @@ -111,7 +112,7 @@ |
112 | 113 | <script type='text/javascript' src='/extensions/YouTubeAuthSub/youtubeauthsub.js'> |
113 | 114 | </script> |
114 | 115 | <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()}'/> |
116 | 117 | <input type='hidden' name='scope' value='http://gdata.youtube.com/feeds'/> |
117 | 118 | <input type='hidden' name='session' value='0'/> |
118 | 119 | <input type='hidden' name='secure' value='0'/> |
— | — | @@ -174,7 +175,7 @@ |
175 | 176 | $meta_id =$dbw->insertId(); |
176 | 177 | } |
177 | 178 | |
178 | | - $next_url = urlencode($wgTitle->getFullURL() . "?metaid={$meta_id}"); |
| 179 | + $next_url = urlencode($spTitle()->getFullURL() . "?metaid={$meta_id}"); |
179 | 180 | |
180 | 181 | $wgOut->addHTML(wfMsg('youtubeauthsub_uploadhere') . "<br /><br /> |
181 | 182 | <form action='{$url}?nexturl={$next_url}' METHOD='post' enctype='multipart/form-data' name='videoupload'> |
— | — | @@ -200,7 +201,7 @@ |
201 | 202 | </script> |
202 | 203 | <script type='text/javascript' src='/extensions/YouTubeAuthSub/youtubeauthsub.js'> |
203 | 204 | </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();'> |
205 | 206 | <table cellpadding='10'> |
206 | 207 | "); |
207 | 208 | if (!$wgYTAS_UseClientLogin) { |