Log and restart Apache/FPM after installing a PHP module

This commit is contained in:
Jamie Cameron
2024-12-01 10:24:40 -08:00
parent 1db2df6bdf
commit 7de796620c
3 changed files with 8 additions and 0 deletions

View File

@@ -64,6 +64,8 @@ if (!$ok) {
else {
print "<b>$text{'imod_alldone'}</b><p>\n";
}
&graceful_apache_restart($in{'file'});
&webmin_log("imod", undef, $in{'file'}, { 'mod' => $in{'mod'} }) if ($ok);
&ui_print_footer("edit_mods.cgi?file=".&urlize($in{'file'}),
$text{'mods_return'});

View File

@@ -177,6 +177,7 @@ mods_desc=This page can be used to globally enable and disable PHP modules for a
mods_enabled=Enabled?
mods_name=Module name
mods_file=Config file
mods_pkg=Package
mods_idesc=PHP modules not available on this system can be installed from configured software package repositories.
mods_newpkg=Add PHP module:
mods_install=Install Now
@@ -208,6 +209,7 @@ log_limits=Changed resource limits in $1
log_errors=Changed error logging in $1
log_misc=Changed other settings in $1
log_mods=Updated enabled modules in $1
log_imod=Installed PHP module $2 in $1
acl_global=Can edit global PHP configuration?
acl_anyfile=Can edit any file as a PHP configuration?

View File

@@ -8,6 +8,10 @@ do 'phpini-lib.pl';
sub parse_webmin_log
{
local ($user, $script, $action, $type, $object, $p) = @_;
if ($action eq "imod") {
return &text('log_'.$action, "<tt>".&html_escape($object)."</tt>",
"<tt>".&html_escape($p->{'mod'})."</tt>");
}
return &text('log_'.$action, "<tt>".&html_escape($object)."</tt>");
}