diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 3b539895348..f572379d42e 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1072,7 +1072,7 @@ if ($action == 'create') {
// Status
print '
| '.$langs->trans("Status").' / '.$langs->trans("Percentage").' | ';
print '';
- $percent = -1;
+ $percent = GETPOST('complete')!=='' ? GETPOST('complete') : -1;
if (GETPOSTISSET('status')) {
$percent = GETPOST('status');
} elseif (GETPOSTISSET('percentage')) {
diff --git a/htdocs/core/class/defaultvalues.class.php b/htdocs/core/class/defaultvalues.class.php
index ae5ed6e92fb..2f70dda34e5 100644
--- a/htdocs/core/class/defaultvalues.class.php
+++ b/htdocs/core/class/defaultvalues.class.php
@@ -295,12 +295,10 @@ class DefaultValues extends CommonObject
if (!empty($limit)) {
$sql .= ' '.$this->db->plimit($limit, $offset);
}
-print $sql;
+
$resql = $this->db->query($sql);
if ($resql) {
-
$num = $this->db->num_rows($resql);
- var_dump($num);
$i = 0;
while ($i < ($limit ? min($limit, $num) : $num))
{
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index e296fa5874e..9b35d8a2eda 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -311,7 +311,7 @@ function GETPOSTISSET($paramname)
/**
* Return value of a param into GET or POST supervariable.
- * Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
+ * Use the property $user->default_values[path]['createform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
* Note: The property $user->default_values is loaded by main.php when loading the user.
*
* @param string $paramname Name of parameter to found
|