r105981 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105980‎ | r105981 | r105982 >
Date:04:51, 13 December 2011
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
rem use of escapeLocalURL
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php
@@ -112,7 +112,7 @@
113113 $result = '<div class="smwqcerrors">' . $this->getErrorsHtml() . '</div>';
114114
115115 $formParameters = array( 'name' => 'qc', 'id'=>'smwqcform',
116 - 'action' => $specTitle->escapeLocalURL(), 'method' => 'get' );
 116+ 'action' => htmlspecialchars( $specTitle->getLocalURL() ), 'method' => 'get' );
117117 $result .= Html::openElement( 'form', $formParameters ) . "\n" .
118118 Html::hidden( 'title', $specTitle->getPrefixedText() ) .
119119 // Header:
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -495,7 +495,7 @@
496496
497497 if ( $this->m_editquery ) {
498498 $spectitle = $this->getTitleFor( 'Ask' );
499 - $result .= '<form name="ask" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" .
 499+ $result .= '<form name="ask" action="' . htmlspecialchars( $spectitle->getLocalURL() ) . '" method="get">' . "\n" .
500500 '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>';
501501
502502 // Table for main query and printouts.
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php
@@ -401,7 +401,7 @@
402402 private function queryForm() {
403403 self::addAutoComplete();
404404 $spectitle = SpecialPage::getTitleFor( 'SearchByProperty' );
405 - $html = '<form name="searchbyproperty" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" .
 405+ $html = '<form name="searchbyproperty" action="' . htmlspecialchars( $spectitle->getLocalURL() ) . '" method="get">' . "\n" .
406406 '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>' ;
407407 $html .= wfMsg( 'smw_sbv_property' ) . ' <input type="text" id="property_box" name="property" value="' . htmlspecialchars( $this->propertystring ) . '" />' . "&#160;&#160;&#160;\n";
408408 $html .= wfMsg( 'smw_sbv_value' ) . ' <input type="text" name="value" value="' . htmlspecialchars( $this->valuestring ) . '" />' . "\n";
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -378,7 +378,7 @@
379379 private function queryForm() {
380380 self::addAutoComplete();
381381 $title = SpecialPage::getTitleFor( 'Browse' );
382 - return ' <form name="smwbrowse" action="' . $title->escapeLocalURL() . '" method="get">' . "\n" .
 382+ return ' <form name="smwbrowse" action="' . htmlspecialchars( $title->getLocalURL() ) . '" method="get">' . "\n" .
383383 ' <input type="hidden" name="title" value="' . $title->getPrefixedText() . '"/>' .
384384 wfMsg( 'smw_browse_article' ) . "<br />\n" .
385385 ' <input type="text" name="article" id="page_input_box" value="' . htmlspecialchars( $this->articletext ) . '" />' . "\n" .
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
@@ -148,7 +148,7 @@
149149 // Display query form
150150 $spectitle = $this->getTitle();
151151 $html .= '<p>&#160;</p>';
152 - $html .= '<form name="pageproperty" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" .
 152+ $html .= '<form name="pageproperty" action="' . htmlspecialchars( $spectitle->getLocalURL() ) . '" method="get">' . "\n" .
153153 '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>' ;
154154 $html .= wfMsg( 'smw_pp_from' ) . ' <input type="text" name="from" value="' . htmlspecialchars( $pagename ) . '" />' . "&#160;&#160;&#160;\n";
155155 $html .= wfMsg( 'smw_pp_type' ) . ' <input type="text" name="type" value="' . htmlspecialchars( $propname ) . '" />' . "\n";
Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
@@ -26,8 +26,6 @@
2727 * Added automatic invocation of the SMW_setup maintenance script when running
2828 update.php (for MW >= 1.19).
2929 * Added support for the Page Schemas extension.
30 -* Dropped compatibility with MediaWiki 1.15.x (and earlier).
31 -* Dropped compatibility with old-style (SMW < 1.6) query printers.
3230 * Removed defunct "SMWLight" files.
3331 * Fixed separator and filename parameters for the DSV format.
3432 * Fixed display of properties of type URL (bug 30912).
@@ -39,6 +37,9 @@
4038 * Fixed display of images to old behavior after a recent regression.
4139 * Fixed several more issues not listed here.
4240 * Fixed fatal error in the concept cache maintenance script (bug 32592).
 41+* Dropped compatibility with MediaWiki 1.15.x (and earlier).
 42+* Dropped compatibility with old-style (SMW < 1.6) query printers.
 43+* Full compatibility with MediaWiki 1.18 and foreward-compatibility with 1.19.
4344
4445 == SMW 1.6.1 ==
4546
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -26,7 +26,7 @@
2727 * store this array in the current parser output, using the variable
2828 * mSMWMagicWords.
2929 */
30 - static public function stripMagicWords( &$text, $parser ) {
 30+ static public function stripMagicWords( &$text, Parser $parser ) {
3131 $words = array();
3232 $mw = MagicWord::get( 'SMW_NOFACTBOX' );
3333

Comments

#Comment by Nikerabbit (talk | contribs)   06:07, 13 December 2011

Spelling: forward

Status & tagging log