PluginProbe
Redirection / 4.1
Redirection v4.1
5.10.0 5.9.0 5.8.1 5.8.0 3.7.2 3.7.3 4.0 4.0.1 4.1 4.1.1 4.2 4.2.1 4.2.2 4.2.3 4.3 4.3.1 4.3.2 4.3.3 4.4 4.4.1 4.4.2 4.5 4.5.1 4.6.2 4.7.1 All 130 releases
redirection / database / schema / 233.php

233.php in Redirection 4.1, at database/schema/233.php

18 lines 512 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Note: not localised as the messages aren't important enough
4 class Red_Database_233 extends Red_Database_Upgrader {
5 public function get_stages() {
6 return [
7 'fix_invalid_groups_233' => 'Migrate any groups with invalid module ID',
8 ];
9 }
10
11 protected function fix_invalid_groups_233( $wpdb ) {
12 $this->do_query( $wpdb, "UPDATE {$wpdb->prefix}redirection_groups SET module_id=1 WHERE module_id > 2" );
13
14 $latest = Red_Database::get_latest_database();
15 return $latest->create_groups( $wpdb );
16 }
17 }
18