r72128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72127‎ | r72128 | r72129 >
Date:17:52, 1 September 2010
Author:kaldari
Status:ok
Tags:
Comment:
change getJsOutput() to getOutput() in preparation for BannerLoader
Modified paths:
  • /trunk/extensions/CentralNotice/NoticePage.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeLocal.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeText.php (modified) (history)
  • /trunk/extensions/CentralNotice/rebuildLocalTemplates.php (modified) (history)
  • /trunk/extensions/CentralNotice/rebuildTemplates.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -946,7 +946,7 @@
947947
948948 /**
949949 * Lookup function for active banners under a given language and project. This function is
950 - * called by SpecialNoticeText::getJsOutput() in order to build the static Javascript files for
 950+ * called by SpecialNoticeText::getOutput() in order to build the static Javascript files for
951951 * each project.
952952 * @return A 2D array of running banners with associated weights and settings
953953 */
Index: trunk/extensions/CentralNotice/SpecialNoticeLocal.php
@@ -12,7 +12,7 @@
1313 return 7200;
1414 }
1515
16 - function getJsOutput( $par ) {
 16+ function getOutput( $par ) {
1717 $text = '';
1818 if ( $par == 'anonnotice.js' ) {
1919 $text = wfGetCachedNotice( 'anonnotice' );
Index: trunk/extensions/CentralNotice/rebuildTemplates.php
@@ -30,7 +30,7 @@
3131 echo "$key\n";
3232
3333 $builder = new SpecialNoticeText();
34 - $js = $builder->getJsOutput( $key );
 34+ $js = $builder->getOutput( $key );
3535
3636 if ( isset( $options['o'] ) ) {
3737 $outputDir = "$wgNoticeCentralDirectory/$project/$lang";
Index: trunk/extensions/CentralNotice/NoticePage.php
@@ -5,13 +5,13 @@
66 global $wgOut;
77 $wgOut->disable();
88 $this->sendHeaders();
9 - $js = $this->getJsOutput( $par );
 9+ $content = $this->getOutput( $par );
1010
11 - if ( strlen( $js ) == 0 ) {
 11+ if ( strlen( $content ) == 0 ) {
1212 /* Hack for IE/Mac 0-length keepalive problem, see RawPage.php */
1313 echo "/* Empty */";
1414 } else {
15 - echo $js;
 15+ echo $content;
1616 }
1717 }
1818
@@ -40,7 +40,7 @@
4141 // header( "Last-modified: $epoch" );
4242 }
4343
44 - function getJsOutput( $par ) {
 44+ function getOutput( $par ) {
4545 return "";
4646 }
4747 }
Index: trunk/extensions/CentralNotice/rebuildLocalTemplates.php
@@ -22,7 +22,7 @@
2323 echo "$wgDBname/$key\n";
2424
2525 $builder = new SpecialNoticeLocal();
26 - $js = $builder->getJsOutput( $key );
 26+ $js = $builder->getOutput( $key );
2727
2828 $outputDir = $wgNoticeLocalDirectory;
2929 if ( wfMkDirParents( $outputDir ) ) {
Index: trunk/extensions/CentralNotice/SpecialNoticeText.php
@@ -27,7 +27,7 @@
2828 /**
2929 * Given a project key, generate the body for a static Javascript file
3030 */
31 - function getJsOutput( $par ) {
 31+ function getOutput( $par ) {
3232
3333 // Break $par into separate parameters and assign to $this->project and $this->language
3434 $this->setLanguage( $par );

Status & tagging log