Extension talk:Data

Indexes
What indexing should be used on the data_extension table. John Stanton 19:47, 4 November 2006 (UTC)


 * I think at least item and key columns should be indexed. Nikola 02:28, 16 November 2006 (UTC)

Code
It seems that the following is needed to avoid PHP warnings:

$wgHooks['LanguageGetMagic'][] = 'wfDataLanguageGetMagic';

function wfDataLanguageGetMagic( &$magicWords, $langCode ) { switch ( $langCode ) { default: $magicWords['data']         = array( 0, 'data' ); $magicWords['sort']         = array( 0, 'sort' ); }   return true; }

Patrick 11:36, 5 February 2007 (UTC)

Added default handling
Hi!

I just want to inform you that I have added the handling of defaults to the get function, so that one can use constructs like

which will output "default" if key is not set. I have made it such, that it looks like parameter references in templates

I noticed that I needed this functionality pretty often, and that it can replace the somewhat lengthy

If you want to include this functionality into the extension, just go ahead. Here is the modified "get" function:

Cheers --141.2.138.89 16:27, 6 November 2007 (UTC) (de:Benutzer:olenz)