From 1a04178d6461597669f367f48ab481f1a5b6d2e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 11:20:18 +0100 Subject: [PATCH 1/8] Clean unused file and fix missing translation --- htdocs/core/class/dolprintipp.class.php | 133 ------------------------ htdocs/langs/en_US/printing.lang | 2 + 2 files changed, 2 insertions(+), 133 deletions(-) delete mode 100644 htdocs/core/class/dolprintipp.class.php diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php deleted file mode 100644 index 99f3c14f15c..00000000000 --- a/htdocs/core/class/dolprintipp.class.php +++ /dev/null @@ -1,133 +0,0 @@ -. - * or see http://www.gnu.org/ - */ - -/** - * \file htdocs/core/class/dolprintipp.class.php - * \brief List jobs printed with driver printipp - */ - -/** - * Class to manage printIPP - */ -class dolprintIPP -{ - var $host; - var $port; - var $userid; /* user login */ - var $user; - var $password; - var $error; - var $db; - - - - /** - * Constructor - * - * @param DoliDB $db database - * @param string $host host of Cups - * @param string $port port - * @param string $userid userid - * @param string $user user - * @param string $password password - */ - function __construct($db,$host,$port,$userid,$user,$password) - { - $this->db=$db; - $this->host=$host; - $this->port=$port; - $this->userid=$userid; - $this->user=$user; - $this->password=$password; - } - - - /** - * List jobs print - * - * @param string $module module - * - * @return void - */ - function list_jobs($module) - { - global $conf, $db, $bc, $langs; - include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php'; - $ipp = new CupsPrintIPP(); - $ipp->setLog(DOL_DATA_ROOT.'/printipp.log','file',3); // logging very verbose - $ipp->setHost($this->host); - $ipp->setPort($this->port); - $ipp->setUserName($this->userid); - if (! empty($this->user)) $ipp->setAuthentication($this->user,$this->password); - // select printer uri for module order, propal,... - $sql = 'SELECT rowid,printer_uri,printer_name FROM '.MAIN_DB_PREFIX.'printer_ipp WHERE module="'.$module.'"'; - $result = $this->db->query($sql); - if ($result) - { - $obj = $this->db->fetch_object($result); - if ($obj) - { - $ipp->setPrinterURI($obj->printer_uri); - } - else - { - // All printers - $ipp->setPrinterURI("ipp://localhost:631/printers/"); - } - } - // Getting Jobs - try { - $ipp->getJobs(false,0,'completed',false); // May return errors if setup not correct - } - catch(Exception $e) - { - setEventMessage('[printipp] '.$langs->trans('CoreErrorMessage'), 'errors'); - dol_syslog($e->getMessage(), LOG_ERR); - } - - print ''; - print ''; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $jobs = $ipp->jobs_attributes; - $var = true; - //print '
'.print_r($jobs,true).'
'; - if (is_array($jobs)) - { - foreach ($jobs as $value) - { - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - } - print "
IdOwnerPrinterFileStatusCancel
'.$value->job_id->_value0.''.$value->job_originating_user_name->_value0.''.$value->printer_uri->_value0.''.$value->job_name->_value0.''.$value->job_state->_value0.''.$value->job_uri->_value0.'
"; - } - -} diff --git a/htdocs/langs/en_US/printing.lang b/htdocs/langs/en_US/printing.lang index cc26879e4f1..e8349453247 100644 --- a/htdocs/langs/en_US/printing.lang +++ b/htdocs/langs/en_US/printing.lang @@ -49,4 +49,6 @@ DirectPrintingJobsDesc=This page lists printing jobs found for available printer GoogleAuthNotConfigured=Google OAuth setup not done. Enable module OAuth and set a Google ID/Secret. GoogleAuthConfigured=Google OAuth credentials were found into setup of module OAuth. PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print. +PrintingDriverDescprintipp=Configuration variables for printing driver Cups. PrintTestDescprintgcp=List of Printers for Google Cloud Print. +PrintTestDescprintipp=List of Printers for Cups. From 0a85a4702abc568b8ae56a65f12c3400d82bedc4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 11:41:03 +0100 Subject: [PATCH 2/8] Fix https --- htdocs/core/doxygen.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/doxygen.php b/htdocs/core/doxygen.php index 543586079ae..55ea34a5778 100644 --- a/htdocs/core/doxygen.php +++ b/htdocs/core/doxygen.php @@ -27,10 +27,10 @@ *
* Dolibarr official web site: www.dolibarr.org
*
- * Dolibarr french portal: www.dolibarr.fr
- * Dolibarr spanish portal: www.dolibarr.es
- * Dolibarr italian portal: www.dolibarr.it
- * Dolibarr greek portal: www.dolibarr.gr
- * Dolibarr german portal: www.dolibarr.de
+ * Dolibarr french portal: www.dolibarr.fr
+ * Dolibarr spanish portal: www.dolibarr.es
+ * Dolibarr italian portal: www.dolibarr.it
+ * Dolibarr greek portal: www.dolibarr.gr
+ * Dolibarr german portal: www.dolibarr.de
*
*/ From 90e579b884ec52b6450b2674ae962fc85eeb9cd0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 11:49:06 +0100 Subject: [PATCH 3/8] Update doxygen --- build/doxygen/dolibarr-doxygen.doxyfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/doxygen/dolibarr-doxygen.doxyfile b/build/doxygen/dolibarr-doxygen.doxyfile index 912c72b4d69..271b64f5481 100644 --- a/build/doxygen/dolibarr-doxygen.doxyfile +++ b/build/doxygen/dolibarr-doxygen.doxyfile @@ -442,7 +442,7 @@ SORT_BY_SCOPE_NAME = NO # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. -GENERATE_TODOLIST = YES +GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test @@ -639,7 +639,7 @@ EXCLUDE_SYMBOLS = # directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = ../../dev/skeletons +EXAMPLE_PATH = ../../htdocs/modulebuilder/template # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp From be821716f0284c4cdc5531c6c7efec16aae68369 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 12:26:20 +0100 Subject: [PATCH 4/8] code comment --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index a217370971b..6eeff6cea11 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -127,7 +127,7 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex $res = $object->reprogram_jobs($user->login, $now); if ($res > 0) { - if ($resrunjob >= 0) // We add result of reprogram ony if no error message already reported + if ($resrunjob >= 0) // We show the result of reprogram only if no error message already reported { if ($object->lastresult >= 0) setEventMessages($langs->trans("JobFinished"), null, 'mesgs'); else setEventMessages($langs->trans("JobFinished"), null, 'errors'); From 2e0ec5e76aab80d4c04311f17e312a96c134bcfd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 13:17:33 +0100 Subject: [PATCH 5/8] Fix
--- htdocs/langs/en_US/main.lang | 2 +- htdocs/langs/en_US/multicurrency.lang | 2 +- htdocs/langs/en_US/other.lang | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f554bdf11a9..b9bac9b2b49 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -885,7 +885,7 @@ Select2NotFound=No result found Select2Enter=Enter Select2MoreCharacter=or more character Select2MoreCharacters=or more characters -Select2MoreCharactersMore=Search syntax:
| OR (a|b)
* Any character (a*b)
^ Start with (^ab)
$ End with (ab$)
+Select2MoreCharactersMore=Search syntax:
| OR (a|b)
* Any character (a*b)
^ Start with (^ab)
$ End with (ab$)
Select2LoadingMoreResults=Loading more results... Select2SearchInProgress=Search in progress... SearchIntoThirdparties=Thirdparties diff --git a/htdocs/langs/en_US/multicurrency.lang b/htdocs/langs/en_US/multicurrency.lang index bd19ab1b0e9..0da2ee58b60 100644 --- a/htdocs/langs/en_US/multicurrency.lang +++ b/htdocs/langs/en_US/multicurrency.lang @@ -7,7 +7,7 @@ multicurrency_syncronize_error=Synchronisation error: %s MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Use date of document to find currency rate, instead of using latest known rate multicurrency_useOriginTx=When an object is created from another, keep the original rate of source object (otherwise use the latest known rate) CurrencyLayerAccount=CurrencyLayer API -CurrencyLayerAccount_help_to_synchronize=You sould create an account on their website to use this functionnality
Get your API key
If you use a free account you can't change the currency source (USD by default)
But if your main currency isn't USD you can use the alternate currency source to force you main currency

You are limited at 1000 synchronizations per month +CurrencyLayerAccount_help_to_synchronize=You sould create an account on their website to use this functionnality
Get your API key
If you use a free account you can't change the currency source (USD by default)
But if your main currency isn't USD you can use the alternate currency source to force you main currency

You are limited at 1000 synchronizations per month multicurrency_appId=API key multicurrency_appCurrencySource=Currency source multicurrency_alternateCurrencySource=Alternate currency source diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 1a5314a24d9..132a200ab2e 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -162,9 +162,9 @@ SizeUnitinch=inch SizeUnitfoot=foot SizeUnitpoint=point BugTracker=Bug tracker -SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.
Change will become effective once you click on the confirmation link in the email.
Check your inbox. +SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.
Change will become effective once you click on the confirmation link in the email.
Check your inbox. BackToLoginPage=Back to login page -AuthenticationDoesNotAllowSendNewPassword=Authentication mode is %s.
In this mode, Dolibarr can't know nor change your password.
Contact your system administrator if you want to change your password. +AuthenticationDoesNotAllowSendNewPassword=Authentication mode is %s.
In this mode, Dolibarr can't know nor change your password.
Contact your system administrator if you want to change your password. EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. ProfIdShortDesc=Prof Id %s is an information depending on third party country.
For example, for country %s, it's code %s. DolibarrDemo=Dolibarr ERP/CRM demo From dcd579242f9afdb81d9291ec6743c66e93f6539b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 13:26:57 +0100 Subject: [PATCH 6/8] Fix
(xml) into
(html) --- htdocs/core/lib/functions2.lib.php | 2 +- htdocs/install/mysql/data/llx_c_email_templates.sql | 2 +- htdocs/install/mysql/migration/6.0.0-7.0.0.sql | 2 +- htdocs/projet/ganttchart.inc.php | 2 +- test/phpunit/CodingPhpTest.php | 11 +++++------ 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 9f0869aac1d..8f912f8dc89 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1987,7 +1987,7 @@ function getElementProperties($element_type) $module = $regs[2]; } - //print '
1. element : '.$element.' - module : '.$module .'
'; + //print '
1. element : '.$element.' - module : '.$module .'
'; if ( preg_match('/^([^_]+)_([^_]+)/i',$element,$regs)) { $module = $element = $regs[1]; diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql index bfa183781c7..3a99e44cd8b 100644 --- a/htdocs/install/mysql/data/llx_c_email_templates.sql +++ b/htdocs/install/mysql/data/llx_c_email_templates.sql @@ -20,7 +20,7 @@ -- de l'install et tous les sigles '--' sont supprimés. -- -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null); +INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null); INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',null); diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index befa29e03ae..8433c821cc7 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -183,7 +183,7 @@ ALTER TABLE llx_c_email_templates ADD COLUMN enabled varchar(255) DEFAULT '1'; ALTER TABLE llx_c_email_templates ADD COLUMN joinfiles varchar(255) DEFAULT '1'; ALTER TABLE llx_c_email_templates MODIFY COLUMN content mediumtext; -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null); +INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'adherent','member','',0,null,null,'(SendAnEMailToMember)',1,1,1,'__(CardContent)__','__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null); INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',null); INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 1, 'VENTES', 'Income of products/services', 'Exemple: 7xxxxx', 0, 0, '', '10', 1, 1); diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php index cb4a7d878e7..bc85e5bae78 100644 --- a/htdocs/projet/ganttchart.inc.php +++ b/htdocs/projet/ganttchart.inc.php @@ -241,7 +241,7 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level=0, $project
pGroup
(optional) indicates whether this is a group task (parent) - Numeric; 0 = normal task, 1 = standard group task, 2 = combined group task*
pParent
(required) identifies a parent pID, this causes this task to be a child of identified task. Numeric, top level tasks should have pParent set to 0
pOpen
(required) indicates whether a standard group task is open when chart is first drawn. Value must be set for all items but is only used by standard group tasks. Numeric, 1 = open, 0 = closed
-
pDepend
(optional) comma separated list of id's this task is dependent on. A line will be drawn from each listed task to this item
Each id can optionally be followed by a dependency type suffix. Valid values are:
'FS' - Finish to Start (default if suffix is omitted)
'SF' - Start to Finish
'SS' - Start to Start
'FF' - Finish to Finish
If present the suffix must be added directly to the id e.g. '123SS'
+
pDepend
(optional) comma separated list of id's this task is dependent on. A line will be drawn from each listed task to this item
Each id can optionally be followed by a dependency type suffix. Valid values are:
'FS' - Finish to Start (default if suffix is omitted)
'SF' - Start to Finish
'SS' - Start to Start
'FF' - Finish to Finish
If present the suffix must be added directly to the id e.g. '123SS'
pCaption
(optional) caption that will be added after task bar if CaptionType set to "Caption"
pNotes
(optional) Detailed task information that will be displayed in tool tip for this task
pGantt
(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to "g" for backwards compatibility
diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 073adc8ef9a..2e4deb372eb 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -221,21 +221,20 @@ class CodingPhpTest extends PHPUnit_Framework_TestCase $this->assertTrue($ok, 'Found a use of print_liste_field_titre with fist parameter that is a translated value instead of just the translation key in file '.$file['fullname'].'. Bad.'); - // Test that output of $_SERVER\[\'PHP_SELF\'\] is escaped (not done for the moment, did not found a way to forge value of $_SERVER['PHP_SELF'] by extern access). - /*$ok=true; + // Test we don't have
+ $ok=true; $matches=array(); // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/(...................)\$_SERVER\[\'PHP_SELF\'\]/', $filecontent, $matches, PREG_SET_ORDER); + preg_match_all('/
/', $filecontent, $matches, PREG_SET_ORDER); foreach($matches as $key => $val) { - if ($val[1] != 'dol_escape_htmltag(') + if ($file['name'] != 'functions.lib.php') { $ok=false; break; } } - $this->assertTrue($ok, 'Found a $_SERVER[\'PHP_SELF\'] without dol_escape_htmltag around in file '.$file['fullname'].' ('.$val[1].'$_SERVER[\'PHP_SELF\']). Bad.'); - */ + $this->assertTrue($ok, 'Found a tag
that is for xml in file '.$file['fullname'].' You may use
instead.'); } return; From 1e9ddf153c792025221844cf94dd3a69c2716f52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 13:55:53 +0100 Subject: [PATCH 7/8] Fix workboard not visible on smartphone, so i invert position with stats --- htdocs/index.php | 4 ++-- htdocs/theme/eldy/style.css.php | 4 ++-- htdocs/theme/md/style.css.php | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 280cb48af86..867f305a680 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -618,7 +618,7 @@ $boxlist.='
'; $boxlist.='
'; -$boxlist.=$boxstat; +$boxlist.=$boxwork; $boxlist.=$resultboxes['boxlista']; $boxlist.= '
'; @@ -626,7 +626,7 @@ $boxlist.= '
'; $boxlist.= '
'; $boxlist.= '
'; -$boxlist.=$boxwork; +$boxlist.=$boxstat; $boxlist.=$resultboxes['boxlistb']; $boxlist.= '
'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index c711eb9b683..2ccdac53c52 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2935,9 +2935,9 @@ ul.noborder li:nth-child(even):not(.liste_titre) { overflow-x: auto; min-height: 40px; } -.ficheaddleft div.boxstats { +/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats { border: none; -} +}*/ .boxstatsborder { border: 1px solid #CCC !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f6cd5909d0e..ebe69f736e0 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3009,9 +3009,9 @@ div .tdtop { overflow-x: auto; min-height: 40px; } -.ficheaddleft div.boxstats { +/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats { border: none; -} +}*/ .boxstatsborder { border: 1px solid #CCC !important; } @@ -3030,6 +3030,7 @@ div .tdtop { .boxstats { padding: 3px; width: 100px; + min-height: 40px; } .boxstats130 { width: 135px; From 56d702e3c6f97ca1d5dac8f1969ec07f224b5286 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Jan 2018 16:26:24 +0100 Subject: [PATCH 8/8] Fix missing property in tooltip --- htdocs/compta/facture/list.php | 27 ++++++++++++++++++--------- htdocs/fourn/facture/list.php | 25 +++++++++++++++++-------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 21c35b5fade..e79e28c934a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -359,9 +359,10 @@ $sql.= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; $sql.= ' f.datec as date_creation, f.tms as date_update,'; -$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; +$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; $sql.= " typent.code as typent_code,"; -$sql.= " state.code_departement as state_code, state.nom as state_name"; +$sql.= " state.code_departement as state_code, state.nom as state_name,"; +$sql.= " country.code as country_code"; // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed'; @@ -484,8 +485,10 @@ if (! $sall) $sql.= ' f.datef, f.date_lim_reglement,'; $sql.= ' f.paye, f.fk_statut,'; $sql.= ' f.datec, f.tms,'; - $sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code,'; - $sql.= ' state.code_departement, state.nom'; + $sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; + $sql.= ' typent.code,'; + $sql.= ' state.code_departement, state.nom,'; + $sql.= ' country.code'; foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by { @@ -878,6 +881,17 @@ if ($resql) $facturestatic->note_public=$obj->note_public; $facturestatic->note_private=$obj->note_private; + $thirdpartystatic->id=$obj->socid; + $thirdpartystatic->name=$obj->name; + $thirdpartystatic->client=$obj->client; + $thirdpartystatic->fournisseur=$obj->fournisseur; + $thirdpartystatic->code_client=$obj->code_client; + $thirdpartystatic->code_compta_client=$obj->code_compta_client; + $thirdpartystatic->code_fournisseur=$obj->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur=$obj->code_compta_fournisseur; + $thirdpartystatic->email=$obj->email; + $thirdpartystatic->country_code=$obj->country_code; + $paiement = $facturestatic->getSommePaiement(); $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); $totaldeposits = $facturestatic->getSumDepositsUsed(); @@ -966,11 +980,6 @@ if ($resql) if (! empty($arrayfields['s.nom']['checked'])) { print ''; - $thirdpartystatic->id=$obj->socid; - $thirdpartystatic->name=$obj->name; - $thirdpartystatic->client=$obj->client; - $thirdpartystatic->code_client=$obj->code_client; - $thirdpartystatic->email=$obj->email; print $thirdpartystatic->getNomUrl(1,'customer'); print ''; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 2227c750927..9e806fc3f86 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -255,6 +255,7 @@ $formfile = new FormFile($db); $bankaccountstatic=new Account($db); $facturestatic=new FactureFournisseur($db); $formcompany=new FormCompany($db); +$thirdparty=new Societe($db); llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); @@ -263,9 +264,10 @@ if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement,"; $sql.= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_update,"; $sql.= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,"; -$sql.= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; +$sql.= " s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,"; $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; +$sql.= " country.code as country_code,"; $sql.= " p.rowid as project_id, p.ref as project_ref"; // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. @@ -378,9 +380,10 @@ if (! $search_all) $sql.= " GROUP BY f.rowid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement, f.fk_mode_reglement,"; $sql.= " f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut, f.libelle, f.datec, f.tms,"; $sql.= " f.localtax1, f.localtax2,"; - $sql.= " s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; + $sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; $sql.= " typent.code,"; $sql.= " state.code_departement, state.nom,"; + $sql.= ' country.code,'; $sql.= " p.rowid, p.ref"; foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by @@ -790,6 +793,17 @@ if ($resql) $facturestatic->date_echeance = $db->jdate($obj->datelimite); $facturestatic->statut = $obj->fk_statut; + $thirdparty->id=$obj->socid; + $thirdparty->name=$obj->name; + $thirdparty->client=$obj->client; + $thirdparty->fournisseur=$obj->fournisseur; + $thirdparty->code_client=$obj->code_client; + $thirdparty->code_compta_client=$obj->code_compta_client; + $thirdparty->code_fournisseur=$obj->code_fournisseur; + $thirdparty->code_compta_fournisseur=$obj->code_compta_fournisseur; + $thirdparty->email=$obj->email; + $thirdparty->country_code=$obj->country_code; + $paiement = $facturestatic->getSommePaiement(); $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); $totaldeposits = $facturestatic->getSumDepositsUsed(); @@ -821,7 +835,7 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - // Customer ref + // Supplier ref if (! empty($arrayfields['f.ref_supplier']['checked'])) { print ''; @@ -878,11 +892,6 @@ if ($resql) if (! empty($arrayfields['s.nom']['checked'])) { print ''; - $thirdparty=new Societe($db); - $thirdparty->id=$obj->socid; - $thirdparty->name=$obj->name; - $thirdparty->client=$obj->client; - $thirdparty->code_client=$obj->code_client; print $thirdparty->getNomUrl(1,'supplier'); print ''; if (! $i) $totalarray['nbfield']++;