From 1c1e5b1c0e501e4d89c474af5154ac1b152b9476 Mon Sep 17 00:00:00 2001 From: javilanz Date: Fri, 5 Aug 2011 08:53:42 +0000 Subject: [PATCH] 2011-08-05 Javier Lanz * godmode/servers/plugin.php: Fixed blank names creating & updating pluings Fixes: #3371409 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/godmode/servers/plugin.php | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 50863abf2c..cc39af8a4e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-05 Javier Lanz + + * godmode/servers/plugin.php: Fixed blank names creating & updating + pluings + + Fixes: #3371409 + 2011-08-05 Javier Lanz * godmode/servers/recon_script.php: Fixed blank names creating and diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index cf3216a0e6..993d11a0c0 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -163,7 +163,9 @@ else { 'plugin_type' => $plugin_plugin_type, 'pass_opt' => $plugin_pass_opt); - $result =db_process_sql_update('tplugin', $values, array('id' => $plugin_id)); + $result = false; + if ($values['name'] != '' && $values['execute'] != '') + $result = db_process_sql_update('tplugin', $values, array('id' => $plugin_id)); if (! $result) { echo "

".__('Problem updating plugin')."

"; @@ -196,11 +198,12 @@ else { 'pass_opt' => $plugin_pass_opt, 'plugin_type' => $plugin_plugin_type); - $result = db_process_sql_insert('tplugin', $values); + $result = false; + if ($values['name'] != '' && $values['execute'] != '') + $result = db_process_sql_insert('tplugin', $values); if (! $result) { echo "

".__('Problem creating plugin')."

"; - echo $sql_insert; } else { echo "

".__('Plugin created successfully')."

";