X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FOutputPage.php;h=81724c5cd84cfb58233d315842a5e84939fc92fd;hp=d85c60c3f65eee54b8a689b48b2fd234201812ac;hb=6ae9367cddf8565c948f4d9458b07bb688f2ddc2;hpb=c8e2b346f717bcd2bbc357a085cf8ad97fb354eb diff --git a/includes/OutputPage.php b/includes/OutputPage.php index d85c60c3f6..81724c5cd8 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -50,7 +50,7 @@ class OutputPage extends ContextSource { /** * @var array Additional stylesheets. Looks like this is for extensions. - * Might be replaced by resource loader. + * Might be replaced by ResourceLoader. */ protected $mExtStyles = array(); @@ -132,7 +132,7 @@ class OutputPage extends ContextSource { private $mLanguageLinks = array(); /** - * Used for JavaScript (pre resource loader) + * Used for JavaScript (predates ResourceLoader) * @todo We should split JS / CSS. * mScripts content is inserted as is in "" by Skin. This might * contain either a link to a stylesheet or inline CSS. @@ -151,8 +151,6 @@ class OutputPage extends ContextSource { /** @var array Array of elements in "". Parser might add its own headers! */ protected $mHeadItems = array(); - // @todo FIXME: Next 5 variables probably come from the resource loader - /** @var array */ protected $mModules = array(); @@ -224,7 +222,7 @@ class OutputPage extends ContextSource { /** * @var bool Comes from the parser. This was probably made to load CSS/JS * only if we had "". Used directly in CategoryPage.php. - * Looks like resource loader can replace this. + * Looks like ResourceLoader can replace this. */ public $mNoGallery = false; @@ -236,7 +234,7 @@ class OutputPage extends ContextSource { /** @var int Cache stuff. Looks like mEnableClientCache */ protected $mSquidMaxage = 0; - /** @var in Upper limit on mSquidMaxage */ + /** @var int Upper limit on mSquidMaxage */ protected $mCdnMaxageLimit = INF; /** @@ -458,6 +456,8 @@ class OutputPage extends ContextSource { /** * Add raw HTML to the list of scripts (including \ tag, etc.) + * Internal use only. Use OutputPage::addModules() or OutputPage::addJsConfigVars() + * if possible. * * @param string $script Raw HTML */ @@ -468,26 +468,31 @@ class OutputPage extends ContextSource { /** * Register and add a stylesheet from an extension directory. * + * @deprecated since 1.27 use addModuleStyles() or addStyle() instead * @param string $url Path to sheet. Provide either a full url (beginning * with 'http', etc) or a relative path from the document root * (beginning with '/'). Otherwise it behaves identically to * addStyle() and draws from the /skins folder. */ public function addExtensionStyle( $url ) { + wfDeprecated( __METHOD__, '1.27' ); array_push( $this->mExtStyles, $url ); } /** * Get all styles added by extensions * + * @deprecated since 1.27 * @return array */ function getExtStyle() { + wfDeprecated( __METHOD__, '1.27' ); return $this->mExtStyles; } /** * Add a JavaScript file out of skins/common, or a given relative path. + * Internal use only. Use OutputPage::addModules() if possible. * * @param string $file Filename in skins/common or complete on-server path * (/foo/bar.js) @@ -508,6 +513,7 @@ class OutputPage extends ContextSource { /** * Add a self-contained script tag with the given contents + * Internal use only. Use OutputPage::addModules() if possible. * * @param string $script JavaScript text, no "