http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96812
Revision: 96812
Author: robin
Date: 2011-09-11 21:07:17 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
* r96737: set OutputPage->addWikiText() as an interface message by default
* r96760: use 'noflip' for $flip in OutputPage->addInlineStyle() so it's always
a string
* Add some parameter documentation
Modified Paths:
--------------
trunk/phase3/includes/ImagePage.php
trunk/phase3/includes/OutputPage.php
trunk/phase3/includes/parser/Parser.php
trunk/phase3/includes/specials/SpecialVersion.php
Modified: trunk/phase3/includes/ImagePage.php
===================================================================
--- trunk/phase3/includes/ImagePage.php 2011-09-11 20:44:08 UTC (rev 96811)
+++ trunk/phase3/includes/ImagePage.php 2011-09-11 21:07:17 UTC (rev 96812)
@@ -784,6 +784,8 @@
/**
* Display an error with a wikitext description
+ *
+ * @param $description String
*/
function showError( $description ) {
global $wgOut;
Modified: trunk/phase3/includes/OutputPage.php
===================================================================
--- trunk/phase3/includes/OutputPage.php 2011-09-11 20:44:08 UTC (rev
96811)
+++ trunk/phase3/includes/OutputPage.php 2011-09-11 21:07:17 UTC (rev
96812)
@@ -1311,8 +1311,9 @@
*
* @param $text String
* @param $linestart Boolean: is this the start of a line?
+ * @param $interface Boolean: is this text in the user interface
language?
*/
- public function addWikiText( $text, $linestart = true, $interface =
false ) {
+ public function addWikiText( $text, $linestart = true, $interface =
true ) {
$title = $this->getTitle(); // Work arround E_STRICT
$this->addWikiTextTitle( $text, $title, $linestart,
/*tidy*/false, $interface );
}
@@ -1941,8 +1942,7 @@
$this->enableClientCache( false );
$this->mRedirect = '';
$this->mBodytext = '';
- $this->addWikiText( $this->formatPermissionsErrorMessage(
$errors, $action ),
- /*linestart*/true, /*interface*/true );
+ $this->addWikiText( $this->formatPermissionsErrorMessage(
$errors, $action ) );
}
/**
@@ -2081,8 +2081,7 @@
} else {
$this->setPageTitle( wfMsg( 'badaccess' ) );
}
- $this->addWikiText(
$this->formatPermissionsErrorMessage( $reasons, $action ),
- /*linestart*/true, /*interface*/true );
+ $this->addWikiText(
$this->formatPermissionsErrorMessage( $reasons, $action ) );
} else {
// Wiki is read only
throw new ReadOnlyError;
@@ -2958,9 +2957,9 @@
/**
* Adds inline CSS styles
* @param $style_css Mixed: inline CSS
- * @param $flip False or String: Set to 'flip' to flip the CSS if needed
+ * @param $flip String: Set to 'flip' to flip the CSS if needed
*/
- public function addInlineStyle( $style_css, $flip = false ) {
+ public function addInlineStyle( $style_css, $flip = 'noflip' ) {
if( $flip === 'flip' && $this->getLang()->isRTL() ) {
# If wanted, and the interface is right-to-left, flip
the CSS
$style_css = CSSJanus::transform( $style_css, true,
false );
@@ -3049,6 +3048,9 @@
return $ret;
}
+ /**
+ * @return Array
+ */
public function buildCssLinksArray() {
$links = array();
@@ -3223,7 +3225,7 @@
}
$s = str_replace( '$' . ( $n + 1 ), wfMsgExt( $name,
$options, $args ), $s );
}
- $this->addWikiText( $s, /*linestart*/true, /*interface*/true );
+ $this->addWikiText( $s );
}
/**
Modified: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php 2011-09-11 20:44:08 UTC (rev
96811)
+++ trunk/phase3/includes/parser/Parser.php 2011-09-11 21:07:17 UTC (rev
96812)
@@ -530,6 +530,11 @@
*
* <noinclude>, <includeonly> etc. are parsed as for template
transclusion,
* comments, templates, arguments, tags hooks and parser functions are
untouched.
+ *
+ * @param $text String
+ * @param $title Title
+ * @param $options ParserOptions
+ * @return String
*/
public function getPreloadText( $text, Title $title, ParserOptions
$options ) {
# Parser (re)initialisation
Modified: trunk/phase3/includes/specials/SpecialVersion.php
===================================================================
--- trunk/phase3/includes/specials/SpecialVersion.php 2011-09-11 20:44:08 UTC
(rev 96811)
+++ trunk/phase3/includes/specials/SpecialVersion.php 2011-09-11 21:07:17 UTC
(rev 96812)
@@ -64,7 +64,7 @@
$text .= $this->getWgHooks();
}
- $out->addWikiText( $text, /*linestart*/true, /*interface*/true
);
+ $out->addWikiText( $text );
$out->addHTML( $this->IPInfo() );
if ( $this->getRequest()->getVal( 'easteregg' ) ) {
@@ -154,6 +154,7 @@
/**
* Return a string of the MediaWiki version with SVN revision if
available.
*
+ * @param $flags String
* @return mixed
*/
public static function getVersion( $flags = '' ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs