Merged in norah/processmaker/BUG-12021 (pull request #892)
BUG-12021 Audit Log Correction
This commit is contained in:
@@ -82,6 +82,7 @@ $arrayAction = array (array ("ALL", G::LoadTranslation( "ID_ALL" )),
|
|||||||
array ("InstallPlugin", G::LoadTranslation( "ID_INSTALL_PLUGIN" )),
|
array ("InstallPlugin", G::LoadTranslation( "ID_INSTALL_PLUGIN" )),
|
||||||
array ("EnablePlugin", G::LoadTranslation( "ID_ENABLE_PLUGIN" )),
|
array ("EnablePlugin", G::LoadTranslation( "ID_ENABLE_PLUGIN" )),
|
||||||
array ("DisablePlugin", G::LoadTranslation( "ID_DISABLE_PLUGIN" )),
|
array ("DisablePlugin", G::LoadTranslation( "ID_DISABLE_PLUGIN" )),
|
||||||
|
array ("RemovePlugin", G::LoadTranslation( "ID_REMOVE_PLUGIN" )),
|
||||||
array ("SetColumns", G::LoadTranslation( "ID_SET_COLUMNS" )),
|
array ("SetColumns", G::LoadTranslation( "ID_SET_COLUMNS" )),
|
||||||
array ("EnableAuditLog", G::LoadTranslation( "ID_ENABLE_AUDIT_LOG" )),
|
array ("EnableAuditLog", G::LoadTranslation( "ID_ENABLE_AUDIT_LOG" )),
|
||||||
array ("DisableAuditLog", G::LoadTranslation( "ID_DISABLE_AUDIT_LOG" )),
|
array ("DisableAuditLog", G::LoadTranslation( "ID_DISABLE_AUDIT_LOG" )),
|
||||||
|
|||||||
@@ -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