Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1208,9 +1208,11 @@ |
1209 | 1209 | * Return whether user JavaScript is allowed for this page |
1210 | 1210 | * @deprecated since 1.18 Load modules with ResourceLoader, and origin and |
1211 | 1211 | * trustworthiness is identified and enforced automagically. |
| 1212 | + * Will be removed in 1.20. |
1212 | 1213 | * @return Boolean |
1213 | 1214 | */ |
1214 | 1215 | public function isUserJsAllowed() { |
| 1216 | + wfDeprecated( __METHOD__, '1.18' ); |
1215 | 1217 | return $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS ) >= ResourceLoaderModule::ORIGIN_USER_INDIVIDUAL; |
1216 | 1218 | } |
1217 | 1219 | |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -194,12 +194,8 @@ |
195 | 195 | $tpl->set( 'pagecss', false ); |
196 | 196 | $tpl->set( 'usercss', false ); |
197 | 197 | |
198 | | - $this->userjs = $this->userjsprev = false; |
199 | | - # @todo FIXME: This is the only use of OutputPage::isUserJsAllowed() anywhere; can we |
200 | | - # get rid of it? For that matter, why is any of this here at all? |
201 | | - $this->setupUserJs( $out->isUserJsAllowed() ); |
202 | | - $tpl->setRef( 'userjs', $this->userjs ); |
203 | | - $tpl->setRef( 'userjsprev', $this->userjsprev ); |
| 198 | + $tpl->set( 'userjs', false ); |
| 199 | + $tpl->set( 'userjsprev', false ); |
204 | 200 | |
205 | 201 | $tpl->set( 'jsvarurl', false ); |
206 | 202 | |
— | — | @@ -1219,25 +1215,6 @@ |
1220 | 1216 | return $this->getTitle()->getNamespaceKey(); |
1221 | 1217 | } |
1222 | 1218 | |
1223 | | - /** |
1224 | | - * @private |
1225 | | - * @todo FIXME: Why is this duplicated in/from OutputPage::getHeadScripts()?? |
1226 | | - */ |
1227 | | - function setupUserJs( $allowUserJs ) { |
1228 | | - global $wgJsMimeType; |
1229 | | - wfProfileIn( __METHOD__ ); |
1230 | | - |
1231 | | - if( $allowUserJs && $this->loggedin ) { |
1232 | | - if( $this->getTitle()->isJsSubpage() and $this->getOutput()->userCanPreview() ) { |
1233 | | - # XXX: additional security check/prompt? |
1234 | | - $this->userjsprev = '/*<![CDATA[*/ ' . $this->getRequest()->getText( 'wpTextbox1' ) . ' /*]]>*/'; |
1235 | | - } else { |
1236 | | - $this->userjs = self::makeUrl( $this->userpage . '/' . $this->skinname . '.js', 'action=raw&ctype=' . $wgJsMimeType ); |
1237 | | - } |
1238 | | - } |
1239 | | - wfProfileOut( __METHOD__ ); |
1240 | | - } |
1241 | | - |
1242 | 1219 | public function commonPrintStylesheet() { |
1243 | 1220 | return false; |
1244 | 1221 | } |