r105525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105524‎ | r105525 | r105526 >
Date:09:22, 8 December 2011
Author:nikerabbit
Status:deferred
Tags:
Comment:
Clean up r104373 and other whitespace fixes
Modified paths:
  • /trunk/extensions/SemanticWebBrowser/SWB_Settings.php (modified) (history)
  • /trunk/extensions/SemanticWebBrowser/SemanticWebBrowser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticWebBrowser/SWB_Settings.php
@@ -10,28 +10,26 @@
1111 # CHANGING THE CONFIGURATION FOR SEMANTIC WEBBROWSER #
1212 #################################################################
1313 # Do not change this file directly, but copy custom settings #
14 -# into your LocalSettings.php. Most settings should be make #
 14+# into your LocalSettings.php. Most settings should be made #
1515 # between including this file and the call to enableSemantics().#
1616 # Exceptions that need to be set before are documented below. #
1717 #################################################################
1818 $swbgIP = dirname( __FILE__ ) . '/';
1919
20 -// TODO: description does not look nice.
2120 $wgExtensionCredits['semantic'][] = array(
22 - 'path' => __FILE__,
23 - 'name' => 'Semantic Web Browser',
24 - 'version' => '0.2',
25 - 'author' => array( 'Benedikt Kaempgen', 'Anna Kantorovitch' ),
26 - 'url' => 'http://semantic-mediawiki.org',
27 - 'descriptionmsg' => 'swb_desc'
 21+ 'path' => __FILE__,
 22+ 'name' => 'Semantic Web Browser',
 23+ 'version' => '0.2',
 24+ 'author' => array( 'Benedikt Kaempgen', 'Anna Kantorovitch' ),
 25+ 'url' => 'http://semantic-mediawiki.org',
 26+ 'descriptionmsg' => 'swb_desc'
2827 );
2928
3029 /**
3130 * The toolbox of each content page show a link to browse the semantic web
32 - *of that page using Special:Browse Wiki & Semantic Web
 31+ * of that page using Special:Browse Wiki & Semantic Web
3332 */
34 -
3533 $swbgToolboxBrowseSemWeb = true;
3634
3735 // load global constants and setup functions
38 -require_once( $swbgIP.'SemanticWebBrowser.php' );
\ No newline at end of file
 36+require_once( $swbgIP . 'SemanticWebBrowser.php' );
\ No newline at end of file
Index: trunk/extensions/SemanticWebBrowser/SemanticWebBrowser.php
@@ -1,13 +1,11 @@
22 <?php
3 -
43 /**
54 * Main entry point for the Semantic Web Browser extension.
65 * @author Anna Kantorovitch and Benedikt Kämpgen
7 - * @file SemanticWebBrowser.php
 6+ * @file SemanticWebBrowser.php
87 * @ingroup SWB
98 */
109
11 -
1210 require_once dirname( __FILE__ ) . '/SWB_Settings.php';
1311
1412 /**
@@ -15,19 +13,15 @@
1614 *
1715 */
1816 // include for toolbox
19 -global $swbgToolboxBrowseSemWeb, $wgHooks, $wgAutoloadClasses, $swbgIP,
20 - $wgFooterIcons, $wgExtensionFunctions, $wgSpecialPageGroups,
21 - $wgExtensionMessagesFiles, $wgExtensionAliasesFiles, $wgSpecialPages,
22 - $smwgNamespace, $wgServer, $wgAPIModules, $wgExtensionAliasesFiles;
 17+global $swbgToolboxBrowseSemWeb, $wgHooks, $wgAutoloadClasses, $swbgIP,
 18+ $wgFooterIcons, $wgExtensionFunctions, $wgSpecialPageGroups,
 19+ $wgExtensionMessagesFiles, $wgExtensionAliasesFiles, $wgSpecialPages,
 20+ $smwgNamespace, $wgServer, $wgAPIModules, $wgExtensionAliasesFiles;
2321
24 -$wgExtensionMessagesFiles['SemanticWebBrowser'] = $swbgIP . 'SemanticWebBrowser.i18n.php'; // register messages (requires MW=>1.11)
25 -
26 -// Register special pages aliases file
 22+$wgExtensionMessagesFiles['SemanticWebBrowser'] = $swbgIP . 'SemanticWebBrowser.i18n.php';
2723 $wgExtensionAliasesFiles['SemanticWebBrowser'] = $swbgIP . 'SemanticWebBrowser.alias.php';
2824
29 -/*
30 - * create Special Page for Browse Wiki
31 - */
 25+// Special Page for Browse Wiki
3226 $wgAutoloadClasses['SWBSpecialBrowseWiki'] = $swbgIP . 'specials/SearchTriple/SWB_SpecialBrowseWiki.php';
3327 $wgSpecialPages['BrowseWiki'] = 'SWBSpecialBrowseWiki';
3428 $wgSpecialPageGroups['BrowseWiki'] = 'smw_group';
@@ -46,33 +40,28 @@
4741
4842
4943 function registerPropertyTypes() {
50 - // 5 means uri
51 - SMWDataValueFactory::registerDatatype( "_rur",
52 - "SWBResolvableUriValue",
53 - SMWDataItem::TYPE_URI,
54 - $label = false );
 44+ SMWDataValueFactory::registerDatatype( "_rur", "SWBResolvableUriValue",
 45+ SMWDataItem::TYPE_URI, $label = false );
5546
5647 return true;
5748 }
5849
59 -/**include in toolbox for show the last article in "Browsing Semantic Web"
60 - *has the same functionality as 'Browse properties' in the toolbox
61 -**/
62 -
 50+/*
 51+ * Include in toolbox to show the last article in "Browsing Semantic Web".
 52+ * Has the same functionality as 'Browse properties' in the toolbox.
 53+ */
6354 if ( $swbgToolboxBrowseSemWeb ) {
64 - $wgHooks['SkinTemplateToolboxEnd'][] = 'swbfShowBrowseSemWeb';
 55+ $wgHooks['SkinTemplateToolboxEnd'][] = 'swbfShowBrowseSemWeb';
6556 }
6657
6758
68 - function swbfShowBrowseSemWeb( $skintemplate ) {
69 - if ( $skintemplate -> data['isarticle'] ) {
70 - smwfLoadExtensionMessages( 'SemanticWebBrowser' );
 59+function swbfShowBrowseSemWeb( $skintemplate ) {
 60+ if ( $skintemplate->data['isarticle'] ) {
7161 $browselink = SWBInfolink::newBrowsingLink( wfMsg( 'swb_browse_semantic_web' ),
72 - $skintemplate->data['titleprefixeddbkey'], false );
73 -
 62+ $skintemplate->data['titleprefixeddbkey'], false );
7463 echo '<li id="t-smwbrowselink">' . $browselink->getHTML() . '</li>';
75 -
7664 }
 65+
7766 return true;
78 - }
 67+}
7968

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104373== SWB - 2011-11-27 ==...bkaempgen23:16, 27 November 2011