MDL-60039 search: Force messaging search areas to be reindexed
authorDavid Monllao <david.monllao@gmail.com>
Wed, 6 Sep 2017 12:00:56 +0000 (14:00 +0200)
committerDavid Monllao <davidm@moodle.com>
Tue, 12 Sep 2017 09:57:00 +0000 (11:57 +0200)
lib/db/upgrade.php
version.php

index 945b3bf..24ebec2 100644 (file)
@@ -2436,5 +2436,15 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2017082800.00);
     }
 
         upgrade_main_savepoint(true, 2017082800.00);
     }
 
+    if ($oldversion < 2017090700.01) {
+
+        // Force all messages to be reindexed.
+        set_config('core_message_message_sent_lastindexrun', '0', 'core_search');
+        set_config('core_message_message_received_lastindexrun', '0', 'core_search');
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2017090700.01);
+    }
+
     return true;
 }
     return true;
 }
index 5460083..803b74a 100644 (file)
@@ -29,7 +29,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
 
 defined('MOODLE_INTERNAL') || die();
 
-$version  = 2017090700.00;              // YYYYMMDD      = weekly release date of this DEV branch.
+$version  = 2017090700.01;              // YYYYMMDD      = weekly release date of this DEV branch.
                                         //         RR    = release increments - 00 in DEV branches.
                                         //           .XX = incremental changes.
 
                                         //         RR    = release increments - 00 in DEV branches.
                                         //           .XX = incremental changes.