r53781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53780‎ | r53781 | r53782 >
Date:16:57, 26 July 2009
Author:demon
Status:ok
Tags:
Comment:
Per bug 19943, improve docs on addExtensionStyle(). It behaves differently depending on what you pass it :)
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -99,7 +99,14 @@
100100 }
101101 function addScript( $script ) { $this->mScripts .= "\t\t" . $script . "\n"; }
102102
103 - function addExtensionStyle( $url ) {
 103+ /**
 104+ * Register and add a stylesheet from an extension directory.
 105+ * @param $url String path to sheet. Provide either a full url (beginning
 106+ * with 'http', etc) or a relative path from the document root
 107+ * (beginning with '/'). Otherwise it behaves identically to
 108+ * addStyle() and draws from the /skins folder.
 109+ */
 110+ public function addExtensionStyle( $url ) {
104111 $linkarr = array( 'rel' => 'stylesheet', 'href' => $url, 'type' => 'text/css' );
105112 array_push( $this->mExtStyles, $linkarr );
106113 }

Status & tagging log