Fixed the error message in the check syntax of plugin registration plugin.

This commit is contained in:
mdtrooper 2015-02-05 17:17:18 +01:00
parent e943a84b96
commit d7f0026979
1 changed files with 133 additions and 123 deletions

View File

@ -69,6 +69,7 @@ function pluginreg_extension_main () {
echo "<h2 class=error>".__("Cannot load INI file")."</h2>";
}
else {
$version = preg_replace("/.*[.]/", "", $name_file);
$exec_path = $config["plugin_store"] . "/" . $ini_array["plugin_definition"]["filename"];
@ -114,6 +115,7 @@ function pluginreg_extension_main () {
'parameters' => $ini_array["plugin_definition"]["parameters"],
'plugin_type' => $ini_array["plugin_definition"]["plugin_type"]);
switch ($version) {
case 'pspz':
// Fixed the static parameters
@ -265,6 +267,13 @@ function pluginreg_extension_main () {
$create_id = db_process_sql_insert('tplugin', $values);
if (empty($create_id)) {
ui_print_error_message(
__('Plug-in Remote Registered unsuccessfull'));
ui_print_info_message(
__('Please check the syntax of file "plugin_definition.ini"'));
}
else {
for ($ax = 1; $ax <= $ini_array["plugin_definition"]["total_modules_provided"]; $ax++) {
$label = "module" . $ax;
@ -389,6 +398,7 @@ function pluginreg_extension_main () {
echo "<h2 class=suc>" .
__("Plugin") . " " . $ini_array["plugin_definition"]["name"] . " " . __("Registered successfully") .
"</h2>";
}
unlink ($config["attachment_store"] . "/plugin_definition.ini");
}
}