2011-08-05 Javier Lanz <javier.lanz@artica.es>
* godmode/servers/recon_script.php: Fixed blank names creating and updating reconscripts Fixes: #3371409 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4673 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f9bf0d363c
commit
5d15ebfbbf
|
@ -1,3 +1,10 @@
|
|||
2011-08-05 Javier Lanz <javier.lanz@artica.es>
|
||||
|
||||
* godmode/servers/recon_script.php: Fixed blank names creating and
|
||||
updating reconscripts
|
||||
|
||||
Fixes: #3371409
|
||||
|
||||
2011-08-05 Javier Lanz <javier.lanz@artica.es>
|
||||
|
||||
* godmode/tag/edit_tag.php: Fixed blank names creating & updating
|
||||
|
|
|
@ -105,15 +105,16 @@ else {
|
|||
$id_recon_script = get_parameter ("update_reconscript", 0);
|
||||
$reconscript_name = get_parameter ("form_name", "");
|
||||
$reconscript_description = get_parameter ("form_description", "");
|
||||
$reconscript_script = get_parameter ("form_script", "");
|
||||
|
||||
$reconscript_script = get_parameter ("form_script", "");
|
||||
|
||||
$sql_update ="UPDATE trecon_script SET
|
||||
name = '$reconscript_name',
|
||||
description = '$reconscript_description',
|
||||
script = '$reconscript_script'
|
||||
WHERE id_recon_script = $id_recon_script";
|
||||
$result = process_sql ($sql_update);
|
||||
$result = false;
|
||||
if ($reconscript_name != '' && $reconscript_script != '')
|
||||
$result = db_process_sql ($sql_update);
|
||||
if (! $result) {
|
||||
echo "<h3 class='error'>".__('Problem updating')."</h3>";
|
||||
} else {
|
||||
|
@ -131,10 +132,11 @@ else {
|
|||
'name' => $reconscript_name,
|
||||
'description' => $reconscript_description,
|
||||
'script' => $reconscript_script);
|
||||
$result = db_process_sql_insert('trecon_script', $values);
|
||||
$result = false;
|
||||
if ($values['name'] != '' && $values['script'] != '')
|
||||
$result = db_process_sql_insert('trecon_script', $values);
|
||||
if (! $result){
|
||||
echo "<h3 class='error'>".__('Problem creating')."</h3>";
|
||||
echo $sql_insert;
|
||||
}
|
||||
else {
|
||||
echo "<h3 class='suc'>".__('Created successfully')."</h3>";
|
||||
|
|
Loading…
Reference in New Issue