"Awjrichards" posted a comment on Wikimedia.r981.
URL: http://www.mediawiki.org/wiki/Special:Code/Wikimedia/981#c27734
Commit summary for Wikimedia.r981:
Removing ablility to set log file as a parameter in
Listener_Adapter_Abstract::openOutputHandle(). See r492.
Awjrichards's comment:
This totally works, but calling $this->getLogFile() twice in the same short
method feels a bit clunky. You might consider something along the lines of:
<pre>
function getLogFile() {
if( empty( $this->logFile )) {
$this->setLogFile();
}
return $this->logFile;
}
<snip>
function openOutputHandle() {
$this->outputHandle = fopen( $this->getLogFile(), 'a' );
}
</pre>
That way the meta log file handling stuff is handled in one place and will
always be handled the same way if you need to get $this->logFile for something
else (assuming you'd want it handled the same way).
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview