Refresh modules after usermin install https://www.virtualmin.com/node/19663
authorJamie Cameron <jcameron@webmin.com>
Sat, 1 Oct 2011 17:56:14 +0000 (10:56 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sat, 1 Oct 2011 17:56:14 +0000 (10:56 -0700)
usermin/upgrade.cgi

index 026784c..4ef9d76 100755 (executable)
@@ -273,6 +273,14 @@ else {
                system("rm -rf \"$extract\"");
                }
        }
+
+# Notify Webmin that this module might now be usable
+&foreign_require("webmin", "webmin-lib.pl");
+($inst, $changed) = &webmin::build_installed_modules(0, 'usermin');
+if (@$changed && defined(&theme_post_change_modules)) {
+       &theme_post_change_modules();
+       }
+
 &webmin_log($in{'install'} ? "uinstall" : "upgrade", undef, undef,
            { 'version' => $version, 'mode' => $in{'mode'} });