r89188 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89187‎ | r89188 | r89189 >
Date:21:07, 30 May 2011
Author:foxtrott
Status:deferred (Comments)
Tags:todo 
Comment:
refactoring, bugfixes (only uses 50 entries; not sorted)
Modified paths:
  • /trunk/extensions/SemanticGlossary/SemanticGlossary.php (modified) (history)
  • /trunk/extensions/SemanticGlossary/SemanticGlossaryBackend.php (added) (history)
  • /trunk/extensions/SemanticGlossary/SemanticGlossaryParser.php (modified) (history)
  • /trunk/extensions/SemanticGlossary/SemanticGlossarySettings.php (deleted) (history)
  • /trunk/extensions/SemanticGlossary/SpecialSemanticGlossaryBrowser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticGlossary/SemanticGlossarySettings.php
@@ -1,26 +0,0 @@
2 -<?php
3 -
4 -/**
5 - * File holding the default settings for the Semantic Glossary extension
6 - *
7 - * @author Stephan Gambke
8 - *
9 - * @file
10 - * @ingroup SemanticGlossary
11 - */
12 -if ( !defined( 'SG_VERSION' ) ) {
13 - die( 'This file is part of the Semantic Glossary extension, it is not a valid entry point.' );
14 -}
15 -
16 -/**
17 - * Class to encapsulate Semantic Glossary settings
18 - * @ingroup SemanticGlossary
19 - */
20 -class SemanticGlossarySettings {
21 -
22 - /**
23 - * @var Contains the characters that may not be part of a term.
24 - */
25 - public $punctuationCharacters = '\.(),;:?!';
26 -}
27 -
Index: trunk/extensions/SemanticGlossary/SpecialSemanticGlossaryBrowser.php
@@ -73,8 +73,7 @@
7474 foreach ( $glossaryarray as $term => $glossaryElement ) {
7575 // One term may have several definitions. Include them all.
7676 while ( ( $key = $glossaryElement->getCurrentKey() ) !== null ) {
77 - $sourceArray = $glossaryElement->getSource( $key );
78 - $source = $sourceArray[2] . ':' . $sourceArray[1] . ':' . $sourceArray[0];
 77+ $source = $glossaryElement->getSource( $key );
7978 $definition = $glossaryElement->getDefinition( $key );
8079 $link = $glossaryElement->getLink( $key );
8180
Index: trunk/extensions/SemanticGlossary/SemanticGlossaryBackend.php
@@ -0,0 +1,102 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the SemanticGlossaryBackend class
 6+ *
 7+ * @author Stephan Gambke
 8+ * @file
 9+ * @ingroup SemanticGlossary
 10+ */
 11+if ( !defined( 'SG_VERSION' ) ) {
 12+ die( 'This file is part of the SemanticGlossary extension, it is not a valid entry point.' );
 13+}
 14+
 15+/**
 16+ * The SemanticGlossaryBackend class.
 17+ *
 18+ * @ingroup SemanticGlossary
 19+ */
 20+class SemanticGlossaryBackend {
 21+
 22+ protected $mQueryResult;
 23+ protected $mResultLine;
 24+ protected $mMessageLog;
 25+ protected $mTerm;
 26+ protected $mDefinition;
 27+ protected $mLink;
 28+ protected $mSource;
 29+
 30+ public function __construct ( SemanticGlossaryMessageLog &$messages = null ) {
 31+
 32+ $this -> mMessageLog = $messages;
 33+
 34+ $store = smwfGetStore(); // default store
 35+ // Create query
 36+ $desc = new SMWSomeProperty( new SMWDIProperty( '___glt' ), new SMWThingDescription() );
 37+ $desc -> addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___glt' ) ) );
 38+ $desc -> addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___gld' ) ) );
 39+ $desc -> addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___gll' ) ) );
 40+
 41+ $query = new SMWQuery( $desc, false, false );
 42+ $query -> sort = true;
 43+ $query -> sortkeys[ '___glt' ] = 'ASC';
 44+
 45+ // get the query result
 46+ $this -> mQueryResult = $store -> getQueryResult( $query );
 47+ }
 48+
 49+ public function next () {
 50+
 51+ // find next line
 52+ while ( $resultline = $this -> mQueryResult -> getNext() ) {
 53+ $this -> mTerm = $resultline[ 0 ] -> getNextText( SMW_OUTPUT_HTML );
 54+ $this -> mDefinition = $resultline[ 1 ] -> getNextText( SMW_OUTPUT_HTML );
 55+ $this -> mLink = $resultline[ 2 ] -> getNextText( SMW_OUTPUT_HTML );
 56+ $this -> mSource = $resultline[ 0 ] -> getResultSubject() -> getTitle() -> getPrefixedText();
 57+
 58+ $nextTerm = $resultline[ 0 ] -> getNextText( SMW_OUTPUT_HTML );
 59+ $nextDefinition = $resultline[ 1 ] -> getNextText( SMW_OUTPUT_HTML );
 60+ $nextLink = $resultline[ 2 ] -> getNextText( SMW_OUTPUT_HTML );
 61+
 62+
 63+ // FIXME: SMW has a bug that right after storing data this data
 64+ // might be available twice. The workaround here is to compare the
 65+ // first and second result and if they are identical assume that
 66+ // it is because of the bug. (2nd condition in the if below)
 67+ // skip if more then one term or more than one definition present
 68+ if ( ( $nextTerm || $nextDefinition || $nextLink ) &&
 69+ !( $nextTerm == $this -> mTerm && $nextDefinition == $this -> mDefinition && $nextLink == $this -> mLink ) ) {
 70+
 71+ if ( $this -> mMessageLog ) {
 72+ $this -> mMessageLog -> addMessage(
 73+ wfMsg( 'semanticglossary-termdefinedtwice', array( $subject -> getTitle() -> getPrefixedText() ) ),
 74+ SemanticGlossaryMessageLog::SG_WARNING );
 75+ }
 76+
 77+ continue;
 78+ }
 79+
 80+ return true;
 81+ }
 82+
 83+ return $resultline != null;
 84+ }
 85+
 86+ function &getTerm () {
 87+ return $this -> mTerm;
 88+ }
 89+
 90+ function &getDefinition () {
 91+ return $this -> mDefinition;
 92+ }
 93+
 94+ function &getLink () {
 95+ return $this -> mLink;
 96+ }
 97+
 98+ function &getSource () {
 99+ return $this -> mSource;
 100+ }
 101+
 102+}
 103+
Property changes on: trunk/extensions/SemanticGlossary/SemanticGlossaryBackend.php
___________________________________________________________________
Added: svn:eol-style
1104 + native
Index: trunk/extensions/SemanticGlossary/SemanticGlossaryParser.php
@@ -32,36 +32,40 @@
3333 * @param $text
3434 * @return Boolean
3535 */
36 - static function parse( &$parser, &$text ) {
 36+ static function parse ( &$parser, &$text ) {
3737 wfProfileIn( __METHOD__ );
3838
3939 if ( !self::$parserSingleton ) {
4040 self::$parserSingleton = new SemanticGlossaryParser();
4141 }
4242
43 - self::$parserSingleton->realParse( $parser, $text );
 43+ self::$parserSingleton -> realParse( $parser, $text );
4444
4545 wfProfileOut( __METHOD__ );
4646
4747 return true;
4848 }
4949
 50+ function getBackend () {
 51+ return new SemanticGlossaryBackend();
 52+ }
 53+
5054 /**
5155 * Returns the list of terms applicable in the current context
5256 *
5357 * @return Array an array mapping terms (keys) to descriptions (values)
5458 */
55 - function getGlossaryArray( SemanticGlossaryMessageLog &$messages = null ) {
 59+ function getGlossaryArray ( SemanticGlossaryMessageLog &$messages = null ) {
5660 wfProfileIn( __METHOD__ );
5761
5862 // build glossary array only once per request
59 - if ( !$this->mGlossaryArray ) {
60 - $this->buildGlossary( $messages );
 63+ if ( !$this -> mGlossaryArray ) {
 64+ $this -> buildGlossary( $messages );
6165 }
6266
6367 wfProfileOut( __METHOD__ );
6468
65 - return $this->mGlossaryArray;
 69+ return $this -> mGlossaryArray;
6670 }
6771
6872 /**
@@ -69,90 +73,44 @@
7074 *
7175 * @return Array an array mapping terms (keys) to descriptions (values)
7276 */
73 - function getGlossaryTree( SemanticGlossaryMessageLog &$messages = null ) {
 77+ function getGlossaryTree ( SemanticGlossaryMessageLog &$messages = null ) {
7478 wfProfileIn( __METHOD__ );
7579
7680 // build glossary array only once per request
77 - if ( !$this->mGlossaryTree ) {
78 - $this->buildGlossary( $messages );
 81+ if ( !$this -> mGlossaryTree ) {
 82+ $this -> buildGlossary( $messages );
7983 }
8084
8185 wfProfileOut( __METHOD__ );
8286
83 - return $this->mGlossaryTree;
 87+ return $this -> mGlossaryTree;
8488 }
8589
86 - protected function buildGlossary( SemanticGlossaryMessageLog &$messages = null ) {
 90+ protected function buildGlossary ( SemanticGlossaryMessageLog &$messages = null ) {
8791 wfProfileIn( __METHOD__ );
8892
89 - $this->mGlossaryTree = new SemanticGlossaryTree();
 93+ $this -> mGlossaryTree = new SemanticGlossaryTree();
9094
91 - $store = smwfGetStore(); // default store
92 - // Create query
93 - $desc = new SMWSomeProperty( new SMWDIProperty( '___glt' ), new SMWThingDescription() );
94 - $desc->addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___glt' ) ) );
95 - $desc->addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___gld' ) ) );
96 - $desc->addPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_PROP, null, SMWPropertyValue::makeProperty( '___gll' ) ) );
 95+ $backend = $this -> getBackEnd();
9796
98 - $query = new SMWQuery( $desc, true, false );
99 - $query->querymode = SMWQuery::MODE_INSTANCES;
100 -
101 - global $smwgQDefaultLimit;
102 - $query->setLimit( $smwgQDefaultLimit );
103 - $query->sortkeys[SG_PROP_GLT] = 'ASC';
104 -
105 - // get the query result
106 - $queryresult = $store->getQueryResult( $query );
107 -
10897 // assemble the result array
109 - $this->mGlossaryArray = array();
110 - while ( ( $resultline = $queryresult->getNext() ) ) {
111 - $term = $resultline[0]->getNextText( SMW_OUTPUT_HTML );
112 - $definition = $resultline[1]-> getNextText( SMW_OUTPUT_HTML );
113 - $link = $resultline[2]->getNextText( SMW_OUTPUT_HTML );
114 - $subject = $resultline[0]->getResultSubject();
 98+ $this -> mGlossaryArray = array( );
 99+ while ( $backend -> next() ) {
115100
116 - // FIXME: SMW has a bug that right after storing data this data
117 - // might be available twice. The workaround here is to compare the
118 - // first and second result and if they are identical assume that
119 - // it is because of the bug. (2nd condition in the if below)
120 -
121 - $nextTerm = $resultline[0]->getNextText( SMW_OUTPUT_HTML );
122 - $nextDefinition = $resultline[1]->getNextText( SMW_OUTPUT_HTML );
123 -
124 - // skip if more then one term or more than one definition present
125 - if ( ( $nextTerm || $nextDefinition ) &&
126 - !( $nextTerm == $term && $nextDefinition == $definition ) ) {
127 -
128 - if ( $messages ) {
129 - $messages->addMessage(
130 - wfMsg( 'semanticglossary-termdefinedtwice', array( $subject->getTitle()->getPrefixedText() ) ),
131 - SemanticGlossaryMessageLog::SG_WARNING );
132 - }
133 -
134 - continue;
135 - }
136 -
137 - $source = array(
138 - $subject->getDBkey(),
139 - $subject->getNamespace(),
140 - $subject->getInterwiki()
141 - );
142 -
143101 $elementData = array(
144 - SemanticGlossaryElement::SG_TERM => $term,
145 - SemanticGlossaryElement::SG_DEFINITION => $definition,
146 - SemanticGlossaryElement::SG_LINK => $link,
147 - SemanticGlossaryElement::SG_SOURCE => $source
 102+ SemanticGlossaryElement::SG_TERM => ($term = $backend -> getTerm()),
 103+ SemanticGlossaryElement::SG_DEFINITION => $backend -> getDefinition(),
 104+ SemanticGlossaryElement::SG_LINK => $backend -> getLink(),
 105+ SemanticGlossaryElement::SG_SOURCE => $backend -> getSource()
148106 );
149107
150 - if ( array_key_exists( $term, $this->mGlossaryArray ) ) {
151 - $this->mGlossaryArray[$term]->addDefinition( $elementData );
 108+ if ( array_key_exists( $term, $this -> mGlossaryArray ) ) {
 109+ $this -> mGlossaryArray[ $term ] -> addDefinition( $elementData );
152110 } else {
153 - $this->mGlossaryArray[$term] = new SemanticGlossaryElement( $elementData );
 111+ $this -> mGlossaryArray[ $term ] = new SemanticGlossaryElement( $elementData );
154112 }
155113
156 - $this->mGlossaryTree->addTerm( $term, $elementData );
 114+ $this -> mGlossaryTree -> addTerm( $term, $elementData );
157115 }
158116
159117 wfProfileOut( __METHOD__ );
@@ -167,18 +125,18 @@
168126 * @param $text
169127 * @return Boolean
170128 */
171 - protected function realParse( &$parser, &$text ) {
172 - global $wgRequest, $sggSettings;
 129+ protected function realParse ( &$parser, &$text ) {
 130+ global $wgRequest;
173131
174132 wfProfileIn( __METHOD__ );
175133
176 - $action = $wgRequest->getVal( 'action', 'view' );
 134+ $action = $wgRequest -> getVal( 'action', 'view' );
177135
178136 if ( $text == null ||
179137 $text == '' ||
180138 $action == 'edit' ||
181139 $action == 'ajax' ||
182 - isset( $_POST['wpPreview'] )
 140+ isset( $_POST[ 'wpPreview' ] )
183141 ) {
184142
185143 wfProfileOut( __METHOD__ );
@@ -186,7 +144,7 @@
187145 }
188146
189147 // Get array of terms
190 - $glossary = $this->getGlossaryTree();
 148+ $glossary = $this -> getGlossaryTree();
191149
192150 if ( $glossary == null ) {
193151 wfProfileOut( __METHOD__ );
@@ -199,7 +157,7 @@
200158 wfSuppressWarnings();
201159
202160 $doc = DOMDocument::loadHTML(
203 - '<html><meta http-equiv="content-type" content="charset=utf-8"/>' . $text . '</html>'
 161+ '<html><meta http-equiv="content-type" content="charset=utf-8"/>' . $text . '</html>'
204162 );
205163
206164 wfRestoreWarnings();
@@ -208,55 +166,55 @@
209167 wfProfileIn( __METHOD__ . ' 2 xpath' );
210168 // Find all text in HTML.
211169 $xpath = new DOMXpath( $doc );
212 - $elements = $xpath->query(
213 - "//*[not(ancestor-or-self::*[@class='noglossary'] or ancestor-or-self::a)][text()!=' ']/text()"
 170+ $elements = $xpath -> query(
 171+ "//*[not(ancestor-or-self::*[@class='noglossary'] or ancestor-or-self::a)][text()!=' ']/text()"
214172 );
215173 wfProfileOut( __METHOD__ . ' 2 xpath' );
216174
217175 // Iterate all HTML text matches
218 - $nb = $elements->length;
 176+ $nb = $elements -> length;
219177 $changedDoc = false;
220178
221179 for ( $pos = 0; $pos < $nb; $pos++ ) {
222 - $el = $elements->item( $pos );
 180+ $el = $elements -> item( $pos );
223181
224 - if ( strlen( $el->nodeValue ) < $glossary->getMinTermLength() ) {
 182+ if ( strlen( $el -> nodeValue ) < $glossary -> getMinTermLength() ) {
225183 continue;
226184 }
227185
228186 wfProfileIn( __METHOD__ . ' 3 lexer' );
229 - $matches = array();
 187+ $matches = array( );
230188 preg_match_all(
231189 '/[[:alpha:]]+|[^[:alpha:]]/u',
232 - $el->nodeValue,
 190+ $el -> nodeValue,
233191 $matches,
234192 PREG_OFFSET_CAPTURE | PREG_PATTERN_ORDER
235193 );
236194 wfProfileOut( __METHOD__ . ' 3 lexer' );
237195
238 - if ( count( $matches ) == 0 || count( $matches[0] ) == 0 ) {
 196+ if ( count( $matches ) == 0 || count( $matches[ 0 ] ) == 0 ) {
239197 continue;
240198 }
241199
242 - $lexemes = &$matches[0];
 200+ $lexemes = &$matches[ 0 ];
243201 $countLexemes = count( $lexemes );
244 - $parent = &$el->parentNode;
 202+ $parent = &$el -> parentNode;
245203 $index = 0;
246204 $changedElem = false;
247205
248206 while ( $index < $countLexemes ) {
249207 wfProfileIn( __METHOD__ . ' 4 findNextTerm' );
250 - list( $skipped, $used, $definition ) = $glossary->findNextTerm( $lexemes, $index, $countLexemes );
 208+ list( $skipped, $used, $definition ) = $glossary -> findNextTerm( $lexemes, $index, $countLexemes );
251209 wfProfileOut( __METHOD__ . ' 4 findNextTerm' );
252210
253211 wfProfileIn( __METHOD__ . ' 5 insert' );
254212 if ( $used > 0 ) { // found a term
255213 if ( $skipped > 0 ) { // skipped some text, insert it as is
256 - $parent->insertBefore(
257 - $doc->createTextNode(
258 - substr( $el->nodeValue,
259 - $currLexIndex = $lexemes[$index][1],
260 - $lexemes[$index + $skipped][1] - $currLexIndex )
 214+ $parent -> insertBefore(
 215+ $doc -> createTextNode(
 216+ substr( $el -> nodeValue,
 217+ $currLexIndex = $lexemes[ $index ][ 1 ],
 218+ $lexemes[ $index + $skipped ][ 1 ] - $currLexIndex )
261219 ),
262220 $el
263221 );
@@ -269,22 +227,22 @@
270228 $span -> setAttribute( 'class', 'tooltip' );
271229
272230 // Wrap abbreviation in <span> tags, hidden
273 - $lastLex = $lexemes[$index + $used - 1];
274 - $spanTerm = $doc->createElement( 'span',
275 - substr( $el->nodeValue,
276 - $currLexIndex = $lexemes[$index][1],
277 - $lastLex[1] - $currLexIndex + strlen( $lastLex[0] ) )
 231+ $lastLex = $lexemes[ $index + $used - 1 ];
 232+ $spanTerm = $doc -> createElement( 'span',
 233+ substr( $el -> nodeValue,
 234+ $currLexIndex = $lexemes[ $index ][ 1 ],
 235+ $lastLex[ 1 ] - $currLexIndex + strlen( $lastLex[ 0 ] ) )
278236 );
279 - $spanTerm->setAttribute( 'class', 'tooltip_abbr' );
 237+ $spanTerm -> setAttribute( 'class', 'tooltip_abbr' );
280238
281239 // Wrap definition in <span> tags, hidden
282 - $spanDefinition = $definition->getFullDefinition( $doc );
283 - $spanDefinition->setAttribute( 'class', 'tooltip_tip' );
 240+ $spanDefinition = $definition -> getFullDefinition( $doc );
 241+ $spanDefinition -> setAttribute( 'class', 'tooltip_tip' );
284242
285243 // insert term and definition
286 - $span->appendChild( $spanTerm );
287 - $span->appendChild( $spanDefinition );
288 - $parent->insertBefore( $span, $el );
 244+ $span -> appendChild( $spanTerm );
 245+ $span -> appendChild( $spanDefinition );
 246+ $parent -> insertBefore( $span, $el );
289247
290248 $changedElem = true;
291249 } else { // did not find term, just use the rest of the text
@@ -293,9 +251,9 @@
294252 // element at all.
295253 // Only change element if found term before
296254 if ( $changedElem ) {
297 - $parent->insertBefore(
298 - $doc->createTextNode(
299 - substr( $el->nodeValue, $lexemes[$index][1] )
 255+ $parent -> insertBefore(
 256+ $doc -> createTextNode(
 257+ substr( $el -> nodeValue, $lexemes[ $index ][ 1 ] )
300258 ),
301259 $el
302260 );
@@ -315,21 +273,20 @@
316274 }
317275
318276 if ( $changedElem ) {
319 - $parent->removeChild( $el );
 277+ $parent -> removeChild( $el );
320278 $changedDoc = true;
321279 }
322 -
323280 }
324281
325282 if ( $changedDoc ) {
326 - $body = $xpath->query( '/html/body' );
 283+ $body = $xpath -> query( '/html/body' );
327284
328285 $text = '';
329 - foreach ( $body->item( 0 )->childNodes as $child ) {
330 - $text .= $doc->saveXML( $child );
 286+ foreach ( $body -> item( 0 ) -> childNodes as $child ) {
 287+ $text .= $doc -> saveXML( $child );
331288 }
332289
333 - $this->loadModules( $parser );
 290+ $this -> loadModules( $parser );
334291 }
335292
336293 wfProfileOut( __METHOD__ );
@@ -337,20 +294,20 @@
338295 return true;
339296 }
340297
341 - protected function loadModules( &$parser ) {
 298+ protected function loadModules ( &$parser ) {
342299 global $wgOut, $wgScriptPath;
343300
344301 if ( defined( 'MW_SUPPORTS_RESOURCE_MODULES' ) ) {
345302 if ( !is_null( $parser ) ) {
346 - $parser->getOutput()->addModules( 'ext.SemanticGlossary' );
 303+ $parser -> getOutput() -> addModules( 'ext.SemanticGlossary' );
347304 } else {
348 - $wgOut->addModules( 'ext.SemanticGlossary' );
 305+ $wgOut -> addModules( 'ext.SemanticGlossary' );
349306 }
350307 } else {
351 - if ( !is_null( $parser ) && ( $wgOut->isArticle() ) ) {
352 - $parser->getOutput()->addHeadItem( '<link rel="stylesheet" href="' . $wgScriptPath . '/extensions/SemanticGlossary/skins/SemanticGlossary.css" />', 'ext.SemanticGlossary.css' );
 308+ if ( !is_null( $parser ) && ( $wgOut -> isArticle() ) ) {
 309+ $parser -> getOutput() -> addHeadItem( '<link rel="stylesheet" href="' . $wgScriptPath . '/extensions/SemanticGlossary/skins/SemanticGlossary.css" />', 'ext.SemanticGlossary.css' );
353310 } else {
354 - $wgOut->addHeadItem( 'ext.SemanticGlossary.css', '<link rel="stylesheet" href="' . $wgScriptPath . '/extensions/SemanticGlossary/skins/SemanticGlossary.css" />' );
 311+ $wgOut -> addHeadItem( 'ext.SemanticGlossary.css', '<link rel="stylesheet" href="' . $wgScriptPath . '/extensions/SemanticGlossary/skins/SemanticGlossary.css" />' );
355312 }
356313 }
357314 }
Index: trunk/extensions/SemanticGlossary/SemanticGlossary.php
@@ -35,7 +35,7 @@
3636 $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array(
3737 'path' => __FILE__,
3838 'name' => 'Semantic Glossary',
39 - 'author' => '[http://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]',
 39+ 'author' => '[[mw:User:F.trott|Stephan Gambke]]',
4040 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Glossary',
4141 'descriptionmsg' => 'semanticglossary-desc',
4242 'version' => SG_VERSION,
@@ -53,6 +53,7 @@
5454 $wgAutoloadClasses['SemanticGlossaryParser'] = $dir . '/SemanticGlossaryParser.php';
5555 $wgAutoloadClasses['SemanticGlossaryTree'] = $dir . '/SemanticGlossaryTree.php';
5656 $wgAutoloadClasses['SemanticGlossaryElement'] = $dir . '/SemanticGlossaryElement.php';
 57+$wgAutoloadClasses['SemanticGlossaryBackend'] = $dir . '/SemanticGlossaryBackend.php';
5758 $wgAutoloadClasses['SemanticGlossaryMessageLog'] = $dir . '/SemanticGlossaryMessageLog.php';
5859 $wgAutoloadClasses['SpecialSemanticGlossaryBrowser'] = $dir . '/SpecialSemanticGlossaryBrowser.php';
5960
@@ -96,9 +97,6 @@
9798 // Create new permission 'editglossary' and assign it to usergroup 'user' by default
9899 $wgGroupPermissions['user']['editglossary'] = true;
99100
100 -// create and initialize settings object
101 -$sggSettings = new SemanticGlossarySettings();
102 -
103101 /**
104102 * Handler for late setup of Semantic Glossary
105103 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r89231followup r89188: markup style improved, generation of term/definition html mo...foxtrott22:00, 31 May 2011

Comments

#Comment by Jack Phoenix (talk | contribs)   21:55, 30 May 2011

Seems that this commit reverts most, if not all, of my spacing tweaks done in r89177. I'm tagging this as FIXME due to that.

#Comment by F.trott (talk | contribs)   19:11, 31 May 2011

Sorry about that, I was not aware of your changes. Will fix it with one of the next commits.

This might have been avoided if you had just notified me that you contributed to the code. Marking your commit as followup would have done the trick, the system would have sent me an email.

Then again, common courtesy would of course have been to talk to me _before_ you started tinkering.

#Comment by Reach Out to the Truth (talk | contribs)   23:18, 30 May 2011

You shouldn't expect the mw prefix to be present in the interwiki table.

#Comment by P858snake (talk | contribs)   07:37, 31 May 2011

It's in the default install from 1.16, so it should be fine unless the ext wants BC to something like 1.15 (Was r1=49183&r2=56457 added in 2009 by demon)

#Comment by P858snake (talk | contribs)   07:38, 31 May 2011

the second url was: [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/interwiki.sql?[[Special:Code/MediaWiki/1|r1]]=49183&[[Special:Code/MediaWiki/2|r2]]=56457 http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/interwiki.sql?[[Special:Code/MediaWiki/1|r1]]=49183&[[Special:Code/MediaWiki/2|r2]]=56457] (and yes i know that broken, but thats CR for you)

#Comment by Reach Out to the Truth (talk | contribs)   16:58, 31 May 2011

I don't think entries are added to the interwiki table on upgrade, are they? If it's not added on upgrade, there's no guarantee that the mw prefix will be there in 1.16 or later.

Alternatively, a sysadmin might decide to remove or retool the mw prefix, which would also break the link.

#Comment by F.trott (talk | contribs)   19:12, 31 May 2011

Ok, thanks. wasn't aware that is was only introduced in 1.16. Will put in external links again. Shame though, internal links look much nicer.

#Comment by Brion VIBBER (talk | contribs)   00:37, 2 June 2011

Switching this from fixme status to deferred with a todo tag; not part of core or Wikimedia extensions deployment, so taking it off the core fixme radar for now.

Status & tagging log