Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | // Set since this is a single display |
116 | 116 | if ( $method == 'listNoticeDetail' ) { |
117 | 117 | $notice = $wgRequest->getVal ( 'notice' ); |
118 | | - $this->centralNoticeDB->updatePreferred( $notice, '1' ); |
| 118 | + $this->updatePreferred( $notice, '1' ); |
119 | 119 | } |
120 | 120 | else { |
121 | 121 | // Build list of campaigns to unset |
— | — | @@ -122,10 +122,10 @@ |
123 | 123 | |
124 | 124 | // Set flag accordingly |
125 | 125 | foreach ( $preferredNotices as $notice ) { |
126 | | - $this->centralNoticeDB->updatePreferred( $notice, '1' ); |
| 126 | + $this->updatePreferred( $notice, '1' ); |
127 | 127 | } |
128 | 128 | foreach ( $unsetNotices as $notice ) { |
129 | | - $this->centralNoticeDB->updatePreferred( $notice, '0' ); |
| 129 | + $this->updatePreferred( $notice, '0' ); |
130 | 130 | } |
131 | 131 | } |
132 | 132 | } |
— | — | @@ -177,11 +177,11 @@ |
178 | 178 | if ( !isset( $preferredNotices ) && $method !== 'addNotice' ) { |
179 | 179 | if ( $method == 'listNoticeDetail' ) { |
180 | 180 | $notice = $wgRequest->getVal ( 'notice' ); |
181 | | - $this->centralNoticeDB->updatePreferred( $notice, 0 ); |
| 181 | + $this->updatePreferred( $notice, 0 ); |
182 | 182 | } else { |
183 | 183 | $allNotices = $this->getNoticesName(); |
184 | 184 | foreach ( $allNotices as $notice ) { |
185 | | - $this->centralNoticeDB->updatePreferred( $notice, '0' ); |
| 185 | + $this->updatePreferred( $notice, '0' ); |
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |