PHPDoc and misc fixes for several folders
This commit is contained in:
parent
530186c59d
commit
e485dd413d
@ -50,10 +50,10 @@ function cronadmin_prepare_head()
|
|||||||
/**
|
/**
|
||||||
* Return array of tabs to used on a cron job
|
* Return array of tabs to used on a cron job
|
||||||
*
|
*
|
||||||
* @param Object $object Object cron
|
* @param Cronjob $object Object cron
|
||||||
* @return array Array of tabs
|
* @return array Array of tabs
|
||||||
*/
|
*/
|
||||||
function cron_prepare_head($object)
|
function cron_prepare_head(Cronjob $object)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
$h = 0;
|
$h = 0;
|
||||||
|
|||||||
@ -273,7 +273,6 @@ class Cronjob extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql.= " t.rowid,";
|
$sql.= " t.rowid,";
|
||||||
|
|
||||||
@ -655,15 +654,14 @@ class Cronjob extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function delete($user, $notrigger=0)
|
function delete($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// want this action calls a trigger.
|
||||||
|
|
||||||
@ -673,18 +671,18 @@ class Cronjob extends CommonObject
|
|||||||
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//// End call triggers
|
//// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cronjob";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."cronjob";
|
||||||
$sql.= " WHERE rowid=".$this->id;
|
$sql.= " WHERE rowid=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
@ -803,12 +801,10 @@ class Cronjob extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load object information
|
* Load object information
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int
|
||||||
*/
|
*/
|
||||||
function info()
|
function info()
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql.= " f.rowid, f.datec, f.tms, f.fk_user_mod, f.fk_user_author";
|
$sql.= " f.rowid, f.datec, f.tms, f.fk_user_mod, f.fk_user_author";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."cronjob as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."cronjob as f";
|
||||||
@ -849,7 +845,6 @@ class Cronjob extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$error=0;
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$langs->load('cron');
|
$langs->load('cron');
|
||||||
@ -935,7 +930,6 @@ class Cronjob extends CommonObject
|
|||||||
// 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();
|
|
||||||
$params_arr = explode(", ",$this->params);
|
$params_arr = explode(", ",$this->params);
|
||||||
if (!is_array($params_arr))
|
if (!is_array($params_arr))
|
||||||
{
|
{
|
||||||
@ -978,7 +972,6 @@ class Cronjob extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
dol_syslog(get_class($this) . "::run_jobs " . $this->libname . "::" . $this->methodename."(" . $this->params . ");", LOG_DEBUG);
|
dol_syslog(get_class($this) . "::run_jobs " . $this->libname . "::" . $this->methodename."(" . $this->params . ");", LOG_DEBUG);
|
||||||
$params_arr = array();
|
|
||||||
$params_arr = explode(", ", $this->params);
|
$params_arr = explode(", ", $this->params);
|
||||||
if (!is_array($params_arr))
|
if (!is_array($params_arr))
|
||||||
{
|
{
|
||||||
@ -1074,8 +1067,6 @@ class Cronjob extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function reprogram_jobs($userlogin)
|
function reprogram_jobs($userlogin)
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
|
||||||
|
|
||||||
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';
|
||||||
|
|||||||
@ -244,8 +244,6 @@ class EcmDirectory // extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function changeNbOfFiles($sign)
|
function changeNbOfFiles($sign)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
|
||||||
|
|
||||||
// Update request
|
// Update request
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."ecm_directories SET";
|
||||||
$sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1";
|
$sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1";
|
||||||
@ -320,7 +318,7 @@ class EcmDirectory // extends CommonObject
|
|||||||
* Delete object on database and/or on disk
|
* Delete object on database and/or on disk
|
||||||
*
|
*
|
||||||
* @param User $user User that delete
|
* @param User $user User that delete
|
||||||
* @param int $mode 'all'=delete all, 'databaseonly'=only database entry, 'fileonly' (not implemented)
|
* @param string $mode 'all'=delete all, 'databaseonly'=only database entry, 'fileonly' (not implemented)
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($user, $mode='all')
|
function delete($user, $mode='all')
|
||||||
@ -329,7 +327,6 @@ class EcmDirectory // extends CommonObject
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$result=0;
|
|
||||||
|
|
||||||
if ($mode != 'databaseonly') $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
|
if ($mode != 'databaseonly') $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class FormEcm
|
|||||||
* @param string $select_name Nom formulaire HTML
|
* @param string $select_name Nom formulaire HTML
|
||||||
* @return string String with HTML select
|
* @return string String with HTML select
|
||||||
*/
|
*/
|
||||||
function select_all_sections($selected='',$select_name='')
|
function select_all_sections($selected=0,$select_name='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("ecm");
|
$langs->load("ecm");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user