Extension talk:Sort
Issues
editThe README refers to another extension as a reference
require_once( "{$IP}/extensions/MinimumNameLength/MinimumNameLength.php" );
if you have [1] [2] style links in your sort they will come out in random order on your page. so in the following example one.a's link could be [3] or it could be [1], same with two.a
== one == <sort> * item b [http://google.com/] * item a [http://google.com/] </sort> == two == <sort> * item b [http://google.com/] * item a [http://google.com/] </sort>
Sublevel sort
editHello, i want to sort a list like this:
<sort> * Level 1 ** bla a ** bla b *** bla c * Level 2 ** blub a ** blub c *** blub b </sort>
Has someone an idea to realize this?? Thank you very much for your help!
Bugs
editThe third parameter to efRenderSort in Sort.php is a reference, that should be a value. The extension uses parser->parse which breaks things (e.g. the Cite extension outputs its warning when it doesn't find the references tag, because it thinks it's at the end of the article), it should be using recursiveTagParse instead (in Sorter.class.php, Sorter::parse)
Index: Sort.class.php
===================================================================
--- Sort.class.php (revision 77344)
+++ Sort.class.php (working copy)
@@ -117,10 +117,9 @@
*/
protected function parse( $text ) {
wfProfileIn( __METHOD__ );
- $output = $this->parser->parse( $text, $this->parser->mTitle,
- $this->parser->mOptions, true, false );
+ $output = $this->parser->recursiveTagParse( $text );
wfProfileOut( __METHOD__ );
- return $output->getText();
+ return $output;
}
-}
\ No newline at end of file
+}
Index: Sort.php
===================================================================
--- Sort.php (revision 77344)
+++ Sort.php (working copy)
@@ -41,7 +41,7 @@
* @param Parser $parser Parent parser
* @return string
*/
-function efRenderSort( $input, $args, &$parser ) {
+function efRenderSort( $input, $args, $parser ) {
$sorter = new Sorter( $parser );
$sorter->loadSettings( $args );
return $sorter->sort( $input );
Code review, deployment on Wikimedia Foundation sites
editHi! per comments in Bugzilla, some issues with the Sort extension need to be fixed before we can deploy the extension to Wikimedia Foundation sites. The Hindi Wikipedia is eager to have it, so it would be great if you could reply on the bug! Thanks. Sumana Harihareswara, Engineering Community Manager (talk) 17:49, 30 August 2012 (UTC)