BUG-12021 Plugins Audit Log
Plugins Audit Log
This commit is contained in:
@@ -42,6 +42,7 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
|||||||
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
$details = $oPluginRegistry->getPluginDetails( $pluginFile );
|
||||||
$oPluginRegistry->disablePlugin( $details->sNamespace );
|
$oPluginRegistry->disablePlugin( $details->sNamespace );
|
||||||
$size = file_put_contents( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance() );
|
$size = file_put_contents( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance() );
|
||||||
|
G::auditLog("DisablePlugin", "Plugin Name: ".$details->sNamespace);
|
||||||
print "size saved : $size <br>";
|
print "size saved : $size <br>";
|
||||||
} else {
|
} else {
|
||||||
//print "change to ENABLED";
|
//print "change to ENABLED";
|
||||||
@@ -50,6 +51,7 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
|||||||
$oPluginRegistry->enablePlugin( $details->sNamespace );
|
$oPluginRegistry->enablePlugin( $details->sNamespace );
|
||||||
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
|
||||||
$size = file_put_contents( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance() );
|
$size = file_put_contents( PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance() );
|
||||||
|
G::auditLog("EnablePlugin", "Plugin Name: ".$details->sNamespace);
|
||||||
print "size saved : $size <br>";
|
print "size saved : $size <br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,6 +239,8 @@ try {
|
|||||||
$size = file_put_contents( PATH_DATA_SITE . "plugin.singleton", $oPluginRegistry->serializeInstance() );
|
$size = file_put_contents( PATH_DATA_SITE . "plugin.singleton", $oPluginRegistry->serializeInstance() );
|
||||||
|
|
||||||
$response = $oPluginRegistry->verifyTranslation( $details->sNamespace);
|
$response = $oPluginRegistry->verifyTranslation( $details->sNamespace);
|
||||||
|
G::auditLog("InstallPlugin", "Plugin Name: ".$details->sNamespace );
|
||||||
|
|
||||||
//if ($response->recordsCountSuccess <= 0) {
|
//if ($response->recordsCountSuccess <= 0) {
|
||||||
//throw (new Exception( 'The plugin ' . $details->sNamespace . ' couldn\'t verify any translation item. Verified Records:' . $response->recordsCountSuccess));
|
//throw (new Exception( 'The plugin ' . $details->sNamespace . ' couldn\'t verify any translation item. Verified Records:' . $response->recordsCountSuccess));
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ if (file_exists( PATH_PLUGINS . $pluginName . ".php" )) {
|
|||||||
|
|
||||||
$pluginRegistry->unSerializeInstance( file_get_contents( PATH_DATA_SITE . "plugin.singleton" ) );
|
$pluginRegistry->unSerializeInstance( file_get_contents( PATH_DATA_SITE . "plugin.singleton" ) );
|
||||||
}
|
}
|
||||||
|
G::auditLog("RemovePlugin","Plugin Name: ".$pluginName);
|
||||||
echo $pluginName . " " . nl2br( G::LoadTranslation( "ID_MSG_REMOVE_PLUGIN_SUCCESS" ) );
|
echo $pluginName . " " . nl2br( G::LoadTranslation( "ID_MSG_REMOVE_PLUGIN_SUCCESS" ) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user