Extension talk:HashTables/Archive

From MediaWiki.org
Jump to: navigation, search
This is an archive of past discussions.
Archive
Please do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.

#hashtotemplate stripping special characters is problematic

When #hashtotemplate strips out pipes, it means that the user can't pass things like multipart wikilinks to templates. This seems like a severe impediment to effective wiki usage, and to transparency of this mechanism. Is there a workaround for this? Would it be relatively easy to fix this in the extension code? --Memethief 03:51, 16 April 2011 (UTC)

I ran into this problem before and I built some workaround in 0.6.2. I just updated the documentation on this. --Danwe 13:17, 16 April 2011 (UTC)

function parameterstohash references an undefined variable

Function parameterstohash accesses an undefined variable $hashId, resulting in a PHP notice, "Undefined variable". Here the code:

    function parameterstohash( &$parser, $frame, $args) {
                if( !isset($args[0]) )
                        return '';
 
                //in case the page is not used as template i.e. when displayed by it's own...
        if( !( $frame instanceof PPTemplateFrame_Dom ) )
        {
                        $this->mHashTables[$hashId] = array();  //create void hash table
                        return '';
        }

This line has the undefined variable:

                        $this->mHashTables[$hashId] = array();  //create void hash table

--Maiden taiwan 20:37, 2 August 2011 (UTC)

Thanks, it's solved now. --Danwe 03:46, 3 August 2011 (UTC)
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox