Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES |
— | — | @@ -8,8 +8,8 @@ |
9 | 9 | Semantic MediaWiki 1.7.1 is currently in beta-quality and is not recommended for use in |
10 | 10 | production until the actual release. |
11 | 11 | |
12 | | -* Fixed bug in "further results" links causing the main column to be displayed twice on Special:Ask. |
13 | | -* Fixed #ask and #show 'format' parameter which now is case-insensitive again (bug 31138). |
| 12 | +* Fixed bug in "further results" links causing the main column to be displayed twice on Special:Ask (bug 33473). |
| 13 | +* Fixed incorrect case-sensitivity of the format parameter (bug 31138). |
14 | 14 | |
15 | 15 | == SMW 1.7 == |
16 | 16 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | // FIXME: The following can be removed when new style magic words are used (introduced in r52503) |
80 | 80 | $wgHooks['LanguageGetMagic'][] = 'smwfAddMagicWords'; // setup names for parser functions (needed here) |
81 | 81 | |
82 | | - $wgHooks['ParserTestTables'][] = 'smwfOnParserTestTables'; |
| 82 | + $wgHooks['ParserTestTables'][] = 'SMWHooks::onParserTestTables'; |
83 | 83 | $wgHooks['AdminLinks'][] = 'SMWHooks::addToAdminLinks'; |
84 | 84 | $wgHooks['PageSchemasRegisterHandlers'][] = 'SMWHooks::onPageSchemasRegistration'; |
85 | 85 | |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | $wgHooks['ParserFirstCallInit'][] = 'SMWHooks::onParserFirstCallInit'; |
100 | 100 | |
101 | 101 | if ( $GLOBALS['smwgToolboxBrowseLink'] ) { |
102 | | - $wgHooks['SkinTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; |
| 102 | + $wgHooks['SkinTemplateToolboxEnd'][] = 'SMWHooks::showBrowseLink'; |
103 | 103 | } |
104 | 104 | |
105 | 105 | $wgHooks['SkinAfterContent'][] = 'SMWFactbox::onSkinAfterContent'; // draw Factbox below categories |
— | — | @@ -106,10 +106,10 @@ |
107 | 107 | |
108 | 108 | if ( version_compare( $wgVersion, '1.17alpha', '>=' ) ) { |
109 | 109 | // For MediaWiki 1.17 alpha and later. |
110 | | - $wgHooks['ExtensionTypes'][] = 'smwfAddSemanticExtensionType'; |
| 110 | + $wgHooks['ExtensionTypes'][] = 'SMWHooks::addSemanticExtensionType'; |
111 | 111 | } else { |
112 | 112 | // For pre-MediaWiki 1.17 alpha. |
113 | | - $wgHooks['SpecialVersionExtensionTypes'][] = 'smwfOldAddSemanticExtensionType'; |
| 113 | + $wgHooks['SpecialVersionExtensionTypes'][] = 'SMWHooks::oldAddSemanticExtensionType'; |
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
— | — | @@ -434,67 +434,6 @@ |
435 | 435 | return true; |
436 | 436 | } |
437 | 437 | |
438 | | -/** |
439 | | - * Adds the 'semantic' extension type to the type list. |
440 | | - * |
441 | | - * @since 1.5.2 |
442 | | - * |
443 | | - * @param $aExtensionTypes Array |
444 | | - * |
445 | | - * @return true |
446 | | - */ |
447 | | -function smwfAddSemanticExtensionType( array &$aExtensionTypes ) { |
448 | | - $aExtensionTypes = array_merge( array( 'semantic' => wfMsg( 'version-semantic' ) ), $aExtensionTypes ); |
449 | | - return true; |
450 | | -} |
451 | | - |
452 | | -/** |
453 | | - * @see smwfAddSemanticExtensionType |
454 | | - * |
455 | | - * @since 1.5.2 |
456 | | - * |
457 | | - * @param $oSpecialVersion SpecialVersion |
458 | | - * @param $aExtensionTypes Array |
459 | | - * |
460 | | - * @return true |
461 | | - */ |
462 | | -function smwfOldAddSemanticExtensionType( SpecialVersion &$oSpecialVersion, array &$aExtensionTypes ) { |
463 | | - return smwfAddSemanticExtensionType( $aExtensionTypes ); |
464 | | -} |
465 | | - |
466 | | -/** |
467 | | - * Register tables to be added to temporary tables for parser tests. |
468 | | - * @todo Hard-coding this thwarts the modularity/exchangability of the SMW |
469 | | - * storage backend. The actual list of required tables depends on the backend |
470 | | - * implementation and cannot really be fixed here. |
471 | | - */ |
472 | | -function smwfOnParserTestTables( &$tables ) { |
473 | | - $tables[] = 'smw_ids'; |
474 | | - $tables[] = 'smw_redi2'; |
475 | | - $tables[] = 'smw_atts2'; |
476 | | - $tables[] = 'smw_rels2'; |
477 | | - $tables[] = 'smw_text2'; |
478 | | - $tables[] = 'smw_spec2'; |
479 | | - $tables[] = 'smw_inst2'; |
480 | | - $tables[] = 'smw_subs2'; |
481 | | - return true; |
482 | | -} |
483 | | - |
484 | | -/** |
485 | | - * Add a link to the toolbox to view the properties of the current page in |
486 | | - * Special:Browse. The links has the CSS id "t-smwbrowselink" so that it can be |
487 | | - * skinned or hidden with all standard mechanisms (also by individual users |
488 | | - * with custom CSS). |
489 | | - */ |
490 | | -function smwfShowBrowseLink( $skintemplate ) { |
491 | | - if ( $skintemplate->data['isarticle'] ) { |
492 | | - $browselink = SMWInfolink::newBrowsingLink( wfMsg( 'smw_browselink' ), |
493 | | - $skintemplate->data['titleprefixeddbkey'], false ); |
494 | | - echo '<li id="t-smwbrowselink">' . $browselink->getHTML() . '</li>'; |
495 | | - } |
496 | | - return true; |
497 | | -} |
498 | | - |
499 | 438 | /**********************************************/ |
500 | 439 | /***** namespace settings *****/ |
501 | 440 | /**********************************************/ |
Index: trunk/extensions/SemanticMediaWiki/SemanticMediaWiki.hooks.php |
— | — | @@ -161,4 +161,77 @@ |
162 | 162 | return true; |
163 | 163 | } |
164 | 164 | |
| 165 | + /** |
| 166 | + * Adds the 'semantic' extension type to the type list. |
| 167 | + * |
| 168 | + * @since 1.7.1 |
| 169 | + * |
| 170 | + * @param $aExtensionTypes Array |
| 171 | + * |
| 172 | + * @return true |
| 173 | + */ |
| 174 | + public static function addSemanticExtensionType( array &$aExtensionTypes ) { |
| 175 | + $aExtensionTypes = array_merge( array( 'semantic' => wfMsg( 'version-semantic' ) ), $aExtensionTypes ); |
| 176 | + return true; |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * @see SMWHooks::addSemanticExtensionType |
| 181 | + * |
| 182 | + * @since 1.7.1 |
| 183 | + * |
| 184 | + * @param $oSpecialVersion SpecialVersion |
| 185 | + * @param $aExtensionTypes Array |
| 186 | + * |
| 187 | + * @return true |
| 188 | + */ |
| 189 | + public static function oldAddSemanticExtensionType( SpecialVersion &$oSpecialVersion, array &$aExtensionTypes ) { |
| 190 | + return self::addSemanticExtensionType( $aExtensionTypes ); |
| 191 | + } |
| 192 | + |
| 193 | + /** |
| 194 | + * Register tables to be added to temporary tables for parser tests. |
| 195 | + * @todo Hard-coding this thwarts the modularity/exchangability of the SMW |
| 196 | + * storage backend. The actual list of required tables depends on the backend |
| 197 | + * implementation and cannot really be fixed here. |
| 198 | + * |
| 199 | + * @since 1.7.1 |
| 200 | + * |
| 201 | + * @param array $tables |
| 202 | + * |
| 203 | + * @return true |
| 204 | + */ |
| 205 | + public static function onParserTestTables( array &$tables ) { |
| 206 | + $tables[] = 'smw_ids'; |
| 207 | + $tables[] = 'smw_redi2'; |
| 208 | + $tables[] = 'smw_atts2'; |
| 209 | + $tables[] = 'smw_rels2'; |
| 210 | + $tables[] = 'smw_text2'; |
| 211 | + $tables[] = 'smw_spec2'; |
| 212 | + $tables[] = 'smw_inst2'; |
| 213 | + $tables[] = 'smw_subs2'; |
| 214 | + return true; |
| 215 | + } |
| 216 | + |
| 217 | + /** |
| 218 | + * Add a link to the toolbox to view the properties of the current page in |
| 219 | + * Special:Browse. The links has the CSS id "t-smwbrowselink" so that it can be |
| 220 | + * skinned or hidden with all standard mechanisms (also by individual users |
| 221 | + * with custom CSS). |
| 222 | + * |
| 223 | + * @since 1.7.1 |
| 224 | + * |
| 225 | + * @param $skintemplate |
| 226 | + * |
| 227 | + * @return true |
| 228 | + */ |
| 229 | + public static function showBrowseLink( $skintemplate ) { |
| 230 | + if ( $skintemplate->data['isarticle'] ) { |
| 231 | + $browselink = SMWInfolink::newBrowsingLink( wfMsg( 'smw_browselink' ), |
| 232 | + $skintemplate->data['titleprefixeddbkey'], false ); |
| 233 | + echo '<li id="t-smwbrowselink">' . $browselink->getHTML() . '</li>'; |
| 234 | + } |
| 235 | + return true; |
| 236 | + } |
| 237 | + |
165 | 238 | } |