working default status/percent for event actioncomm

This commit is contained in:
Florian HENRY
2021-03-01 20:58:02 +01:00
parent f62386a6a5
commit 32ef55cd9e
3 changed files with 3 additions and 5 deletions

View File

@@ -1072,7 +1072,7 @@ if ($action == 'create') {
// Status
print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
print '<td>';
$percent = -1;
$percent = GETPOST('complete')!=='' ? GETPOST('complete') : -1;
if (GETPOSTISSET('status')) {
$percent = GETPOST('status');
} elseif (GETPOSTISSET('percentage')) {

View File

@@ -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))
{

View File

@@ -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