Fix syntax error
This commit is contained in:
parent
b1f93ccb0c
commit
b441c62e1d
@ -52,7 +52,7 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
if (! $user->rights->accounting->chartofaccount) accessforbidden();
|
if (! $user->rights->accounting->chartofaccount) accessforbidden();
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'sortorder');
|
$sortorder = GETPOST("sortorder", 'sortorder');
|
||||||
$page = GETPOST("page", 'int');
|
$page = GETPOST("page", 'int');
|
||||||
|
|||||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
|||||||
$action = GETPOST('action','aZ09');
|
$action = GETPOST('action','aZ09');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $langs->load("accountancy");
|
|||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -70,7 +70,7 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
|||||||
$btn_changeaccount = GETPOST('changeaccount');
|
$btn_changeaccount = GETPOST('changeaccount');
|
||||||
$btn_changetype = GETPOST('changetype');
|
$btn_changetype = GETPOST('changetype');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -62,7 +62,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|||||||
|
|
||||||
if ($statut < -1) $statut = '';
|
if ($statut < -1) $statut = '';
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|||||||
|
|
||||||
$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"];
|
$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"];
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $search_email = GETPOST('search_email','alpha');
|
|||||||
$type = GETPOST('type','alpha');
|
$type = GETPOST('type','alpha');
|
||||||
$status = GETPOST('status','alpha');
|
$status = GETPOST('status','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $action=GETPOST('action','alpha');
|
|||||||
|
|
||||||
$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder', 'focus'
|
$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder', 'focus'
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $transvalue=GETPOST('transvalue','alpha');
|
|||||||
|
|
||||||
$mode = GETPOST('mode')?GETPOST('mode'):'overwrite';
|
$mode = GETPOST('mode')?GETPOST('mode'):'overwrite';
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (! $user->rights->bookmark->lire) {
|
|||||||
}
|
}
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -76,7 +76,7 @@ if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
|
|||||||
$filtert=$user->id;
|
$filtert=$user->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -39,7 +39,7 @@ if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden();
|
|||||||
|
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -45,7 +45,7 @@ accessforbidden();
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -82,7 +82,7 @@ $result = restrictedArea($user, 'commande', $id,'');
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->commande->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->commande->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -55,7 +55,7 @@ $result=restrictedArea($user,'banque');
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->bank->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->bank->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -48,7 +48,7 @@ $id = GETPOST('id','int');
|
|||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
|
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $page = GETPOST('page','int');
|
|||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
$prev_id = GETPOST('id','int');
|
$prev_id = GETPOST('id','int');
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $object = new Societe($db);
|
|||||||
if ($id > 0) $object->fetch($id);
|
if ($id > 0) $object->fetch($id);
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if ($user->societe_id > 0) $socid = $user->societe_id;
|
|||||||
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
|
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
|
||||||
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
|
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -89,7 +89,7 @@ $search_agenda_label=GETPOST('search_agenda_label');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -74,7 +74,7 @@ $optioncss = GETPOST('optioncss','alpha');
|
|||||||
$type=GETPOST("type");
|
$type=GETPOST("type");
|
||||||
$view=GETPOST("view");
|
$view=GETPOST("view");
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST('page', 'int');
|
$page = GETPOST('page', 'int');
|
||||||
|
|||||||
@ -65,7 +65,7 @@ $month=GETPOST("month","int");
|
|||||||
|
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $langs->load("products");
|
|||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class Cronjob extends CommonObject
|
|||||||
if (isset($this->nbrun)) $this->nbrun=trim($this->nbrun);
|
if (isset($this->nbrun)) $this->nbrun=trim($this->nbrun);
|
||||||
if (isset($this->libname)) $this->libname = trim($this->libname);
|
if (isset($this->libname)) $this->libname = trim($this->libname);
|
||||||
if (isset($this->test)) $this->test = trim($this->test);
|
if (isset($this->test)) $this->test = trim($this->test);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add a control on parameters values
|
// Put here code to add a control on parameters values
|
||||||
if (dol_strlen($this->datestart)==0) {
|
if (dol_strlen($this->datestart)==0) {
|
||||||
@ -361,15 +361,15 @@ class Cronjob extends CommonObject
|
|||||||
* @param int $offset page
|
* @param int $offset page
|
||||||
* @param int $status display active or not
|
* @param int $status display active or not
|
||||||
* @param array $filter filter output
|
* @param array $filter filter output
|
||||||
* @param int $processing Processing or not
|
* @param int $processing Processing or not
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1)
|
function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$this->lines=array();
|
$this->lines=array();
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql.= " t.rowid,";
|
$sql.= " t.rowid,";
|
||||||
$sql.= " t.entity,";
|
$sql.= " t.entity,";
|
||||||
@ -409,7 +409,7 @@ class Cronjob extends CommonObject
|
|||||||
if ($status == 2) $sql.= " AND t.status = 2";
|
if ($status == 2) $sql.= " AND t.status = 2";
|
||||||
//Manage filter
|
//Manage filter
|
||||||
if (is_array($filter) && count($filter)>0) {
|
if (is_array($filter) && count($filter)>0) {
|
||||||
foreach($filter as $key => $value)
|
foreach($filter as $key => $value)
|
||||||
{
|
{
|
||||||
if ($key == 't.rowid') $sql.= ' AND '.$key.' = '.$this->db->escape($value);
|
if ($key == 't.rowid') $sql.= ' AND '.$key.' = '.$this->db->escape($value);
|
||||||
else $sql.= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
else $sql.= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||||
@ -532,7 +532,7 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
if (empty($this->maxrun)) $this->maxrun=0;
|
if (empty($this->maxrun)) $this->maxrun=0;
|
||||||
if (empty($this->processing)) $this->processing=0;
|
if (empty($this->processing)) $this->processing=0;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// Put here code to add a control on parameters values
|
// Put here code to add a control on parameters values
|
||||||
if (dol_strlen($this->datestart)==0) {
|
if (dol_strlen($this->datestart)==0) {
|
||||||
@ -845,8 +845,8 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a job.
|
* Run a job.
|
||||||
* Once job is finished, status and nb of run is updated.
|
* Once job is finished, status and nb of run is updated.
|
||||||
* This function does not plan the next run. This is done by function ->reprogram_jobs
|
* This function does not plan the next run. This is done by function ->reprogram_jobs
|
||||||
*
|
*
|
||||||
* @param string $userlogin User login
|
* @param string $userlogin User login
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
@ -861,7 +861,7 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
$langs->load('cron');
|
$langs->load('cron');
|
||||||
|
|
||||||
if (empty($userlogin))
|
if (empty($userlogin))
|
||||||
{
|
{
|
||||||
$this->error="User login is mandatory";
|
$this->error="User login is mandatory";
|
||||||
dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR);
|
||||||
@ -948,7 +948,7 @@ class Cronjob extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load langs
|
// Load langs
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -963,14 +963,14 @@ class Cronjob extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::run_jobs START ".$this->objectname."->".$this->methodename."(".$this->params.");", LOG_DEBUG);
|
dol_syslog(get_class($this)."::run_jobs START ".$this->objectname."->".$this->methodename."(".$this->params.");", LOG_DEBUG);
|
||||||
|
|
||||||
// Create Object for the call module
|
// Create Object for the call module
|
||||||
$object = new $this->objectname($this->db);
|
$object = new $this->objectname($this->db);
|
||||||
|
|
||||||
$params_arr = array_map('trim', explode(",",$this->params));
|
$params_arr = array_map('trim', explode(",",$this->params));
|
||||||
if (!is_array($params_arr))
|
if (!is_array($params_arr))
|
||||||
{
|
{
|
||||||
@ -980,7 +980,7 @@ class Cronjob extends CommonObject
|
|||||||
{
|
{
|
||||||
$result = call_user_func_array(array($object, $this->methodename), $params_arr);
|
$result = call_user_func_array(array($object, $this->methodename), $params_arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result===false || $result != 0)
|
if ($result===false || $result != 0)
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
@ -998,7 +998,7 @@ class Cronjob extends CommonObject
|
|||||||
$this->lastresult=var_export($result,true);
|
$this->lastresult=var_export($result,true);
|
||||||
$retval = $this->lastresult;
|
$retval = $this->lastresult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->jobtype == 'function')
|
if($this->jobtype == 'function')
|
||||||
@ -1071,7 +1071,7 @@ class Cronjob extends CommonObject
|
|||||||
$this->lastoutput = ''; // Will be filled later
|
$this->lastoutput = ''; // Will be filled later
|
||||||
$this->lastresult = $retval;
|
$this->lastresult = $retval;
|
||||||
$retval = $this->lastresult;
|
$retval = $this->lastresult;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($execmethod == 2)
|
if ($execmethod == 2)
|
||||||
@ -1102,14 +1102,14 @@ class Cronjob extends CommonObject
|
|||||||
$this->lastoutput.=$val."\n";
|
$this->lastoutput.=$val."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lastresult=$retval;
|
$this->lastresult=$retval;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
|
dol_syslog(get_class($this)."::run_jobs output_arr:".var_export($output_arr,true)." lastoutput=".$this->lastoutput." lastresult=".$this->lastresult, LOG_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::run_jobs now we update job to track it is finished (with success or error)");
|
dol_syslog(get_class($this)."::run_jobs now we update job to track it is finished (with success or error)");
|
||||||
|
|
||||||
$this->datelastresult=dol_now();
|
$this->datelastresult=dol_now();
|
||||||
$this->processing=0;
|
$this->processing=0;
|
||||||
$result = $this->update($user); // This include begin/commit
|
$result = $this->update($user); // This include begin/commit
|
||||||
@ -1135,19 +1135,19 @@ class Cronjob extends CommonObject
|
|||||||
function reprogram_jobs($userlogin, $now)
|
function reprogram_jobs($userlogin, $now)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs userlogin:$userlogin", LOG_DEBUG);
|
dol_syslog(get_class($this)."::reprogram_jobs userlogin:$userlogin", LOG_DEBUG);
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
$user=new User($this->db);
|
$user=new User($this->db);
|
||||||
$result=$user->fetch('',$userlogin);
|
$result=$user->fetch('',$userlogin);
|
||||||
if ($result<0)
|
if ($result<0)
|
||||||
{
|
{
|
||||||
$this->error="User Error:".$user->error;
|
$this->error="User Error:".$user->error;
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (empty($user->id))
|
if (empty($user->id))
|
||||||
{
|
{
|
||||||
$this->error=" User user login:".$userlogin." do not exists";
|
$this->error=" User user login:".$userlogin." do not exists";
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
||||||
@ -1155,28 +1155,28 @@ class Cronjob extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs ", LOG_DEBUG);
|
dol_syslog(get_class($this)."::reprogram_jobs datenextrun=".$this->datenextrun." ".dol_print_date($this->datenextrun, 'dayhourrfc')." frequency=".$this->frequency." unitfrequency=".$this->unitfrequency, LOG_DEBUG);
|
||||||
|
|
||||||
|
if (empty($this->datenextrun))
|
||||||
if (empty($this->datenextrun))
|
|
||||||
{
|
{
|
||||||
if (empty($this->datestart)) $this->datenextrun = $now + ($this->frequency * $this->unitfrequency);
|
if (empty($this->datestart)) $this->datenextrun = $now + ($this->frequency * $this->unitfrequency);
|
||||||
else $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency);
|
else $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0)
|
if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0)
|
||||||
{
|
{
|
||||||
// Loop until date is after future
|
// Loop until date is after future
|
||||||
while ($this->datenextrun < $now)
|
while ($this->datenextrun < $now)
|
||||||
{
|
{
|
||||||
$this->datenextrun += ($this->frequency * $this->unitfrequency);
|
$this->datenextrun += ($this->frequency * $this->unitfrequency);
|
||||||
|
|
||||||
// TODO For exact frequency (every month, every year, ...), use instead a dol_time_plus_duree($time, $duration_value, $duration_unit)
|
// TODO For exact frequency (every month, every year, ...), use instead a dol_time_plus_duree($time, $duration_value, $duration_unit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//$this->datenextrun=$this->datenextrun + ($this->frequency * $this->unitfrequency);
|
//$this->datenextrun=$this->datenextrun + ($this->frequency * $this->unitfrequency);
|
||||||
|
dol_syslog(get_class($this)."::reprogram_jobs datenextrun is already in future, we do not change it");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1190,9 +1190,9 @@ class Cronjob extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::reprogram_jobs Job will be set to archived", LOG_ERR);
|
dol_syslog(get_class($this)."::reprogram_jobs Job will be set to archived", LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->update($user);
|
$result = $this->update($user);
|
||||||
if ($result<0)
|
if ($result<0)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
@ -1200,7 +1200,7 @@ class Cronjob extends CommonObject
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return label of status of user (active, inactive)
|
* Return label of status of user (active, inactive)
|
||||||
*
|
*
|
||||||
@ -1211,7 +1211,7 @@ class Cronjob extends CommonObject
|
|||||||
{
|
{
|
||||||
return $this->LibStatut($this->status,$mode);
|
return $this->LibStatut($this->status,$mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un statut donne
|
* Renvoi le libelle d'un statut donne
|
||||||
*
|
*
|
||||||
@ -1223,7 +1223,7 @@ class Cronjob extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0)
|
||||||
{
|
{
|
||||||
$prefix='';
|
$prefix='';
|
||||||
@ -1255,7 +1255,7 @@ class Cronjob extends CommonObject
|
|||||||
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4','class="pictostatus"');
|
if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4','class="pictostatus"');
|
||||||
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5','class="pictostatus"');
|
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5','class="pictostatus"');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ $object->info($id);
|
|||||||
|
|
||||||
$head = cron_prepare_head($object);
|
$head = cron_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("CronTask"), 0, 'cron');
|
dol_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($object);
|
dol_print_object_info($object);
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $action=GETPOST('action','alpha');
|
|||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -53,7 +53,7 @@ $search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
|||||||
$sall = GETPOST('sall', 'alphanohtml');
|
$sall = GETPOST('sall', 'alphanohtml');
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -51,7 +51,7 @@ $diroutputmassaction=$conf->expensereport->dir_output . '/temp/massgeneration/'.
|
|||||||
|
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -101,7 +101,7 @@ $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande');
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->fournisseur->commande->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->fournisseur->commande->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $type = GETPOST('type');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -68,7 +68,7 @@ $search_myfield=GETPOST('search_myfield');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php';
|
|||||||
$langs->load("stock");
|
$langs->load("stock");
|
||||||
$langs->load("inventory");
|
$langs->load("inventory");
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ if (!$_POST) {
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->product->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->product->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ if (!$_POST) {
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->product->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->product->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $type=GETPOST("type","int");
|
|||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'produit|service');
|
$result=restrictedArea($user,'produit|service');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $search_myfield=GETPOST('search_myfield');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $ref = GETPOST('ref','alpha');
|
|||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield","alpha");
|
$sortfield = GETPOST("sortfield","alpha");
|
||||||
$sortorder = GETPOST("sortorder");
|
$sortorder = GETPOST("sortorder");
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
|
|||||||
@ -55,7 +55,7 @@ if (!$user->rights->projet->lire) accessforbidden();
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->projet->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->projet->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield","alpha");
|
$sortfield = GETPOST("sortfield","alpha");
|
||||||
$sortorder = GETPOST("sortorder");
|
$sortorder = GETPOST("sortorder");
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
|
|||||||
@ -85,7 +85,7 @@ if (!$user->rights->projet->lire) accessforbidden();
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->projet->dir_output . '/tasks/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->projet->dir_output . '/tasks/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -58,7 +58,7 @@ $socid=0;
|
|||||||
//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
//if ($user->societe_id > 0) $socid = $user->societe_id; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||||
if (!$user->rights->projet->lire) accessforbidden();
|
if (!$user->rights->projet->lire) accessforbidden();
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -91,7 +91,7 @@ if (empty($sortorder)) $sortorder="ASC";
|
|||||||
if (empty($sortfield)) $sortfield="t.rowid";
|
if (empty($sortfield)) $sortfield="t.rowid";
|
||||||
if (empty($arch)) $arch = 0;
|
if (empty($arch)) $arch = 0;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
$page = is_numeric($page) ? $page : 0;
|
$page = is_numeric($page) ? $page : 0;
|
||||||
$page = $page == -1 ? 0 : $page;
|
$page = $page == -1 ? 0 : $page;
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $socid = GETPOST('socid','int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -84,7 +84,7 @@ $mode=GETPOST("mode");
|
|||||||
|
|
||||||
$diroutputmassaction=$conf->societe->dir_output . '/temp/massgeneration/'.$user->id;
|
$diroutputmassaction=$conf->societe->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield=GETPOST("sortfield",'alpha');
|
$sortfield=GETPOST("sortfield",'alpha');
|
||||||
$sortorder=GETPOST("sortorder",'alpha');
|
$sortorder=GETPOST("sortorder",'alpha');
|
||||||
$page=GETPOST("page",'int');
|
$page=GETPOST("page",'int');
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $actionid=GETPOST('actionid');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe','','');
|
$result = restrictedArea($user, 'societe','','');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield=GETPOST("sortfield",'alpha');
|
$sortfield=GETPOST("sortfield",'alpha');
|
||||||
$sortorder=GETPOST("sortorder",'alpha');
|
$sortorder=GETPOST("sortorder",'alpha');
|
||||||
$page=GETPOST("page",'int');
|
$page=GETPOST("page",'int');
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $search_group=GETPOST('search_group');
|
|||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -46,7 +46,7 @@ if ($user->societe_id > 0)
|
|||||||
$mode = GETPOST("mode", 'alpha');
|
$mode = GETPOST("mode", 'alpha');
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $actionid=GETPOST('actionid');
|
|||||||
if ($user->societe_id) $id=$user->societe_id;
|
if ($user->societe_id) $id=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe','','');
|
$result = restrictedArea($user, 'societe','','');
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit', 'int')::$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield=GETPOST("sortfield",'alpha');
|
$sortfield=GETPOST("sortfield",'alpha');
|
||||||
$sortorder=GETPOST("sortorder",'alpha');
|
$sortorder=GETPOST("sortorder",'alpha');
|
||||||
$page=GETPOST("page",'int');
|
$page=GETPOST("page",'int');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user