Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | |
86 | 86 | function efCentralNoticeSetup() { |
87 | 87 | global $wgHooks, $wgNoticeInfrastructure, $wgAutoloadClasses, $wgSpecialPages; |
88 | | - global $wgCentralNoticeLoader; |
| 88 | + global $wgCentralNoticeLoader, $wgSpecialPageGroups; |
89 | 89 | |
90 | 90 | $dir = dirname( __FILE__ ) . '/'; |
91 | 91 | |
Index: trunk/extensions/CentralNotice/CentralNotice.db.php |
— | — | @@ -126,6 +126,8 @@ |
127 | 127 | |
128 | 128 | $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname ); |
129 | 129 | |
| 130 | + $templates = array(); |
| 131 | + |
130 | 132 | if ( $campaigns ) { |
131 | 133 | // Pull templates based on join with assignments |
132 | 134 | $res = $dbr->select( |
— | — | @@ -150,16 +152,16 @@ |
151 | 153 | 'GROUP BY' => 'tmp_name' |
152 | 154 | ) |
153 | 155 | ); |
| 156 | + |
| 157 | + foreach ( $res as $row ) { |
| 158 | + $templates[] = array( |
| 159 | + 'name' => $row->tmp_name, |
| 160 | + 'weight' => intval( $row->total_weight ), |
| 161 | + 'display_anon' => intval( $row->tmp_display_anon ), |
| 162 | + 'display_account' => intval( $row->tmp_display_account ), |
| 163 | + ); |
| 164 | + } |
154 | 165 | } |
155 | | - $templates = array(); |
156 | | - foreach ( $res as $row ) { |
157 | | - $templates[] = array( |
158 | | - 'name' => $row->tmp_name, |
159 | | - 'weight' => intval( $row->total_weight ), |
160 | | - 'display_anon' => intval( $row->tmp_display_anon ), |
161 | | - 'display_account' => intval( $row->tmp_display_account ), |
162 | | - ); |
163 | | - } |
164 | 166 | return $templates; |
165 | 167 | } |
166 | 168 | |