Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -94,13 +94,13 @@ |
95 | 95 | $wgAutoloadClasses['CentralNotice'] = $dir . 'SpecialCentralNotice.php'; |
96 | 96 | $wgAutoloadClasses['CentralNoticeDB'] = $dir . 'CentralNotice.db.php'; |
97 | 97 | $wgAutoloadClasses['TemplatePager'] = $dir . 'TemplatePager.php'; |
| 98 | + $wgAutoloadClasses['SpecialNoticeTemplate'] = $dir . 'SpecialNoticeTemplate.php'; |
98 | 99 | |
99 | 100 | if ( $wgNoticeInfrastructure ) { |
100 | 101 | $wgSpecialPages['CentralNotice'] = 'CentralNotice'; |
101 | 102 | $wgSpecialPageGroups['CentralNotice'] = 'wiki'; // Wiki data and tools" |
102 | 103 | |
103 | 104 | $wgSpecialPages['NoticeTemplate'] = 'SpecialNoticeTemplate'; |
104 | | - $wgAutoloadClasses['SpecialNoticeTemplate'] = $dir . 'SpecialNoticeTemplate.php'; |
105 | 105 | |
106 | 106 | $wgSpecialPages['BannerAllocation'] = 'SpecialBannerAllocation'; |
107 | 107 | $wgAutoloadClasses['SpecialBannerAllocation'] = $dir . 'SpecialBannerAllocation.php'; |
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php |
— | — | @@ -886,7 +886,9 @@ |
887 | 887 | } |
888 | 888 | |
889 | 889 | public static function templateExists( $templateName ) { |
890 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 890 | + global $wgCentralDBname; |
| 891 | + $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname ); |
| 892 | + |
891 | 893 | $eTemplateName = htmlspecialchars( $templateName ); |
892 | 894 | $row = $dbr->selectRow( 'cn_templates', 'tmp_name', |
893 | 895 | array( 'tmp_name' => $eTemplateName ) ); |