diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index c7d7f4eea89..a33437166ea 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -736,7 +736,7 @@ class Export
{
$sql = 'SELECT em.rowid, em.label, em.type, em.field, em.filter';
$sql .= ' FROM '.MAIN_DB_PREFIX.'export_model as em';
- $sql .= ' WHERE em.rowid = '.$id;
+ $sql .= ' WHERE em.rowid = '.((int) $id);
dol_syslog("Export::fetch", LOG_DEBUG);
$result = $this->db->query($sql);
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index a5f11264a43..70e04d46cbb 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -302,9 +302,9 @@ if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes')
if ($action == 'deleteprof')
{
- if ($_GET["id"])
+ if (GETPOST("id", 'int'))
{
- $objexport->fetch($_GET["id"]);
+ $objexport->fetch(GETPOST('id', 'int'));
$result = $objexport->delete($user);
}
}
@@ -1054,7 +1054,7 @@ if ($step == 4 && $datatoexport)
print '
';
print ' | ';
- print '';
+ print '';
print ' |
';
// List of existing export profils
@@ -1074,7 +1074,7 @@ if ($step == 4 && $datatoexport)
print '| ';
print $obj->label;
print ' | ';
- print 'rowid.'">';
+ print 'rowid.'">';
print img_delete();
print '';
print ' |
';
diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php
index 72d1eb16f66..77128589c25 100644
--- a/htdocs/imports/class/import.class.php
+++ b/htdocs/imports/class/import.class.php
@@ -278,7 +278,7 @@ class Import
{
$sql = 'SELECT em.rowid, em.field, em.label, em.type';
$sql .= ' FROM '.MAIN_DB_PREFIX.'import_model as em';
- $sql .= ' WHERE em.rowid = '.$id;
+ $sql .= ' WHERE em.rowid = '.((int) $id);
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$result = $this->db->query($sql);
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 9fdc5330103..6fab34557d1 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -148,9 +148,9 @@ if ($action == 'builddoc')
if ($action == 'deleteprof')
{
- if ($_GET["id"])
+ if (GETPOST("id", 'int'))
{
- $objimport->fetch($_GET["id"]);
+ $objimport->fetch(GETPOST("id", 'int'));
$result = $objimport->delete($user);
}
}
@@ -1160,7 +1160,7 @@ if ($step == 4 && $datatoimport)
print '| ';
print $obj->label;
print ' | ';
- print 'rowid.'&filetoimport='.urlencode($filetoimport).'">';
+ print 'rowid.'&filetoimport='.urlencode($filetoimport).'">';
print img_delete();
print '';
print ' |
';