forked from Wavyzz/dolibarr
Qual: Removed deprecated functions
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
* \file htdocs/includes/modules/mailings/thirdparties_services_expired.modules.php
|
* \file htdocs/includes/modules/mailings/thirdparties_services_expired.modules.php
|
||||||
* \ingroup mailing
|
* \ingroup mailing
|
||||||
* \brief File of class to offer a selector of emailing targets with Rule 'services expired'.
|
* \brief File of class to offer a selector of emailing targets with Rule 'services expired'.
|
||||||
* \version $Id$
|
* \version $Id: thirdparties_services_expired.modules.php,v 1.2 2011/08/17 16:18:12 eldy Exp $
|
||||||
*/
|
*/
|
||||||
include_once DOL_DOCUMENT_ROOT.'/includes/modules/mailings/modules_mailings.php';
|
include_once DOL_DOCUMENT_ROOT.'/includes/modules/mailings/modules_mailings.php';
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||||
@@ -54,7 +54,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
dolibarr_syslog("dolibarr_services_expired.modules.php:mailing_dolibarr_services_expired ".$num." services found");
|
dol_syslog("dolibarr_services_expired.modules.php:mailing_dolibarr_services_expired ".$num." services found");
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -112,7 +112,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
dolibarr_syslog(get_class($this)."::add_to_target ".$num." targets found");
|
dol_syslog(get_class($this)."::add_to_target ".$num." targets found");
|
||||||
|
|
||||||
$old = '';
|
$old = '';
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@@ -141,7 +141,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_syslog($this->db->error());
|
dol_syslog($this->db->error());
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
* \file htdocs/lib/functions.lib.php
|
* \file htdocs/lib/functions.lib.php
|
||||||
* \brief A set of functions for Dolibarr
|
* \brief A set of functions for Dolibarr
|
||||||
* This file contains all frequently used functions.
|
* This file contains all frequently used functions.
|
||||||
* \version $Id: functions.lib.php,v 1.556 2011/08/17 16:08:49 eldy Exp $
|
* \version $Id: functions.lib.php,v 1.557 2011/08/17 16:18:12 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
@@ -58,6 +58,7 @@ function dol_shutdown()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return value of a param into GET or POST supervariable
|
* Return value of a param into GET or POST supervariable
|
||||||
|
*
|
||||||
* @param paramname Name of parameter to found
|
* @param paramname Name of parameter to found
|
||||||
* @param check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only)
|
* @param check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only)
|
||||||
* @param method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
* @param method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
||||||
@@ -85,8 +86,9 @@ function GETPOST($paramname,$check='',$method=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a prefix to use for this Dolibarr instance for session or cookie names.
|
* Return a prefix to use for this Dolibarr instance for session or cookie names.
|
||||||
* This prefix is unique for instance and avoid conflict between multi-instances Dolibarrs,
|
* This prefix is unique for instance and avoid conflict between multi-instances,
|
||||||
* even when having two instances with one root dir or two instances in virtual servers.
|
* even when having two instances with one root dir or two instances in virtual servers
|
||||||
|
*
|
||||||
* @return string A calculated prefix
|
* @return string A calculated prefix
|
||||||
*/
|
*/
|
||||||
function dol_getprefix()
|
function dol_getprefix()
|
||||||
@@ -99,7 +101,8 @@ function dol_getprefix()
|
|||||||
* WARNING: In most cases, you should not use this function:
|
* WARNING: In most cases, you should not use this function:
|
||||||
* To link to a core file, use include(DOL_DOCUMENT_ROOT.'/pathtofile')
|
* To link to a core file, use include(DOL_DOCUMENT_ROOT.'/pathtofile')
|
||||||
* To link to a module file from a module file, use include('./mymodulefile');
|
* To link to a module file from a module file, use include('./mymodulefile');
|
||||||
* To link to a module file from a core file, then this function can be used.
|
* To link to a module file from a core file, then this function can be used
|
||||||
|
*
|
||||||
* @param relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...)
|
* @param relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...)
|
||||||
* @return int false if include fails.
|
* @return int false if include fails.
|
||||||
*/
|
*/
|
||||||
@@ -111,7 +114,8 @@ function dol_include_once($relpath)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return path of url or filesystem. Return default_root or alternate root if file_exist fails.
|
* Return path of url or filesystem. Return default_root or alternate root if file_exist fails
|
||||||
|
*
|
||||||
* @param path Relative path to file (if mode=0, ie: mydir/myfile, ../myfile, ...) or relative url (if mode=1).
|
* @param path Relative path to file (if mode=0, ie: mydir/myfile, ../myfile, ...) or relative url (if mode=1).
|
||||||
* @param type 0=Used for a Filesystem path, 1=Used for an URL path (output relative), 2=Used for an URL path (output full path)
|
* @param type 0=Used for a Filesystem path, 1=Used for an URL path (output relative), 2=Used for an URL path (output full path)
|
||||||
* @return string Full filsystem path (if mode=0), Full url path (if mode=1)
|
* @return string Full filsystem path (if mode=0), Full url path (if mode=1)
|
||||||
@@ -163,7 +167,8 @@ function dol_buildpath($path,$type=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a clone of instance of object (new instance with same properties)
|
* Create a clone of instance of object (new instance with same properties)
|
||||||
* This function works for both PHP4 and PHP5.
|
* This function works for both PHP4 and PHP5
|
||||||
|
*
|
||||||
* @param object Object to clone
|
* @param object Object to clone
|
||||||
* @return date Timestamp
|
* @return date Timestamp
|
||||||
*/
|
*/
|
||||||
@@ -182,6 +187,7 @@ function dol_clone($object)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimize a size for some browsers (phone, smarphone, ...)
|
* Optimize a size for some browsers (phone, smarphone, ...)
|
||||||
|
*
|
||||||
* @param size Size we want
|
* @param size Size we want
|
||||||
* @param type Type of optimizing:
|
* @param type Type of optimizing:
|
||||||
* '' = function used to define a size for truncation
|
* '' = function used to define a size for truncation
|
||||||
@@ -198,7 +204,8 @@ function dol_size($size,$type='')
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return date for now. We should always use this function without parameters (that means GMT time).
|
* Return date for now. We should always use this function without parameters (that means GMT time)
|
||||||
|
*
|
||||||
* @param mode 'gmt' => we return GMT timestamp,
|
* @param mode 'gmt' => we return GMT timestamp,
|
||||||
* 'tzserver' => we add the PHP server timezone
|
* 'tzserver' => we add the PHP server timezone
|
||||||
* 'tzref' => we add the company timezone
|
* 'tzref' => we add the company timezone
|
||||||
@@ -230,7 +237,8 @@ function dol_now($mode='gmt')
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string to use it as a file name.
|
* Clean a string to use it as a file name
|
||||||
|
*
|
||||||
* @param str String to clean
|
* @param str String to clean
|
||||||
* @param newstr String to replace bad chars with
|
* @param newstr String to replace bad chars with
|
||||||
* @return string String cleaned (a-zA-Z_)
|
* @return string String cleaned (a-zA-Z_)
|
||||||
@@ -243,7 +251,8 @@ function dol_sanitizeFileName($str,$newstr='_')
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName.
|
* Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName
|
||||||
|
*
|
||||||
* @param str String to clean
|
* @param str String to clean
|
||||||
* @return string Cleaned string
|
* @return string Cleaned string
|
||||||
* @see dol_sanitizeFilename, dol_string_nospecial
|
* @see dol_sanitizeFilename, dol_string_nospecial
|
||||||
@@ -289,7 +298,8 @@ function dol_string_unaccent($str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string from all punctuation characters to use it as a ref or login.
|
* Clean a string from all punctuation characters to use it as a ref or login
|
||||||
|
*
|
||||||
* @param str String to clean
|
* @param str String to clean
|
||||||
* @param newstr String to replace forbidden chars with
|
* @param newstr String to replace forbidden chars with
|
||||||
* @param badchars List of forbidden characters
|
* @param badchars List of forbidden characters
|
||||||
@@ -308,6 +318,7 @@ function dol_string_nospecial($str,$newstr='_',$badchars='')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns text escaped for inclusion into javascript code
|
* Returns text escaped for inclusion into javascript code
|
||||||
|
*
|
||||||
* @param $stringtoescape String to escape
|
* @param $stringtoescape String to escape
|
||||||
* @return string Escaped string
|
* @return string Escaped string
|
||||||
*/
|
*/
|
||||||
@@ -321,6 +332,7 @@ function dol_escape_js($stringtoescape)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns text escaped for inclusion in HTML alt or title tags
|
* Returns text escaped for inclusion in HTML alt or title tags
|
||||||
|
*
|
||||||
* @param $stringtoescape String to escape
|
* @param $stringtoescape String to escape
|
||||||
* @param $keepb Do not clean b tags
|
* @param $keepb Do not clean b tags
|
||||||
* @return string Escaped string
|
* @return string Escaped string
|
||||||
@@ -334,12 +346,6 @@ function dol_escape_htmltag($stringtoescape,$keepb=0)
|
|||||||
return dol_htmlentities($tmp,ENT_COMPAT,'UTF-8');
|
return dol_htmlentities($tmp,ENT_COMPAT,'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For backward compatiblity */
|
|
||||||
function dolibarr_syslog($message, $level=LOG_INFO)
|
|
||||||
{
|
|
||||||
return dol_syslog($message, $level);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Write log message in a file or to syslog process
|
* \brief Write log message in a file or to syslog process
|
||||||
* Pour fichier: fichier defined by SYSLOG_FILE
|
* Pour fichier: fichier defined by SYSLOG_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user