Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -1295,6 +1295,20 @@ |
1296 | 1296 | } |
1297 | 1297 | } |
1298 | 1298 | |
| 1299 | + /* |
| 1300 | + * Lookup the name of a campaign based on the campaign ID |
| 1301 | + */ |
| 1302 | + public static function getNoticeName( $noticeId ) { |
| 1303 | + $dbr = wfGetDB( DB_SLAVE ); |
| 1304 | + if ( is_numeric( $noticeId ) ) { |
| 1305 | + $row = $dbr->selectRow( 'cn_notices', 'not_name', array( 'not_id' => $noticeId ) ); |
| 1306 | + if ( $row ) { |
| 1307 | + return $row->not_name; |
| 1308 | + } |
| 1309 | + } |
| 1310 | + return null; |
| 1311 | + } |
| 1312 | + |
1299 | 1313 | function getNoticeProjects( $noticeName ) { |
1300 | 1314 | $dbr = wfGetDB( DB_SLAVE ); |
1301 | 1315 | $eNoticeName = htmlspecialchars( $noticeName ); |