Index: trunk/extensions/AbuseFilter/AbuseFilter.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | $wgHooks['AbortDeleteQueueNominate'][] = 'AbuseFilterHooks::onAbortDeleteQueueNominate'; |
57 | 57 | $wgHooks['RecentChange_save'][] = 'AbuseFilterHooks::onRecentChangeSave'; |
58 | 58 | $wgHooks['ListDefinedTags'][] = 'AbuseFilterHooks::onListDefinedTags'; |
| 59 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'AbuseFilterHooks::onLoadExtensionSchemaUpdates'; |
59 | 60 | |
60 | 61 | $wgAvailableRights[] = 'abusefilter-modify'; |
61 | 62 | $wgAvailableRights[] = 'abusefilter-log-detail'; |
— | — | @@ -84,14 +85,6 @@ |
85 | 86 | $wgAjaxExportList[] = 'AbuseFilter::ajaxReAutoconfirm'; |
86 | 87 | $wgAjaxExportList[] = 'AbuseFilter::ajaxGetFilter'; |
87 | 88 | |
88 | | -// DB updates |
89 | | -$wgExtNewTables[] = array( 'abuse_filter', "$dir/abusefilter.tables.sql" ); |
90 | | -$wgExtNewTables[] = array( 'abuse_filter_history', "$dir/db_patches/patch-abuse_filter_history.sql" ); |
91 | | - |
92 | | -$wgExtNewFields[] = array( 'abuse_filter_history', 'afh_changed_fields', "$dir/db_patches/patch-afh_changed_fields.sql" ); |
93 | | -$wgExtNewFields[] = array( 'abuse_filter', 'af_deleted', "$dir/db_patches/patch-af_deleted.sql" ); |
94 | | -$wgExtNewFields[] = array( 'abuse_filter', 'af_actions', "$dir/db_patches/patch-af_actions.sql" ); |
95 | | - |
96 | 89 | // Bump the version number every time you change any of the .css/.js files |
97 | 90 | $wgAbuseFilterStyleVersion = 3; |
98 | 91 | |
Index: trunk/extensions/AbuseFilter/AbuseFilter.hooks.php |
— | — | @@ -165,4 +165,18 @@ |
166 | 166 | |
167 | 167 | return true; |
168 | 168 | } |
| 169 | + |
| 170 | + public static function onLoadExtensionSchemaUpdates() { |
| 171 | + global $wgExtNewTables, $wgExtNewFields; |
| 172 | + |
| 173 | + // DB updates |
| 174 | + $wgExtNewTables[] = array( 'abuse_filter', "$dir/abusefilter.tables.sql" ); |
| 175 | + $wgExtNewTables[] = array( 'abuse_filter_history', "$dir/db_patches/patch-abuse_filter_history.sql" ); |
| 176 | + |
| 177 | + $wgExtNewFields[] = array( 'abuse_filter_history', 'afh_changed_fields', "$dir/db_patches/patch-afh_changed_fields.sql" ); |
| 178 | + $wgExtNewFields[] = array( 'abuse_filter', 'af_deleted', "$dir/db_patches/patch-af_deleted.sql" ); |
| 179 | + $wgExtNewFields[] = array( 'abuse_filter', 'af_actions', "$dir/db_patches/patch-af_actions.sql" ); |
| 180 | + |
| 181 | + return true; |
| 182 | + } |
169 | 183 | } |