simetrical@svn.wikimedia.org wrote:
$templates = ($this->preview || $this->section) ? $this->mPreviewTemplates : $this->mArticle->getUsedTemplates();
$templates = $sk->formatTemplates( $templates, $this->preview, $this->section != '');
As a style note: I recommend against reusing a variable for two different types of data like this. It's confusing when reading the code, and can be maddening when splicing new code into the middle of an existing function that does this.
There are a lot of examples of that in older code, unfortunately, but that shouldn't be emulated. ;)
wfMsgExt( 'templatesused', array( 'parse' ) ) .
wfMsgExt( 'templatesused' . ( $preview ? 'preview' : ( $section ? 'section' : '' ) ), array( 'parse' ) ) .
I'm also not sure it's a great idea to build message key references dynamically this way, when it's not really needed.
The way this code is, you won't be able to easily search for where the messages "templatesusedpreview" and "templatesusedsection" get used in the code. That can contribute to maintenance problems later; for instance the messages might get removed on the belief they are no longer being used.
-- brion vibber (brion @ pobox.com)
"Brion Vibber" brion@pobox.com wrote in message news:4561B656.9010805@pobox.com...
simetrical@svn.wikimedia.org wrote:
- $templates = ($this->preview || $this->section) ?
$this->mPreviewTemplates : $this->mArticle->getUsedTemplates();
- $templates = $sk->formatTemplates( $templates, $this->preview,
$this->section != '');
[SNIP]
Is there a reason why replies to mediawiki-cvs are coming to wikitech-l suddenly? Or has that always been the case and up until now there just haven't been any replies?
- Mark Clements (HappyDog)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Mark Clements wrote:
Is there a reason why replies to mediawiki-cvs are coming to wikitech-l suddenly? Or has that always been the case and up until now there just haven't been any replies?
- Mark Clements (HappyDog)
The second answer, though there *were* replies in the past: I think that the last before 16 November 2006 was on 3 September 2006.
"Rotem Liss" rotemliss_net@fastmail.fm wrote in message news:4561CCE6.9020004@fastmail.fm...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Mark Clements wrote:
Is there a reason why replies to mediawiki-cvs are coming to wikitech-l suddenly? Or has that always been the case and up until now there just haven't been any replies?
- Mark Clements (HappyDog)
The second answer, though there *were* replies in the past: I think that
the
last before 16 November 2006 was on 3 September 2006.
OK - I must have missed the earlier replies. I've been on the list since July and don't remember seeing anything.
- Mark Clements (HappyDog)
Mark Clements wrote:
Is there a reason why replies to mediawiki-cvs are coming to wikitech-l suddenly? Or has that always been the case and up until now there just haven't been any replies?
I usually send my comments directly to the developer. It saves embarrassment, although of course it reduces the benefit to other developers.
-- Tim Starling
wikitech-l@lists.wikimedia.org