forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into camelCaps
This commit is contained in:
@@ -26,13 +26,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \class AntiVir
|
||||
* \brief Class to scan for virus
|
||||
* Class to scan for virus
|
||||
*/
|
||||
class AntiVir
|
||||
{
|
||||
var $error;
|
||||
var $errors;
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
var $output;
|
||||
var $db;
|
||||
|
||||
|
||||
@@ -30,7 +30,11 @@ class Canvas
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors=array();
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
var $actiontype;
|
||||
|
||||
|
||||
@@ -34,7 +34,12 @@ class Ccountry // extends CommonObject
|
||||
{
|
||||
var $db; //!< To store db handler
|
||||
var $error; //!< To return error code (or message)
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
//var $element='ccountry'; //!< Id that identify managed objects
|
||||
//var $table_element='ccountry'; //!< Name of table without prefix where object is stored
|
||||
|
||||
|
||||
@@ -42,9 +42,10 @@ abstract class CommonDocGenerator
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db) {
|
||||
$this->db = $db;
|
||||
}
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -663,7 +664,8 @@ abstract class CommonDocGenerator
|
||||
* @return array Array of substitution key->code
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) {
|
||||
function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true)
|
||||
{
|
||||
$array_other = array();
|
||||
if(!empty($object)) {
|
||||
foreach($object as $key => $value) {
|
||||
@@ -781,9 +783,9 @@ abstract class CommonDocGenerator
|
||||
*/
|
||||
function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
|
||||
{
|
||||
if (empty($hidetop) || $hidetop==-1) $pdf->line($x, $y, $x+$l, $y);
|
||||
$pdf->line($x+$l, $y, $x+$l, $y+$h);
|
||||
if (empty($hidebottom)) $pdf->line($x+$l, $y+$h, $x, $y+$h);
|
||||
$pdf->line($x, $y+$h, $x, $y);
|
||||
if (empty($hidetop) || $hidetop==-1) $pdf->line($x, $y, $x+$l, $y);
|
||||
$pdf->line($x+$l, $y, $x+$l, $y+$h);
|
||||
if (empty($hidebottom)) $pdf->line($x+$l, $y+$h, $x, $y+$h);
|
||||
$pdf->line($x, $y+$h, $x, $y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6905,7 +6905,8 @@ abstract class CommonObject
|
||||
* @param array $fieldsentry Properties of field
|
||||
* @return string
|
||||
*/
|
||||
protected function quote($value, $fieldsentry) {
|
||||
protected function quote($value, $fieldsentry)
|
||||
{
|
||||
if (is_null($value)) return 'NULL';
|
||||
else if (preg_match('/^(int|double|real)/i', $fieldsentry['type'])) return $this->db->escape("$value");
|
||||
else return "'".$this->db->escape($value)."'";
|
||||
|
||||
@@ -221,7 +221,7 @@ abstract class CommonStickerGenerator
|
||||
* @return float value value after conversion
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _Convert_Metric ($value, $src, $dest)
|
||||
function _Convert_Metric($value, $src, $dest)
|
||||
{
|
||||
if ($src != $dest) {
|
||||
$tab['in'] = 39.37008;
|
||||
|
||||
@@ -34,7 +34,12 @@ class Cstate // extends CommonObject
|
||||
{
|
||||
var $db; //!< To store db handler
|
||||
var $error; //!< To return error code (or message)
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
//var $element='cstate'; //!< Id that identify managed objects
|
||||
//var $table_element='cstate'; //!< Name of table without prefix where object is stored
|
||||
|
||||
|
||||
@@ -29,7 +29,12 @@ class Ctypent // extends CommonObject
|
||||
{
|
||||
var $db; //!< To store db handler
|
||||
var $error; //!< To return error code (or message)
|
||||
var $errors=array(); //!< To return several error codes (or messages)
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
//var $element='ctypent'; //!< Id that identify managed objects
|
||||
//var $table_element='ctypent'; //!< Name of table without prefix where object is stored
|
||||
|
||||
|
||||
@@ -110,7 +110,11 @@ class dolReceiptPrinter extends Escpos
|
||||
var $printer;
|
||||
var $template;
|
||||
var $error;
|
||||
var $errors;
|
||||
/**
|
||||
*
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array ();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,11 @@ class HookManager
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors=array();
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
// Context hookmanager was created for ('thirdpartycard', 'thirdpartydao', ...)
|
||||
var $contextarray=array();
|
||||
|
||||
@@ -219,7 +219,8 @@ class FormAccounting extends Form
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') {
|
||||
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '')
|
||||
{
|
||||
$options = array();
|
||||
|
||||
$sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'accounting_bookkeeping';
|
||||
@@ -344,7 +345,8 @@ class FormAccounting extends Form
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') {
|
||||
function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200')
|
||||
{
|
||||
|
||||
$aux_account = array();
|
||||
|
||||
|
||||
@@ -780,7 +780,8 @@ class FormFile
|
||||
$out.= '<td class="right nowraponall">';
|
||||
if ($delallowed)
|
||||
{
|
||||
$out.= '<a href="'.$urlsource.(strpos($urlsource,'?')?'&':'?').'action=remove_file&file='.urlencode($relativepath);
|
||||
$tmpurlsource = preg_replace('/#[a-zA-Z0-9_]*$/', '', $urlsource);
|
||||
$out.= '<a href="'.$tmpurlsource.(strpos($tmpurlsource,'?')?'&':'?').'action=remove_file&file='.urlencode($relativepath);
|
||||
$out.= ($param?'&'.$param:'');
|
||||
//$out.= '&modulepart='.$modulepart; // TODO obsolete ?
|
||||
//$out.= '&urlsource='.urlencode($urlsource); // TODO obsolete ?
|
||||
@@ -816,7 +817,7 @@ class FormFile
|
||||
|
||||
$this->numoffiles++;
|
||||
}
|
||||
// Loop on each file found
|
||||
// Loop on each link found
|
||||
if (is_array($link_list))
|
||||
{
|
||||
$colspan=2;
|
||||
@@ -1307,8 +1308,7 @@ class FormFile
|
||||
if (! empty($conf->dol_use_jmobile)) $useajax=0;
|
||||
if (empty($conf->use_javascript_ajax)) $useajax=0;
|
||||
if (! empty($conf->global->MAIN_ECM_DISABLE_JS)) $useajax=0;
|
||||
|
||||
print '<a href="'.(($useinecm && $useajax)?'#':$url.'?action=delete&urlfile='.urlencode($filepath).$param).'" class="deletefilelink" rel="'.$filepath.'">'.img_delete().'</a>';
|
||||
print '<a href="'.(($useinecm && $useajax)?'#':($url.'?action=delete&urlfile='.urlencode($filepath).$param)).'" class="deletefilelink" rel="'.$filepath.'">'.img_delete().'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/html.form.class.php';
|
||||
|
||||
/**
|
||||
* Class to offer components to list and upload files
|
||||
* Class to offer components to list and upload files
|
||||
*/
|
||||
class FormMailing extends Form
|
||||
{
|
||||
@@ -37,7 +37,8 @@ class FormMailing extends Form
|
||||
* @param integer $show_empty Show empty option
|
||||
* @return string HTML select
|
||||
*/
|
||||
public function selectDestinariesStatus($selectedid='',$htmlname='dest_status', $show_empty=0) {
|
||||
public function selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0)
|
||||
{
|
||||
|
||||
global $langs;
|
||||
$langs->load("mails");
|
||||
@@ -54,5 +55,5 @@ class FormMailing extends Form
|
||||
$options = $options + $mailing->statut_dest;
|
||||
|
||||
return Form::selectarray($htmlname, $options, $selectedid, 0, 0, 0, '', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,11 @@ class Interfaces
|
||||
{
|
||||
var $db;
|
||||
var $dir; // Directory with all core and external triggers files
|
||||
var $errors = array(); // Array for errors
|
||||
/**
|
||||
*
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array ();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -371,7 +371,8 @@ class Ldap
|
||||
*
|
||||
* @return boolean version
|
||||
*/
|
||||
function setVersion() {
|
||||
function setVersion()
|
||||
{
|
||||
// LDAP_OPT_PROTOCOL_VERSION est une constante qui vaut 17
|
||||
$ldapsetversion = ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $this->ldapProtocolVersion);
|
||||
return $ldapsetversion;
|
||||
@@ -382,7 +383,8 @@ class Ldap
|
||||
*
|
||||
* @return boolean referrals
|
||||
*/
|
||||
function setReferrals() {
|
||||
function setReferrals()
|
||||
{
|
||||
// LDAP_OPT_REFERRALS est une constante qui vaut ?
|
||||
$ldapreferrals = ldap_set_option($this->connection, LDAP_OPT_REFERRALS, 0);
|
||||
return $ldapreferrals;
|
||||
|
||||
@@ -33,7 +33,11 @@ class Notify
|
||||
var $id;
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors=array();
|
||||
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
var $author;
|
||||
var $ref;
|
||||
|
||||
@@ -30,8 +30,8 @@ class SimpleOpenID
|
||||
var $URLs = array();
|
||||
var $error = array();
|
||||
var $fields = array(
|
||||
'required' => array(),
|
||||
'optional' => array(),
|
||||
'required' => array(),
|
||||
'optional' => array(),
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -133,7 +133,8 @@ class SimpleOpenID
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function SetIdentity($a)
|
||||
{ // Set Identity URL
|
||||
{
|
||||
// Set Identity URL
|
||||
if ((stripos($a, 'http://') === false)
|
||||
&& (stripos($a, 'https://') === false)) {
|
||||
$a = 'http://'.$a;
|
||||
@@ -162,6 +163,7 @@ class SimpleOpenID
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function GetIdentity()
|
||||
{
|
||||
// Get Identity
|
||||
return $this->openid_url_identity;
|
||||
}
|
||||
|
||||
@@ -266,7 +268,8 @@ class SimpleOpenID
|
||||
* @return false|string false if KO, string of url if OK
|
||||
*/
|
||||
function array2url($arr)
|
||||
{ // converts associated array to URL Query String
|
||||
{
|
||||
// converts associated array to URL Query String
|
||||
if (!is_array($arr)){
|
||||
return false;
|
||||
}
|
||||
@@ -320,7 +323,8 @@ class SimpleOpenID
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function CURL_Request($url, $method="GET", $params = "")
|
||||
{ // Remember, SSL MUST BE SUPPORTED
|
||||
{
|
||||
// Remember, SSL MUST BE SUPPORTED
|
||||
if (is_array($params)) $params = $this->array2url($params);
|
||||
|
||||
$curl = curl_init($url . ($method == "GET" && $params != "" ? "?" . $params : ""));
|
||||
@@ -377,7 +381,7 @@ class SimpleOpenID
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function GetOpenIDServer($url='')
|
||||
{
|
||||
global $conf;
|
||||
global $conf;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
if (empty($url)) $url=$conf->global->MAIN_AUTHENTICATION_OPENID_URL;
|
||||
|
||||
@@ -1655,7 +1655,7 @@ class SMTPs
|
||||
* @param integer $_value Message Priority
|
||||
* @return void
|
||||
*/
|
||||
function setPriority ( $_value = 3 )
|
||||
function setPriority( $_value = 3 )
|
||||
{
|
||||
if ( ( is_numeric($_value) ) &&
|
||||
( ( $_value >= 0 ) && ( $_value <= 5 ) ) )
|
||||
@@ -1821,12 +1821,14 @@ class SMTPs
|
||||
* @param int $_errNum Error Code Number
|
||||
* @param string $_errMsg Error Message
|
||||
* @return void
|
||||
*/
|
||||
function _setErr ( $_errNum, $_errMsg )
|
||||
{
|
||||
$this->_smtpsErrors[] = array( 'num' => $_errNum,
|
||||
'msg' => $_errMsg );
|
||||
}
|
||||
*/
|
||||
function _setErr( $_errNum, $_errMsg )
|
||||
{
|
||||
$this->_smtpsErrors[] = array(
|
||||
'num' => $_errNum,
|
||||
'msg' => $_errMsg,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns errors codes and messages for Class
|
||||
|
||||
@@ -677,7 +677,8 @@ class Utils
|
||||
*
|
||||
* @return int 0 if OK, < 0 if KO
|
||||
*/
|
||||
function compressSyslogs() {
|
||||
function compressSyslogs()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if(empty($conf->loghandlers['mod_syslog_file'])) { // File Syslog disabled
|
||||
|
||||
@@ -111,12 +111,13 @@ class vCard
|
||||
* mise en forme de la photo
|
||||
* warning NON TESTE !
|
||||
*
|
||||
* @param string $type Type
|
||||
* @param string $photo Photo
|
||||
* @return void
|
||||
*/
|
||||
* @param string $type Type
|
||||
* @param string $photo Photo
|
||||
* @return void
|
||||
*/
|
||||
function setPhoto($type, $photo)
|
||||
{ // $type = "GIF" | "JPEG"
|
||||
{
|
||||
// $type = "GIF" | "JPEG"
|
||||
$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo);
|
||||
}
|
||||
|
||||
@@ -155,7 +156,7 @@ class vCard
|
||||
* @return void
|
||||
*/
|
||||
function setBirthday($date)
|
||||
{
|
||||
{
|
||||
// $date format is YYYY-MM-DD - RFC 2425 and RFC 2426
|
||||
$this->properties["BDAY"] = dol_print_date($date, 'dayrfc');
|
||||
}
|
||||
@@ -200,7 +201,8 @@ class vCard
|
||||
* @param string $type Type
|
||||
* @return void
|
||||
*/
|
||||
function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") {
|
||||
function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL")
|
||||
{
|
||||
$label = "";
|
||||
if ($postoffice!="") $label.= "$postoffice\r\n";
|
||||
if ($extended!="") $label.= "$extended\r\n";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -66,4 +67,10 @@ class WorkboardResponse
|
||||
*/
|
||||
public $nbtodolate = 0;
|
||||
|
||||
}
|
||||
/**
|
||||
* total price of items
|
||||
* @var int
|
||||
*/
|
||||
public $total = 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user