Index: trunk/extensions/CentralNotice/special/SpecialCentralNotice.php |
— | — | @@ -1331,7 +1331,7 @@ |
1332 | 1332 | return null; |
1333 | 1333 | } |
1334 | 1334 | |
1335 | | - function getNoticeProjects( $noticeName ) { |
| 1335 | + static function getNoticeProjects( $noticeName ) { |
1336 | 1336 | $dbr = wfGetDB( DB_SLAVE ); |
1337 | 1337 | $eNoticeName = htmlspecialchars( $noticeName ); |
1338 | 1338 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
— | — | @@ -1346,7 +1346,7 @@ |
1347 | 1347 | return $projects; |
1348 | 1348 | } |
1349 | 1349 | |
1350 | | - function getNoticeLanguages( $noticeName ) { |
| 1350 | + static function getNoticeLanguages( $noticeName ) { |
1351 | 1351 | $dbr = wfGetDB( DB_SLAVE ); |
1352 | 1352 | $eNoticeName = htmlspecialchars( $noticeName ); |
1353 | 1353 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
— | — | @@ -1361,7 +1361,7 @@ |
1362 | 1362 | return $languages; |
1363 | 1363 | } |
1364 | 1364 | |
1365 | | - function getNoticeCountries( $noticeName ) { |
| 1365 | + static function getNoticeCountries( $noticeName ) { |
1366 | 1366 | $dbr = wfGetDB( DB_SLAVE ); |
1367 | 1367 | $eNoticeName = htmlspecialchars( $noticeName ); |
1368 | 1368 | $row = $dbr->selectRow( 'cn_notices', 'not_id', array( 'not_name' => $eNoticeName ) ); |
Index: trunk/extensions/CentralNotice/CentralNotice.db.php |
— | — | @@ -156,7 +156,14 @@ |
157 | 157 | 'geo' => $row->not_geo |
158 | 158 | ); |
159 | 159 | } |
160 | | - // TODO: Add languages, projects, and countries |
| 160 | + |
| 161 | + $projects = CentralNotice::getNoticeProjects( $campaignName ); |
| 162 | + $languages = CentralNotice::getNoticeLanguages( $campaignName ); |
| 163 | + $geo_countries = CentralNotice::getNoticeCountries( $campaignName ); |
| 164 | + $campaign['projects'] = implode( ", ", $projects ); |
| 165 | + $campaign['languages'] = implode( ", ", $languages ); |
| 166 | + $campaign['countries'] = implode( ", ", $geo_countries ); |
| 167 | + |
161 | 168 | return $campaign; |
162 | 169 | } |
163 | 170 | |