Bugfixes/MediaWiki 1.17

From Linkwiki
tbd @

MW 1.17.0

Core

Bugfix by Orci, OutputPage.php
(load css correctly)
search replace
		// Add site, private and user styles
		// 'private' at present only contains user.options, so put that before 'user'
		// Any future private modules will likely have a similar user-specific character
		foreach ( array( 'site', 'private', 'user' ) as $group ) {
			$ret .= $this->makeResourceLoaderLink(
				$sk, array_merge( $styles['site'], $styles['user'] ), 'styles'
			);
		}
		return $ret;
	}
		// Add site, private and user styles
		// 'private' at present only contains user.options, so put that before 'user'
		// Any future private modules will likely have a similar user-specific character
		//foreach ( array( 'site', 'private', 'user' ) as $group ) {
        $ret .= $this->makeResourceLoaderLink(
				$sk, array_merge( $styles['site'], $styles['private'], $styles['user'] ), 'styles'
			);
		//}
		return $ret;
	}
Bugfix by Algorithmix, ParserOutput.php
(corrects error "in array(): Wrong datatype for second argument in ParserOptions.php on line 274/289/292/297/302/317)
search replace
		public function getUsedOptions() {
		if ( !isset( $this->mAccessedOptions ) ) {
			return false;
		}
		return array_keys( $this->mAccessedOptions );
	 }
		public function getUsedOptions() {
		if ( !isset( $this->mAccessedOptions ) ) {
			return array();  // bugfix: return empty array instead of false 
			// return false;
		}
		return array_keys( $this->mAccessedOptions );
	 }

DPL

Bugfix by Orci, DPL.php
(DPL initializes descending sort correctly)
search replace
		// if requested we sort the table by the contents of a given column
		if ($iTableSortCol!=0) {
			$sortcol = abs($iTableSortCol);
			$rows=explode("\n|-",$rBody);
			foreach($rows as $index => $row) {
				if (strlen($row) > 0) {
					if ((($word = explode("\n|",$row,$sortcol+2))!==false) && (count($word)>$sortcol)) {
						$rowsKey[$index] = $word[$sortcol];
					} else {
						$rowsKey[$index] = $row;
					}
				}
			}
			if ($iTableSortCol<0) 	arsort($rowsKey);
			else			asort ($rowsKey);
			$rBody="";
			foreach($rowsKey as $index => $val)
				$rBody.="\n|-".$rows[$index];
		}

InputBox

Bugfix by Orci, InputBox.classes.php
(double encoding; commenttitle with input PAGENAME works with ')
search replace
'value' => $this->mPage
'value' => htmlspecialchars_decode( $this->mPage, ENT_QUOTES )

MultiBoilerplate

Bugfix by Orci, MultiBoilerplate.php
(behobenes Problem: noinclude und includeonly wird nun über mehrere Zeilen hinweg respektiert)
search replace
$content = preg_replace( '#<noinclude>(.*?)</noinclude>#ims', '', $content );
$content = preg_replace( '#<includeonly>(.*?)</includeonly>#ims', '$1', $content );
Feature by Orci, MultiBoilerplate.php
search replace
$content = preg_replace( '#<pre>(.*?)</pre>#ims', '$1', $content );
$content = preg_replace( '#<nowiki>(.*?)</nowiki>#ims', '$1', $content );