r93501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93500‎ | r93501 | r93502 >
Date:00:57, 30 July 2011
Author:kaldari
Status:ok
Tags:
Comment:
declaring some methods public that need to be public - for unit tests etc
Modified paths:
  • /trunk/extensions/CentralNotice/special/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/special/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/special/SpecialCentralNotice.php
@@ -1233,7 +1233,7 @@
12341234 /**
12351235 * Assign a banner to a campaign at a certain weight
12361236 */
1237 - function addTemplateTo( $noticeName, $templateName, $weight ) {
 1237+ public function addTemplateTo( $noticeName, $templateName, $weight ) {
12381238 $dbr = wfGetDB( DB_SLAVE );
12391239
12401240 $eNoticeName = htmlspecialchars ( $noticeName );
@@ -1350,7 +1350,7 @@
13511351 /**
13521352 * Remove a banner assignment from a campaign
13531353 */
1354 - function removeTemplateFor( $noticeName, $templateName ) {
 1354+ public function removeTemplateFor( $noticeName, $templateName ) {
13551355 $dbw = wfGetDB( DB_MASTER );
13561356 $dbw->begin();
13571357 $noticeId = CentralNotice::getNoticeId( $noticeName );
Index: trunk/extensions/CentralNotice/special/SpecialNoticeTemplate.php
@@ -746,7 +746,7 @@
747747 return null;
748748 }
749749
750 - private function removeTemplate ( $name ) {
 750+ public function removeTemplate ( $name ) {
751751 $id = SpecialNoticeTemplate::getTemplateId( $name );
752752 $dbr = wfGetDB( DB_SLAVE );
753753 $res = $dbr->select( 'cn_assignments', 'asn_id', array( 'tmp_id' => $id ), __METHOD__ );

Status & tagging log