* @return string String with HTML select
* @see select_country
*/
@@ -221,7 +221,7 @@ class FormCompany
$out='';
- // On recherche les departements/cantons/province active d'une region et pays actif
+ // Serch departements/cantons/province active d'une region et pays actif
$sql = "SELECT d.rowid, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.nom as region_name FROM";
$sql .= " ".MAIN_DB_PREFIX ."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c";
$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid";
@@ -230,7 +230,6 @@ class FormCompany
if ($country_codeid && ! is_numeric($country_codeid)) $sql .= " AND c.code = '".$this->db->escape($country_codeid)."'";
$sql .= " ORDER BY c.code, d.code_departement";
- dol_syslog(get_class($this)."::select_departement", LOG_DEBUG);
$result=$this->db->query($sql);
if ($result)
{
@@ -302,9 +301,12 @@ class FormCompany
dol_print_error($this->db);
}
- // Make select dynamic
- include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
- $out .= ajax_combobox($htmlname);
+ // Make select dynamic
+ if (! empty($htmlname))
+ {
+ include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
+ $out .= ajax_combobox($htmlname);
+ }
return $out;
}
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 36a96cf56b8..fa1d9528ef5 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -89,7 +89,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id;
$head[$h][1] = '';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] .= $langs->trans("Prospect");
- if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/';
+ if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= ' | ';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer");
$head[$h][2] = 'customer';
$h++;
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 20f1645a109..226619b90e1 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1594,6 +1594,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
* @param string $langkey Translation key
* @param string $fieldkey Key of the html select field the text refers to
* @param int $fieldrequired 1=Field is mandatory
+ * @return string
* @deprecated Form::editfieldkey
*/
function fieldLabel($langkey, $fieldkey, $fieldrequired=0)
@@ -7431,6 +7432,7 @@ function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata=0, $param=''
*
* @param string $htmlname Id of html object
* @param string $addlink Add a 'link to' after
+ * @return string
*/
function ajax_autoselect($htmlname, $addlink='')
{
@@ -7568,6 +7570,7 @@ function dol_mimetype($file, $default='application/octet-stream', $mode=0)
* @param int $id id of line
* @param bool $checkentity add filter on entity
* @param string $rowidfield name of the column rowid
+ * @return string
*/
function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='rowid')
{
diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php
index f4319b7d11a..9f04a81fa5f 100644
--- a/htdocs/core/lib/functionsnumtoword.lib.php
+++ b/htdocs/core/lib/functionsnumtoword.lib.php
@@ -21,12 +21,12 @@
* \brief A set of functions for Dolibarr
* This file contains all frequently used functions.
*/
-
-
+
+
/**
* Function to return number in text.
- *
- *
+ *
+ *
* @param float $num Number to convert
* @param Lang $langs Language
* @param boolean $currency 0=number to translate | 1=currency to translate
@@ -36,7 +36,7 @@
function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
{
global $conf;
-
+
$num = str_replace(array(',', ' '), '', trim($num));
if(! $num) {
return false;
@@ -48,49 +48,49 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
$num = (int) $TNum[0];
$words = array();
$list1 = array(
- '',
- $langs->transnoentitiesnoconv('one'),
- $langs->transnoentitiesnoconv('two'),
- $langs->transnoentitiesnoconv('three'),
- $langs->transnoentitiesnoconv('four'),
- $langs->transnoentitiesnoconv('five'),
- $langs->transnoentitiesnoconv('six'),
- $langs->transnoentitiesnoconv('seven'),
- $langs->transnoentitiesnoconv('eight'),
- $langs->transnoentitiesnoconv('nine'),
- $langs->transnoentitiesnoconv('ten'),
+ '',
+ $langs->transnoentitiesnoconv('one'),
+ $langs->transnoentitiesnoconv('two'),
+ $langs->transnoentitiesnoconv('three'),
+ $langs->transnoentitiesnoconv('four'),
+ $langs->transnoentitiesnoconv('five'),
+ $langs->transnoentitiesnoconv('six'),
+ $langs->transnoentitiesnoconv('seven'),
+ $langs->transnoentitiesnoconv('eight'),
+ $langs->transnoentitiesnoconv('nine'),
+ $langs->transnoentitiesnoconv('ten'),
$langs->transnoentitiesnoconv('eleven'),
- $langs->transnoentitiesnoconv('twelve'),
- $langs->transnoentitiesnoconv('thirteen'),
- $langs->transnoentitiesnoconv('fourteen'),
- $langs->transnoentitiesnoconv('fifteen'),
- $langs->transnoentitiesnoconv('sixteen'),
- $langs->transnoentitiesnoconv('seventeen'),
- $langs->transnoentitiesnoconv('eighteen'),
+ $langs->transnoentitiesnoconv('twelve'),
+ $langs->transnoentitiesnoconv('thirteen'),
+ $langs->transnoentitiesnoconv('fourteen'),
+ $langs->transnoentitiesnoconv('fifteen'),
+ $langs->transnoentitiesnoconv('sixteen'),
+ $langs->transnoentitiesnoconv('seventeen'),
+ $langs->transnoentitiesnoconv('eighteen'),
$langs->transnoentitiesnoconv('nineteen')
);
$list2 = array(
- '',
- $langs->transnoentitiesnoconv('ten'),
- $langs->transnoentitiesnoconv('twenty'),
- $langs->transnoentitiesnoconv('thirty'),
- $langs->transnoentitiesnoconv('forty'),
- $langs->transnoentitiesnoconv('fifty'),
- $langs->transnoentitiesnoconv('sixty'),
- $langs->transnoentitiesnoconv('seventy'),
- $langs->transnoentitiesnoconv('eighty'),
- $langs->transnoentitiesnoconv('ninety'),
+ '',
+ $langs->transnoentitiesnoconv('ten'),
+ $langs->transnoentitiesnoconv('twenty'),
+ $langs->transnoentitiesnoconv('thirty'),
+ $langs->transnoentitiesnoconv('forty'),
+ $langs->transnoentitiesnoconv('fifty'),
+ $langs->transnoentitiesnoconv('sixty'),
+ $langs->transnoentitiesnoconv('seventy'),
+ $langs->transnoentitiesnoconv('eighty'),
+ $langs->transnoentitiesnoconv('ninety'),
$langs->transnoentitiesnoconv('hundred')
);
$list3 = array(
- '',
- $langs->transnoentitiesnoconv('thousand'),
- $langs->transnoentitiesnoconv('million'),
- $langs->transnoentitiesnoconv('billion'),
- $langs->transnoentitiesnoconv('trillion'),
+ '',
+ $langs->transnoentitiesnoconv('thousand'),
+ $langs->transnoentitiesnoconv('million'),
+ $langs->transnoentitiesnoconv('billion'),
+ $langs->transnoentitiesnoconv('trillion'),
$langs->transnoentitiesnoconv('quadrillion')
);
-
+
$num_length = strlen($num);
$levels = (int) (($num_length + 2) / 3);
$max_length = $levels * 3;
@@ -120,11 +120,11 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
$concatWords = implode(' ', $words);
// Delete multi whitespaces
$concatWords = trim(preg_replace('/[ ]+/', ' ', $concatWords));
-
+
if(!empty($currency)) {
$concatWords .= ' '.$currency;
}
-
+
// If we need to write cents call again this function for cents
if(!empty($TNum[1])) {
if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
@@ -133,11 +133,11 @@ function dol_convertToWord($num, $langs, $currency=false, $centimes=false)
}
return $concatWords;
}
-
-
+
+
/**
* Function to return number or amount in text.
- *
+ *
* @deprecated
* @param float $numero Number to convert
* @param Lang $langs Language
@@ -164,7 +164,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
/*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and
in case exist why ask $lang like a parameter?*/
if (((is_object($langs) && $langs->default == 'es_MX') || (! is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
- {
+ {
if ($numero>=1 && $numero<2) {
return ("UN PESO ".$parte_decimal." / 100 M.N.");
}
@@ -229,10 +229,11 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
/**
* hundreds2text
- *
+ *
* @param integer $hundreds Hundreds
* @param integer $tens Tens
* @param integer $units Units
+ * @return string
*/
function hundreds2text($hundreds, $tens, $units)
{
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 74ab2d61b83..877c519248b 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -263,6 +263,7 @@ function pdf_getHeightForLogo($logo, $url = false)
*
* @param TCPDF $pdf PDF initialized object
* @param string $htmlcontent HTML Contect
+ * @return number
* @see getStringHeight
*/
function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
@@ -2120,4 +2121,3 @@ function pdf_getSizeForImage($realpath)
}
return array('width'=>$width,'height'=>$height);
}
-
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 7c4437116f3..0186b90cc16 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -150,11 +150,10 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
if (! empty($conf->salaries->enabled)) $menuqualified++;
if (! empty($conf->supplier_invoice->enabled)) $menuqualified++;
if (! empty($conf->loan->enabled)) $menuqualified++;
- if (! empty($conf->banque->enabled)) $menuqualified++;
$tmpentry=array(
'enabled'=>$menuqualified,
- 'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read) || ! empty($user->rights->banque->lire)),
- 'module'=>'facture|supplier_invoice|don|tax|salaries|loan|banque');
+ 'perms'=>(! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire) || ! empty($user->rights->loan->read)),
+ 'module'=>'facture|supplier_invoice|don|tax|salaries|loan');
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
index 0aadcb2baf8..2bb185328f1 100644
--- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
+++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
@@ -77,6 +77,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param int $y y position in user units
* @param int $w width in user units
* @param int $h height in user units
+ * @return void
*/
private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
{
diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php
index 2668bce4e3b..a87aea81d30 100644
--- a/htdocs/expensereport/class/expensereport.class.php
+++ b/htdocs/expensereport/class/expensereport.class.php
@@ -1302,6 +1302,7 @@ class ExpenseReport extends CommonObject
* @param User $fuser User
* @param Details $details Details
* @param int $notrigger Disable triggers
+ * @return int
*/
function setDeny($fuser,$details,$notrigger=0)
{
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 3a8dbca7a70..11c40ff45a8 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -2904,7 +2904,7 @@ else
if ($resteapayeraffiche <= 0)
print $langs->trans('RemainderToPayBack');
else
- print $langs->trans('ExcessPaydBack');
+ print $langs->trans('ExcessPaid');
print ' :';
print '' . price($sign * $resteapayeraffiche) . ' ';
print ' ';
diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
index 530070c8252..3252a394c00 100644
--- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
+++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql
@@ -32,6 +32,10 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
+-- Forgot in < 4.0
+
+ALTER TABLE llx_c_ziptown DROP FOREIGN KEY fk_c_ziptown_fk_pays;
+ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country(rowid);
-- Forgot in 7.0
@@ -49,6 +53,7 @@ ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files (filepath, filename, ent
UPDATE llx_const set name = __ENCRYPT('INVOICE_FREE_TEXT')__ where name = __ENCRYPT('FACTURE_FREE_TEXT')__;
+
-- drop very old table (bad name)
DROP TABLE llx_c_accountancy_category;
DROP TABLE llx_c_accountingaccount;
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index f1e17a43cfe..9c1a0a35837 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -35,7 +35,7 @@ AgendaAutoActionDesc= Define here events for which you want Dolibarr to create a
AgendaSetupOtherDesc= This page provides options to allow export of your Dolibarr events into an external calendar (thunderbird, google calendar, ...)
AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda.
ActionsEvents=Events for which Dolibarr will create an action in agenda automatically
-EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into Agenda module setup.
+EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup.
##### Agenda event labels #####
NewCompanyToDolibarr=Third party %s created
ContractValidatedInDolibarr=Contract %s validated
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 37d9980c806..5b5382480a1 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -65,8 +65,9 @@ ErrorNoValueForSelectType=Please fill value for select list
ErrorNoValueForCheckBoxType=Please fill value for checkbox list
ErrorNoValueForRadioType=Please fill value for radio list
ErrorBadFormatValueList=The list value cannot have more than one comma: %s , but need at least one: key,value
-ErrorFieldCanNotContainSpecialCharacters=Field %s must not contains special characters.
-ErrorFieldCanNotContainSpecialNorUpperCharacters=Field %s must not contain special characters, nor upper case characters and cannot contain only numbers.
+ErrorFieldCanNotContainSpecialCharacters=The field %s must not contains special characters.
+ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters and cannot contain only numbers.
+ErrorFieldMustHaveXChar=The field %s must have at least %s characters.
ErrorNoAccountancyModuleLoaded=No accountancy module activated
ErrorExportDuplicateProfil=This profile name already exists for this export set.
ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete.
diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index 48867fedb6f..fe3a4b7cf92 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -62,6 +62,7 @@ CreateByFetchingExternalPage=Create page/container by fetching page from externa
OrEnterPageInfoManually=Or create empty page from scratch...
FetchAndCreate=Fetch and Create
ExportSite=Export site
+ImportSite=Import site
IDOfPage=Id of page
Banner=Banner
BlogPost=Blog post
@@ -84,4 +85,5 @@ SubdirOfPage=Sub-directory dedicated to page
AliasPageAlreadyExists=Alias page %s already exists
CorporateHomePage=Corporate Home page
EmptyPage=Empty page
-ExternalURLMustStartWithHttp=External URL must start with http:// or https://
\ No newline at end of file
+ExternalURLMustStartWithHttp=External URL must start with http:// or https://
+ZipOfWebsitePackageToImport=Zip file of website package
\ No newline at end of file
diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php
index 5bc1fb7c206..26e64785524 100644
--- a/htdocs/modulebuilder/admin/setup.php
+++ b/htdocs/modulebuilder/admin/setup.php
@@ -155,5 +155,6 @@ if (GETPOST('withtab', 'alpha')) {
print ' ';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 2eb20f48fea..ea3824fc5fb 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -2487,8 +2487,6 @@ elseif (! empty($module))
dol_fiche_end(); // End modules
-
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php
index f439d4fd9d8..b2b9356217e 100644
--- a/htdocs/modulebuilder/template/mymoduleindex.php
+++ b/htdocs/modulebuilder/template/mymoduleindex.php
@@ -233,6 +233,6 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read)
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php
index dfd69037baf..7559c874e68 100644
--- a/htdocs/modulebuilder/template/myobject_agenda.php
+++ b/htdocs/modulebuilder/template/myobject_agenda.php
@@ -256,7 +256,6 @@ if ($object->id > 0)
}
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index 16a83ee7d0d..3f2d9b14dac 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -467,7 +467,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
}
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index 9dd021326b0..a2db0266012 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -161,6 +161,6 @@ else
accessforbidden('',0,0);
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php
index d240f07ef53..6063d337679 100644
--- a/htdocs/modulebuilder/template/myobject_note.php
+++ b/htdocs/modulebuilder/template/myobject_note.php
@@ -159,6 +159,6 @@ if ($id > 0 || ! empty($ref))
dol_fiche_end();
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php b/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php
index a70cc9bee8d..8adf184e24f 100644
--- a/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php
+++ b/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php
@@ -99,6 +99,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Global test setup
+ * @return void
*/
public static function setUpBeforeClass()
{
@@ -106,6 +107,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Unit test setup
+ * @return void
*/
public function setUp()
{
@@ -115,6 +117,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Verify pre conditions
+ * @return void
*/
protected function assertPreConditions()
{
@@ -122,6 +125,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Handle Dolibarr authentication
+ * @return void
*/
private function authenticate()
{
@@ -142,6 +146,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Test enabling developer mode
+ * @return bool
*/
public function testEnableDeveloperMode()
{
@@ -161,6 +166,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test enabling the module
*
* @depends testEnableDeveloperMode
+ * @return bool
*/
public function testModuleEnabled()
{
@@ -186,6 +192,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test access to the configuration page
*
* @depends testModuleEnabled
+ * @return bool
*/
public function testConfigurationPage()
{
@@ -198,6 +205,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test access to the about page
*
* @depends testConfigurationPage
+ * @return bool
*/
public function testAboutPage()
{
@@ -210,6 +218,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test about page is rendering Markdown
*
* @depends testAboutPage
+ * @return bool
*/
public function testAboutPageRendersMarkdownReadme()
{
@@ -226,6 +235,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test box is properly declared
*
* @depends testModuleEnabled
+ * @return bool
*/
public function testBoxDeclared()
{
@@ -238,6 +248,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test trigger is properly enabled
*
* @depends testModuleEnabled
+ * @return bool
*/
public function testTriggerDeclared()
{
@@ -254,6 +265,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
* Test trigger is properly declared
*
* @depends testTriggerDeclared
+ * @return bool
*/
public function testTriggerEnabled()
{
@@ -268,6 +280,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Verify post conditions
+ * @return void
*/
protected function assertPostConditions()
{
@@ -275,6 +288,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Unit test teardown
+ * @return void
*/
public function tearDown()
{
@@ -282,6 +296,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
/**
* Global test teardown
+ * @return void
*/
public static function tearDownAfterClass()
{
diff --git a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php
index f2ea5b9934b..b62e2231313 100644
--- a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php
+++ b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php
@@ -32,6 +32,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
{
/**
* Global test setup
+ * @return void
*/
public static function setUpBeforeClass()
{
@@ -40,6 +41,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* Unit test setup
+ * @return void
*/
protected function setUp()
{
@@ -48,6 +50,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* Verify pre conditions
+ * @return void
*/
protected function assertPreConditions()
{
@@ -56,6 +59,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* A sample test
+ * @return bool
*/
public function testSomething()
{
@@ -66,6 +70,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* Verify post conditions
+ * @return void
*/
protected function assertPostConditions()
{
@@ -74,6 +79,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* Unit test teardown
+ * @return void
*/
protected function tearDown()
{
@@ -82,6 +88,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
/**
* Global test teardown
+ * @return void
*/
public static function tearDownAfterClass()
{
@@ -92,6 +99,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase
* Unsuccessful test
*
* @param Exception $e Exception
+ * @return void
* @throws Exception
*/
protected function onNotSuccessfulTest(Exception $e)
diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php
index 2881e23a21b..46b56a2600f 100644
--- a/htdocs/multicurrency/class/multicurrency.class.php
+++ b/htdocs/multicurrency/class/multicurrency.class.php
@@ -93,7 +93,7 @@ class MultiCurrency extends CommonObject
public function __construct(DoliDB $db)
{
$this->db = &$db;
-
+
return 1;
}
@@ -108,21 +108,21 @@ class MultiCurrency extends CommonObject
public function create(User $user, $trigger = true)
{
global $conf,$langs;
-
+
dol_syslog('Currency::create', LOG_DEBUG);
$error = 0;
-
+
if (self::checkCodeAlreadyExists($this->code))
{
$error++;
$this->errors[] = $langs->trans('multicurrency_code_already_added');
return -1;
}
-
+
if (empty($this->entity) || $this->entity <= 0) $this->entity = $conf->entity;
$now=date('Y-m-d H:i:s');
-
+
// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
$sql .= ' code,';
@@ -152,7 +152,7 @@ class MultiCurrency extends CommonObject
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
$this->date_create = $now;
$this->fk_user = $user->id;
-
+
if ($trigger) {
$result=$this->call_trigger('CURRENCY_CREATE', $user);
if ($result < 0) $error++;
@@ -181,7 +181,7 @@ class MultiCurrency extends CommonObject
public function fetch($id, $code = null)
{
dol_syslog('Currency::fetch', LOG_DEBUG);
-
+
global $conf;
$sql = 'SELECT';
@@ -192,7 +192,7 @@ class MultiCurrency extends CommonObject
dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $this->db->query($sql);
-
+
if ($resql) {
$numrows = $this->db->num_rows($resql);
if ($numrows) {
@@ -204,7 +204,7 @@ class MultiCurrency extends CommonObject
$this->entity = $obj->entity;
$this->date_create = $obj->date_create;
$this->fk_user = $obj->fk_user;
-
+
$this->fetchAllCurrencyRate();
$this->getRate();
}
@@ -234,7 +234,7 @@ class MultiCurrency extends CommonObject
$sql.= ' FROM ' . MAIN_DB_PREFIX . $this->table_element_line. ' as cr';
$sql.= ' WHERE cr.fk_multicurrency = '.$this->id;
$sql.= ' ORDER BY cr.date_sync DESC';
-
+
$this->rates = array();
dol_syslog(__METHOD__,LOG_DEBUG);
@@ -245,7 +245,7 @@ class MultiCurrency extends CommonObject
while ($obj = $this->db->fetch_object($resql)) {
$rate = new CurrencyRate($this->db);
$rate->fetch($obj->rowid);
-
+
$this->rates[] = $rate;
}
$this->db->free($resql);
@@ -272,19 +272,19 @@ class MultiCurrency extends CommonObject
$error = 0;
dol_syslog('Currency::update', LOG_DEBUG);
-
+
// Clean parameters
$this->name = trim($this->name);
$this->code = trim($this->code);
-
+
// Check parameters
if (empty($this->code)) {
$error++;
dol_syslog('Currency::update $this->code can not be empty', LOG_ERR);
-
+
return -1;
}
-
+
// Update request
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
$sql .= ' name=\''.$this->db->escape($this->name).'\'';
@@ -328,7 +328,7 @@ class MultiCurrency extends CommonObject
public function delete($trigger = true)
{
global $user;
-
+
dol_syslog('Currency::delete', LOG_DEBUG);
$error = 0;
@@ -347,7 +347,7 @@ class MultiCurrency extends CommonObject
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog('Currency::delete ' . join(',', $this->errors), LOG_ERR);
}
-
+
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
$sql .= ' WHERE rowid=' . $this->id;
@@ -371,7 +371,7 @@ class MultiCurrency extends CommonObject
return 1;
}
}
-
+
/**
* Delete rates in database
*
@@ -386,137 +386,137 @@ class MultiCurrency extends CommonObject
return false;
}
}
-
+
return true;
}
-
+
/**
- * Delete rate in database
- *
+ * Delete rate in database
+ *
* @param double $rate rate value
- *
+ *
* @return int -1 if KO, 1 if OK
*/
- public function addRate($rate)
- {
+ public function addRate($rate)
+ {
$currencyRate = new CurrencyRate($this->db);
$currencyRate->rate = $rate;
-
- if ($currencyRate->create($this->id) > 0)
+
+ if ($currencyRate->create($this->id) > 0)
{
$this->rate = $currencyRate;
return 1;
}
- else
+ else
{
$this->rate = null;
return -1;
}
- }
-
- /**
- * Try get label of code in llx_currency then add rate
- *
- * @param string $code currency code
- * @param double $rate new rate
- *
- * @return int -1 if KO, 1 if OK, 2 if label found and OK
- */
+ }
+
+ /**
+ * Try get label of code in llx_currency then add rate
+ *
+ * @param string $code currency code
+ * @param double $rate new rate
+ *
+ * @return int -1 if KO, 1 if OK, 2 if label found and OK
+ */
function addRateFromDolibarr($code, $rate)
{
global $db, $user;
-
+
$currency = new MultiCurrency($db);
$currency->code = $code;
$currency->name = $code;
-
+
$sql = 'SELECT label FROM '.MAIN_DB_PREFIX.'c_currencies WHERE code_iso = \''.$db->escape($code).'\'';
-
+
dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql && ($line = $db->fetch_object($resql)))
{
$currency->name = $line->label;
}
-
+
if ($currency->create($user) > 0)
{
$currency->addRate($rate);
-
+
if (!empty($line)) return 2;
else return 1;
}
-
- return -1;
+
+ return -1;
}
-
- /**
+
+ /**
* Add new entry into llx_multicurrency_rate to historise
- *
+ *
* @param double $rate rate value
- *
+ *
* @return int <0 if KO, >0 if OK
*/
- public function updateRate($rate)
- {
+ public function updateRate($rate)
+ {
return $this->addRate($rate);
- }
-
+ }
+
/**
- * Fetch CurrencyRate object in $this->rate
- *
+ * Fetch CurrencyRate object in $this->rate
+ *
* @return int <0 if KO, 0 if not found, >0 if OK
*/
- public function getRate()
- {
+ public function getRate()
+ {
$sql = 'SELECT cr.rowid';
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as cr';
$sql.= ' WHERE cr.fk_multicurrency = '.$this->id;
$sql.= ' AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM '.MAIN_DB_PREFIX.$this->table_element_line.' AS cr2 WHERE cr2.fk_multicurrency = '.$this->id.')';
-
+
dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql && ($obj = $this->db->fetch_object($resql))) {
$this->rate = new CurrencyRate($this->db);
return $this->rate->fetch($obj->rowid);
}
-
- }
-
- /**
- * Get id of currency from code
+
+ }
+
+ /**
+ * Get id of currency from code
*
* @param DoliDB $db object db
* @param string $code code value search
- *
+ *
* @return 0 if not found, >0 if OK
*/
- public static function getIdFromCode(&$db, $code)
- {
+ public static function getIdFromCode(&$db, $code)
+ {
global $conf;
-
+
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE code = \''.$db->escape($code).'\' AND entity = '.$conf->entity;
-
+
dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid;
else return 0;
- }
-
- /**
- * Get id and rate of currency from code
- *
+ }
+
+ /**
+ * Get id and rate of currency from code
+ *
* @param DoliDB $db object db
* @param string $code code value search
* @param date $date_document date from document (propal, order, invoice, ...)
- *
+ *
* @return array [0] => id currency
* [1] => rate
*/
- public static function getIdAndTxFromCode(&$db, $code, $date_document='')
- {
+ public static function getIdAndTxFromCode(&$db, $code, $date_document='')
+ {
global $conf;
-
+
$sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m';
$sql1.= ' LEFT JOIN '.MAIN_DB_PREFIX.'multicurrency_rate mc ON (m.rowid = mc.fk_multicurrency)';
$sql1.= ' WHERE m.code = \''.$db->escape($code).'\'';
@@ -524,10 +524,10 @@ class MultiCurrency extends CommonObject
$sql2= '';
if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE) && !empty($date_document)) $sql2.= ' AND DATE_FORMAT(mc.date_sync, "%Y-%m-%d") = "'.date('Y-m-d', $date_document).'"';
$sql3.= ' ORDER BY mc.date_sync DESC LIMIT 1';
-
+
dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $db->query($sql1.$sql2.$sql3);
-
+
if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate);
else
{
@@ -536,67 +536,68 @@ class MultiCurrency extends CommonObject
$resql = $db->query($sql1.$sql3);
if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate);
}
-
+
return array(0, 1);
}
- }
-
- /**
- * Get the conversion of amount with invoice rate
- *
- * @param int $fk_facture id of facture
- * @param double $amount amount to convert
- * @param string $way dolibarr mean the amount is in dolibarr currency
- * @param string $table facture or facture_fourn
- *
- * @return double amount converted
- */
- public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture')
- {
- global $db;
-
- $multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
-
- if ($multicurrency_tx)
- {
+ }
+
+ /**
+ * Get the conversion of amount with invoice rate
+ *
+ * @param int $fk_facture id of facture
+ * @param double $amount amount to convert
+ * @param string $way dolibarr mean the amount is in dolibarr currency
+ * @param string $table facture or facture_fourn
+ *
+ * @return double amount converted
+ */
+ public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way='dolibarr', $table='facture')
+ {
+ global $db;
+
+ $multicurrency_tx = self::getInvoiceRate($fk_facture, $table);
+
+ if ($multicurrency_tx)
+ {
if ($way == 'dolibarr') return $amount * $multicurrency_tx;
else return $amount / $multicurrency_tx;
- }
- else return $amount;
- }
-
- /**
- * Get current invoite rate
- *
- * @param int $fk_facture id of facture
- * @param string $table facture or facture_fourn
- */
- public static function getInvoiceRate($fk_facture, $table='facture')
- {
- global $db;
-
- $sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture;
-
- dol_syslog(__METHOD__,LOG_DEBUG);
- $resql = $db->query($sql);
- if ($resql && ($line = $db->fetch_object($resql)))
- {
+ }
+ else return $amount;
+ }
+
+ /**
+ * Get current invoite rate
+ *
+ * @param int $fk_facture id of facture
+ * @param string $table facture or facture_fourn
+ * @return bool
+ */
+ public static function getInvoiceRate($fk_facture, $table='facture')
+ {
+ global $db;
+
+ $sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture;
+
+ dol_syslog(__METHOD__,LOG_DEBUG);
+ $resql = $db->query($sql);
+ if ($resql && ($line = $db->fetch_object($resql)))
+ {
return $line->multicurrency_tx;
- }
-
- return false;
- }
+ }
+
+ return false;
+ }
/**
* With free account we can't set source then recalcul all rates to force another source
- *
- * @param stdClass $TRate Object containing all currencies rates
+ *
+ * @param stdClass $TRate Object containing all currencies rates
* @return -1 if KO, 0 if nothing, 1 if OK
*/
public static function recalculRates(&$TRate)
{
global $conf;
-
+
if (!empty($conf->global->MULTICURRENCY_ALTERNATE_SOURCE))
{
$alternate_source = 'USD'.$conf->global->MULTICURRENCY_ALTERNATE_SOURCE;
@@ -607,38 +608,39 @@ class MultiCurrency extends CommonObject
{
$rate *= $coef;
}
-
+
return 1;
}
-
+
return -1; // Alternate souce not found
}
-
+
return 0; // Nothing to do
}
-
+
/**
* Sync rates from api
- *
+ *
* @param array $response array of reponse from api to sync dolibarr rates
+ * @return void
*/
public static function syncRates($response)
{
global $db,$conf;
-
- $ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $response = curl_exec($ch);
- curl_close($ch);
- $response = json_decode($response);
- if ($response->success)
- {
-
+ $ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $response = json_decode($response);
+
+ if ($response->success)
+ {
+
$TRate = $response->quotes;
$timestamp = $response->timestamp;
- if (self::recalculRates($TRate) >= 0)
+ if (self::recalculRates($TRate) >= 0)
{
foreach ($TRate as $currency_code => $rate)
{
@@ -648,11 +650,11 @@ class MultiCurrency extends CommonObject
{
$obj->updateRate($rate);
}
- else
+ else
{
self::addRateFromDolibarr($code, $rate);
}
- }
+ }
}
}
else
@@ -660,21 +662,21 @@ class MultiCurrency extends CommonObject
setEventMessages($langs->trans('multicurrency_syncronize_error', $response->error->info), null, 'errors');
}
}
-
+
/**
* Check in database if the current code already exists
- *
+ *
* @param string $code current code to search
* @return boolean True if exists, false if not exists
*/
- public static function checkCodeAlreadyExists($code)
- {
+ public static function checkCodeAlreadyExists($code)
+ {
global $db;
-
+
$currency = new MultiCurrency($db);
if ($currency->fetch('', $code) > 0) return true;
else return false;
- }
+ }
}
/**
@@ -710,7 +712,7 @@ class CurrencyRate extends CommonObjectLine
* @var int Id of entity
*/
public $entity;
-
+
/**
* Constructor
*
@@ -719,10 +721,10 @@ class CurrencyRate extends CommonObjectLine
public function __construct(DoliDB $db)
{
$this->db = &$db;
-
+
return 1;
}
-
+
/**
* Create object into database
*
@@ -734,14 +736,14 @@ class CurrencyRate extends CommonObjectLine
public function create($fk_multicurrency, $trigger = true)
{
global $conf, $user;
-
+
dol_syslog('CurrencyRate::create', LOG_DEBUG);
$error = 0;
$this->rate = price2num($this->rate);
if (empty($this->entity) || $this->entity <= 0) $this->entity = $conf->entity;
$now=date('Y-m-d H:i:s');
-
+
// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
$sql .= ' rate,';
@@ -769,7 +771,7 @@ class CurrencyRate extends CommonObjectLine
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
$this->fk_multicurrency = $fk_multicurrency;
$this->date_sync = $now;
-
+
if ($trigger) {
$result=$this->call_trigger('CURRENCYRATE_CREATE', $user);
if ($result < 0) $error++;
@@ -829,7 +831,7 @@ class CurrencyRate extends CommonObjectLine
return - 1;
}
}
-
+
/**
* Update object into database
*
@@ -840,13 +842,13 @@ class CurrencyRate extends CommonObjectLine
public function update($trigger = true)
{
global $user;
-
+
$error = 0;
dol_syslog('CurrencyRate::update', LOG_DEBUG);
-
+
$this->rate = price2num($this->rate);
-
+
// Update request
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
$sql .= ' rate='.$this->rate;
@@ -878,7 +880,7 @@ class CurrencyRate extends CommonObjectLine
return 1;
}
}
-
+
/**
* Delete object in database
*
@@ -889,7 +891,7 @@ class CurrencyRate extends CommonObjectLine
public function delete($trigger = true)
{
global $user;
-
+
dol_syslog('CurrencyRate::delete', LOG_DEBUG);
$error = 0;
@@ -925,5 +927,5 @@ class CurrencyRate extends CommonObjectLine
return 1;
}
}
-
+
}
diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php
index af75bf4783b..0df6400bcc9 100644
--- a/htdocs/opensurvey/card.php
+++ b/htdocs/opensurvey/card.php
@@ -430,6 +430,6 @@ if ($object->allow_comments) {
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php
index 3b800b748ff..4c60a807445 100644
--- a/htdocs/opensurvey/index.php
+++ b/htdocs/opensurvey/index.php
@@ -78,8 +78,6 @@ print '';
print '';
-
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php
index de8feaad8da..ecb26047e52 100644
--- a/htdocs/opensurvey/list.php
+++ b/htdocs/opensurvey/list.php
@@ -296,6 +296,6 @@ print ''."\n";
print '';
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php
index 9acf9d441e2..366842513c8 100644
--- a/htdocs/opensurvey/wizard/choix_autre.php
+++ b/htdocs/opensurvey/wizard/choix_autre.php
@@ -161,6 +161,6 @@ print ' '."\n";
print ' '."\n";
print ''."\n";
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php
index fb7312b891c..5aa478d9450 100644
--- a/htdocs/opensurvey/wizard/choix_date.php
+++ b/htdocs/opensurvey/wizard/choix_date.php
@@ -564,6 +564,6 @@ print ''."\n";
print ' '."\n";
print ''."\n";
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php
index 2e33d377ca2..d7c35fdd082 100644
--- a/htdocs/opensurvey/wizard/create_survey.php
+++ b/htdocs/opensurvey/wizard/create_survey.php
@@ -204,6 +204,6 @@ else
print ' '."\n";
print ''."\n";
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/opensurvey/wizard/index.php b/htdocs/opensurvey/wizard/index.php
index 4d03b7d2d8f..f15284e2e83 100644
--- a/htdocs/opensurvey/wizard/index.php
+++ b/htdocs/opensurvey/wizard/index.php
@@ -57,6 +57,6 @@ print '
';
print '';
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php
index 4c68abab520..df1a5758478 100644
--- a/htdocs/paybox/admin/paybox.php
+++ b/htdocs/paybox/admin/paybox.php
@@ -250,5 +250,6 @@ print ' ';
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php
index 381151cac93..57acfe7390e 100644
--- a/htdocs/paypal/admin/paypal.php
+++ b/htdocs/paypal/admin/paypal.php
@@ -326,5 +326,6 @@ $token='';
include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php
index 96dd916290e..b2300c7125a 100644
--- a/htdocs/printing/admin/printing.php
+++ b/htdocs/printing/admin/printing.php
@@ -361,6 +361,6 @@ if ($mode == 'userconf' && $user->admin)
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/printing/index.php b/htdocs/printing/index.php
index 384d0834cc0..47dd65b9f0c 100644
--- a/htdocs/printing/index.php
+++ b/htdocs/printing/index.php
@@ -68,6 +68,6 @@ foreach ($result as $driver)
}
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php
index 348380e9b37..4f40c85e2a9 100644
--- a/htdocs/product/admin/dynamic_prices.php
+++ b/htdocs/product/admin/dynamic_prices.php
@@ -357,5 +357,6 @@ if ($action == 'create_updater' || $action == 'edit_updater') {
print '';
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php
index 0049daeaa7d..3c6bf5abe8a 100644
--- a/htdocs/product/admin/price_rules.php
+++ b/htdocs/product/admin/price_rules.php
@@ -200,6 +200,6 @@ print '
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index ea3539d193e..2cdb5c1ca52 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -744,7 +744,7 @@ print '';
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php
index 7da3e800468..82eafd230d7 100644
--- a/htdocs/product/admin/product_extrafields.php
+++ b/htdocs/product/admin/product_extrafields.php
@@ -126,6 +126,6 @@ if ($action == 'edit' && ! empty($attrname))
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php
index 23e87d23476..8e57daf7491 100644
--- a/htdocs/product/admin/product_lot_extrafields.php
+++ b/htdocs/product/admin/product_lot_extrafields.php
@@ -116,6 +116,6 @@ if ($action == 'edit' && ! empty($attrname))
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php
index ed4480aeaa2..a153e9f1ab6 100644
--- a/htdocs/product/admin/product_tools.php
+++ b/htdocs/product/admin/product_tools.php
@@ -342,6 +342,6 @@ else
print '';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php
index 9eee66664d9..2dfe8aa425f 100644
--- a/htdocs/product/agenda.php
+++ b/htdocs/product/agenda.php
@@ -203,7 +203,6 @@ if ($id > 0 || $ref)
}
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index adb127d67f8..2c11b8efd86 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2187,6 +2187,6 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
print '
';
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index bc5d609c48a..3724abbf5d8 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -4549,6 +4549,7 @@ class Product extends CommonObject
* Existing categories are left untouch.
*
* @param int[]|int $categories Category or categories IDs
+ * @return void
*/
public function setCategories($categories) {
// Handle single category
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index c3f568a958c..5f91a0e369e 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -657,7 +657,6 @@ if ($id > 0 || ! empty($ref))
}
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index 4f6ec9cf403..0b5b7fa6f16 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -345,6 +345,6 @@ else
print $langs->trans("ErrorUnknown");
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php
index 9187775f8e9..baa738c20c5 100644
--- a/htdocs/product/dynamic_price/editor.php
+++ b/htdocs/product/dynamic_price/editor.php
@@ -244,5 +244,6 @@ print '';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 807b2e5a826..62fb0b8c29f 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -889,7 +889,6 @@ else
print $langs->trans("ErrorUnknown");
}
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 89330618879..71cf2636661 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -397,8 +397,8 @@ if (! empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM))
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php
index 80b17a5e31d..d143aa4e3c8 100644
--- a/htdocs/product/inventory/card.php
+++ b/htdocs/product/inventory/card.php
@@ -409,7 +409,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
}
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 385187b316e..593711290d3 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -960,6 +960,6 @@ else
dol_print_error($db);
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/note.php b/htdocs/product/note.php
index c0e9d77ea83..8bf30c3d6e0 100644
--- a/htdocs/product/note.php
+++ b/htdocs/product/note.php
@@ -115,6 +115,7 @@ if ($id > 0 || ! empty($ref))
dol_fiche_end();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php
index d6aa23fe2c0..0d54808ecef 100644
--- a/htdocs/product/popuprop.php
+++ b/htdocs/product/popuprop.php
@@ -207,6 +207,6 @@ print "";
dol_fiche_end();
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index e68730acf64..6aa5386de50 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -2197,6 +2197,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
}
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 2e8dfcb36fa..5e72fafbc40 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -391,6 +391,6 @@ else
dol_print_error($db);
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index b4d14ef1231..e4ec3854fb5 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -421,6 +421,6 @@ else
dol_print_error($db);
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php
index 3982ea7b87e..52ffa0a58c8 100644
--- a/htdocs/product/stats/card.php
+++ b/htdocs/product/stats/card.php
@@ -433,6 +433,6 @@ if (! $id)
dol_fiche_end();
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php
index 77941d940df..f85fb375b5a 100644
--- a/htdocs/product/stats/commande.php
+++ b/htdocs/product/stats/commande.php
@@ -257,5 +257,6 @@ if ($id > 0 || ! empty($ref))
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php
index da5c8f24911..ed49d34fbc3 100644
--- a/htdocs/product/stats/commande_fournisseur.php
+++ b/htdocs/product/stats/commande_fournisseur.php
@@ -265,5 +265,6 @@ if ($id > 0 || ! empty($ref)) {
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php
index c01cbd40530..55ae3a29939 100644
--- a/htdocs/product/stats/contrat.php
+++ b/htdocs/product/stats/contrat.php
@@ -236,6 +236,6 @@ else
dol_print_error();
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index d0c75ac90b4..fa4e468a5f9 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -278,5 +278,6 @@ if ($id > 0 || ! empty($ref))
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php
index 6bd722220ba..b3f8d1e41c0 100644
--- a/htdocs/product/stats/facture_fournisseur.php
+++ b/htdocs/product/stats/facture_fournisseur.php
@@ -263,5 +263,6 @@ if ($id > 0 || ! empty($ref))
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index 80256037dfe..a58bb01961e 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -261,5 +261,6 @@ if ($id > 0 || ! empty($ref))
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php
index cac015171cf..ca165a7cfd1 100644
--- a/htdocs/product/stats/supplier_proposal.php
+++ b/htdocs/product/stats/supplier_proposal.php
@@ -260,5 +260,6 @@ if ($id > 0 || ! empty($ref))
dol_print_error();
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php
index 41e70a6fbf9..7e13364d7ca 100644
--- a/htdocs/product/stock/card.php
+++ b/htdocs/product/stock/card.php
@@ -707,7 +707,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
}
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php
index 400c6183ca4..d815e56a00b 100644
--- a/htdocs/product/stock/fiche-valo.php
+++ b/htdocs/product/stock/fiche-valo.php
@@ -140,5 +140,6 @@ if ($_GET["id"])
print "";
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php
index fd2c1d48168..e658b794d4b 100644
--- a/htdocs/product/stock/index.php
+++ b/htdocs/product/stock/index.php
@@ -185,6 +185,6 @@ if ($resql)
//print '';
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php
index 4653a56495d..065dd448a8d 100644
--- a/htdocs/product/stock/info.php
+++ b/htdocs/product/stock/info.php
@@ -73,6 +73,6 @@ dol_print_object_info($object);
print '';
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index aba8655fae1..ca6cad1d664 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -271,7 +271,6 @@ else
dol_print_error($db);
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index 51692a3e9a1..c585b7a7e89 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -462,7 +462,6 @@ print ' ';
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php
index 7e15a4f86ac..c1631b3ff18 100644
--- a/htdocs/product/stock/mouvement.php
+++ b/htdocs/product/stock/mouvement.php
@@ -1173,7 +1173,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id>0)
}
*/
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index d2da5abd3e0..9d4ac0fb122 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -994,6 +994,6 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
}
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php
index 4c614155042..334ab91ebc4 100644
--- a/htdocs/product/stock/productlot_card.php
+++ b/htdocs/product/stock/productlot_card.php
@@ -416,7 +416,6 @@ if (empty($action))
}
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index b0eaccc08fa..8f5c13ceec7 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -551,7 +551,6 @@ else
dol_print_error($db);
}
-
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php
index ab8176ab186..ce1dd5126a9 100644
--- a/htdocs/product/stock/replenishorders.php
+++ b/htdocs/product/stock/replenishorders.php
@@ -336,5 +336,6 @@ else
dol_print_error($db);
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php
index be8ee2d500e..4e3a245060c 100644
--- a/htdocs/product/stock/valo.php
+++ b/htdocs/product/stock/valo.php
@@ -157,7 +157,6 @@ else
dol_print_error($db);
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index c96e1c0f025..4c344786553 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -354,5 +354,6 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print ' ';
}
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php
index 53818220081..2ed1bb1498f 100644
--- a/htdocs/projet/activity/index.php
+++ b/htdocs/projet/activity/index.php
@@ -576,7 +576,6 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S
print '
';
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index 0943d8dd428..f4caef2b5ad 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -710,6 +710,6 @@ if ($conf->use_javascript_ajax)
print '';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index b22ed6ee71a..200851b6307 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -749,7 +749,6 @@ if ($conf->use_javascript_ajax)
print '';
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php
index 80a13582d4d..f82a71514c4 100644
--- a/htdocs/projet/admin/project.php
+++ b/htdocs/projet/admin/project.php
@@ -910,5 +910,6 @@ print '';
print '';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php
index d247408079c..8f39a20f762 100644
--- a/htdocs/projet/admin/project_extrafields.php
+++ b/htdocs/projet/admin/project_extrafields.php
@@ -113,6 +113,6 @@ if ($action == 'edit' && ! empty($attrname))
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php
index 32e4af98f89..90729840035 100644
--- a/htdocs/projet/admin/project_task_extrafields.php
+++ b/htdocs/projet/admin/project_task_extrafields.php
@@ -112,6 +112,6 @@ if ($action == 'edit' && ! empty($attrname))
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 56c04614a55..2a5793a3c0e 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -1288,6 +1288,6 @@ else
print $langs->trans("RecordNotFound");
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 68d7080521a..9a943dfb3e2 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1911,6 +1911,7 @@ class Project extends CommonObject
* Existing categories are left untouch.
*
* @param int[]|int $categories Category or categories IDs
+ * @return void
*/
public function setCategories($categories)
{
diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php
index f152d6b4608..7f547feffb3 100644
--- a/htdocs/projet/comment.php
+++ b/htdocs/projet/comment.php
@@ -183,6 +183,6 @@ print ' ';
// Include comment tpl view
include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php';
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php
index 2f4c265f577..f7edf686eb2 100644
--- a/htdocs/projet/contact.php
+++ b/htdocs/projet/contact.php
@@ -266,6 +266,6 @@ if ($id > 0 || ! empty($ref))
}
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php
index 8854f928b43..3af813ba698 100644
--- a/htdocs/projet/document.php
+++ b/htdocs/projet/document.php
@@ -158,6 +158,6 @@ else
dol_print_error('','NoRecordFound');
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 79b2be5b009..28cc833eeb2 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -1181,10 +1181,8 @@ if ($conf->use_javascript_ajax)
print $comboenhancement;
}
-
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index da418680376..a1ac7c32aaa 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -364,7 +364,6 @@ else
print ''.$langs->trans("NoTasks").'
';
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php
index 906cb3783f1..50143057205 100644
--- a/htdocs/projet/index.php
+++ b/htdocs/projet/index.php
@@ -318,7 +318,6 @@ if (! empty($conf->global->PROJECT_SHOW_PROJECT_LIST_ON_PROJECT_AREA))
print '';
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php
index 64bc17aa749..31d633e70d1 100644
--- a/htdocs/projet/info.php
+++ b/htdocs/projet/info.php
@@ -191,6 +191,6 @@ if (!empty($object->id))
show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder);
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 779091d069f..9ea8e133102 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -919,7 +919,6 @@ print "\n";
print '';
print "\n";
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php
index 8a16d3d5e42..96dce3da63f 100644
--- a/htdocs/projet/note.php
+++ b/htdocs/projet/note.php
@@ -118,6 +118,6 @@ if ($id > 0 || ! empty($ref))
dol_fiche_end();
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php
index 38e9bc327bc..46c6248ebd3 100644
--- a/htdocs/projet/stats/index.php
+++ b/htdocs/projet/stats/index.php
@@ -373,6 +373,6 @@ print $stringtoshow;
print '';
print '
';
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index bf2ddf33890..17d245f94bf 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -724,6 +724,6 @@ else if ($id > 0 || ! empty($ref))
}
}
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php
index 6ed9af89385..f27ff3393f5 100644
--- a/htdocs/projet/tasks/contact.php
+++ b/htdocs/projet/tasks/contact.php
@@ -531,7 +531,6 @@ if (is_object($hookmanager))
$reshook=$hookmanager->executeHooks('formContactTpl',$parameters,$object,$action);
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 74cbba539b3..4e8e1319aa3 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -292,7 +292,6 @@ else
exit;
}
-
+// End of page
llxFooter();
-
$db->close();
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 7a97de16f52..2366ccc738b 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -841,5 +841,6 @@ print '';
print '';
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php
index 2fd47827d6a..ebd4210ff6e 100644
--- a/htdocs/projet/tasks/note.php
+++ b/htdocs/projet/tasks/note.php
@@ -247,6 +247,6 @@ if ($object->id > 0)
dol_fiche_end();
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php
index fa9ebcf3b52..68b52339ebb 100644
--- a/htdocs/projet/tasks/stats/index.php
+++ b/htdocs/projet/tasks/stats/index.php
@@ -212,6 +212,6 @@ print $stringtoshow;
print '';
print '
';
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index ace9ab21a29..7b4a9d25537 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -626,6 +626,6 @@ if ($id > 0 || ! empty($ref))
}
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index f3271535bcd..4c2e60f05b2 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -1153,6 +1153,6 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
}
}
-
+// End of page
llxFooter();
$db->close();
diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php
index d088476ccc2..a269fea0b80 100644
--- a/htdocs/public/stripe/ipn.php
+++ b/htdocs/public/stripe/ipn.php
@@ -1,5 +1,5 @@
*
* 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
@@ -24,6 +24,7 @@ if (is_numeric($entity)) define("DOLENTITY", $entity);
require '../../main.inc.php';
if (empty($conf->stripe->enabled)) accessforbidden('',0,0,1);
+require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
@@ -121,7 +122,7 @@ $stripe=new Stripe($db);
if ($event->type == 'payout.created') {
$error=0;
- $result=dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);
+ $result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);
if ($result > 0)
{
@@ -141,7 +142,7 @@ if ($event->type == 'payout.created') {
elseif ($event->type == 'payout.paid') {
global $conf;
$error=0;
- $result=dolibarr_set_const($db, $service."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
+ $result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
if ($result)
{
$langs->load("errors");
diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php
index 0451c1d4782..141efcf7a47 100644
--- a/htdocs/stripe/class/actions_stripe.class.php
+++ b/htdocs/stripe/class/actions_stripe.class.php
@@ -63,6 +63,7 @@ class ActionsStripeconnect
* @param array $parameters Parameters
* @param Object $object Object
* @param string $action Action
+ * @return bool
*/
function formObjectOptions($parameters, &$object, &$action)
{
diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php
index 75d2fc5c68d..1c94d3a1373 100644
--- a/htdocs/ticket/class/actions_ticket.class.php
+++ b/htdocs/ticket/class/actions_ticket.class.php
@@ -579,6 +579,7 @@ class ActionsTicket
*
* @param User $user User for action
* @param string $action Action string
+ * @return int
*/
private function newMessage($user, &$action)
{
@@ -792,6 +793,7 @@ class ActionsTicket
*
* @param User $user User for action
* @param string $action Action string
+ * @return void
*/
private function newMessagePublic($user, &$action)
{
@@ -962,6 +964,7 @@ class ActionsTicket
* Get ticket info
*
* @param int $id Object id
+ * @return void
*/
public function getInfo($id)
{
@@ -976,6 +979,7 @@ class ActionsTicket
* Get action title
*
* @param string $action Type of action
+ * @return string
*/
public function getTitle($action = '')
{
@@ -998,6 +1002,7 @@ class ActionsTicket
* View html list of logs
*
* @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTicketLogs($show_user = true)
{
@@ -1058,6 +1063,7 @@ class ActionsTicket
*
* @param boolean $show_user Show user who make action
* @param Ticket $object Object
+ * @return void
*/
public function viewTimelineTicketLogs($show_user = true, $object = true)
{
@@ -1165,6 +1171,7 @@ class ActionsTicket
*
* @param boolean $show_private Show private messages
* @param boolean $show_user Show user who make action
+ * @return void
*/
public function viewTicketMessages($show_private, $show_user = true)
{
@@ -1237,6 +1244,7 @@ class ActionsTicket
* @param boolean $show_private Show private messages
* @param boolean $show_user Show user who make action
* @param Ticket $object Object ticket
+ * @return void
*/
public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object)
{
@@ -1309,6 +1317,7 @@ class ActionsTicket
* @param string $message Email message
* @param int $send_internal_cc Receive a copy on internal email ($conf->global->TICKET_NOTIFICATION_EMAIL_FROM)
* @param array $array_receiver Array of receiver. exemple array('name' => 'John Doe', 'email' => 'john@doe.com', etc...)
+ * @return void
*/
public function sendTicketMessageByEmail($subject, $message, $send_internal_cc = 0, $array_receiver = array())
{
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index f5e7954398a..7075e8d8aec 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -910,6 +910,7 @@ class User extends CommonObject
* Existing categories are left untouch.
*
* @param int[]|int $categories Category or categories IDs
+ * @return void
*/
public function setCategories($categories)
{
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 0fd4005c19d..af6b1312cbc 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -68,6 +68,8 @@ if (GETPOST('setashome','alpha')) { $action='setashome'; }
if (GETPOST('editmeta','alpha')) { $action='editmeta'; }
if (GETPOST('editsource','alpha')) { $action='editsource'; }
if (GETPOST('editcontent','alpha')) { $action='editcontent'; }
+if (GETPOST('exportsite','alpha')) { $action='exportsite'; }
+if (GETPOST('importsite','alpha')) { $action='importsite'; }
if (GETPOST('createfromclone','alpha')) { $action='createfromclone'; }
if (GETPOST('createpagefromclone','alpha')) { $action='createpagefromclone'; }
if (empty($action) && $file_manager) $action='file_manager';
@@ -1279,7 +1281,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
}
// Export site
-if (GETPOST('exportsite','alpha'))
+if ($action == 'exportsite')
{
$fileofzip = $object->exportWebSite();
@@ -1296,6 +1298,35 @@ if (GETPOST('exportsite','alpha'))
}
}
+// Import site
+if ($action == 'importsiteconfirm')
+{
+ $fileofzip = GETPOST('userfile');
+ if (empty($fileofzip))
+ {
+ setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
+ $action = 'importsite';
+ }
+ else
+ {
+ // TODO
+
+
+ $result = $object->importWebSite($fileofzip);
+ if ($result < 0)
+ {
+ setEventMessages($object->error, $object->errors, 'errors');
+ $action = 'importsite';
+ }
+ else
+ {
+ header("Location: aaaaa");
+ exit();
+ }
+ }
+}
+
+
/*
@@ -1370,6 +1401,10 @@ if ($action == 'edit')
{
print ' ';
}
+if ($action == 'importsite')
+{
+ print ' ';
+}
if ($action == 'file_manager')
{
print ' ';
@@ -1431,6 +1466,11 @@ if (count($object->records) > 0)
if (! empty($object->virtualhost)) $virtualurl=$object->virtualhost;
}
+
+ $array=$objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl');
+ if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
+ $atleastonepage=(is_array($array) && count($array) > 0);
+
if ($websitekey && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone'))
{
$disabled='';
@@ -1442,6 +1482,14 @@ if (count($object->records) > 0)
//print ' ';
print ' ';
print ' ';
+ if (! $atleastonepage)
+ {
+ print ' ';
+ }
+ else
+ {
+ print ' ';
+ }
print ' ';
@@ -1467,7 +1515,8 @@ if (count($object->records) > 0)
print '';
- // Button for website
+
+ // Toolbar for website
print '';
if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
@@ -1527,16 +1576,12 @@ if (count($object->records) > 0)
print '
';
- // ***** Part for pages
+ // Toolbar for pages
- if ($websitekey && ! in_array($action, array('editcss','editmenu')))
+ if ($websitekey && ! in_array($action, array('editcss','editmenu','importsite')))
{
print ''; // Close current websitebar to open a new one
- $array=$objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl');
- if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors);
- $atleastonepage=(is_array($array) && count($array) > 0);
-
print '