diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 6a294b0256a..97307ffe23f 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -318,6 +318,19 @@ if (!$rowid && $action != 'create' && $action != 'edit') { print ""; $i++; } + + // If no record found + if ($num == 0) { + /*$colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + }*/ + $colspan = 8; + print ''.$langs->trans("NoRecordFound").''; + } + print ""; print ''; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 9073c9e238c..c51875b43a6 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1175,6 +1175,8 @@ if ($id) { $sql .= natural_search("r.code_region", $search_code); } elseif ($search_code != '' && $id == 7) { $sql .= natural_search("a.code", $search_code); + } elseif ($search_code != '' && $id == 10) { + $sql .= natural_search("t.code", $search_code); } elseif ($search_code != '' && $id != 9) { $sql .= natural_search("code", $search_code); } diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 758a93a765d..bbfa4b85c41 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -63,7 +63,7 @@ print '
'; print ''.$langs->trans("XDebug").': '; $test = !function_exists('xdebug_is_enabled'); if ($test) { - print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis"); + print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").''; } else { print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug")); print ' - '.$langs->trans("MoreInformation").' XDebug admin page'; diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index f246a9eb0b2..f6ce58a40c0 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -110,7 +110,7 @@ if (!empty($conf->syslog->enabled)) { print '

'; +print '>

'; print 'fetchResources(); } } + $this->db->free($resql); } else { $this->error = $this->db->lasterror(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ca7cd08a6fe..9cb9bca667b 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -206,6 +206,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) { print ''; print ''; + print ''; @@ -222,15 +223,19 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) { print '
'; print $tmpinvoice->getNomUrl(1, ''); print '
'; print ''; - print ''; + + print ''; print $thirdpartystatic->getNomUrl(1, 'customer', 44); print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { print ''.price($obj->total_ht).''; } print ''.price($obj->total_ttc).''; + print ''.dol_print_date($db->jdate($obj->tms), 'day').''; + print ''.$tmpinvoice->getLibStatut(3, $obj->am).''; + print ''; $total_ttc += $obj->total_ttc; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index faf2ab18d2c..b1110212293 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5324,7 +5324,7 @@ abstract class CommonObject $ecmfile->gen_or_uploaded = 'generated'; $ecmfile->description = ''; // indexed content $ecmfile->keywords = ''; // keyword content - $ecmfile->src_object_type = $this->table_element; + $ecmfile->src_object_type = $this->table_element.(empty($this->module) ? '' : '@'.$this->module); $ecmfile->src_object_id = $this->id; $result = $ecmfile->create($user); @@ -9405,6 +9405,11 @@ abstract class CommonObject */ public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true) { + // Handle single category + if (!is_array($categories)) { + $categories = array($categories); + } + dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG); require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; @@ -9414,11 +9419,6 @@ abstract class CommonObject return -1; } - // Handle single category - if (!is_array($categories)) { - $categories = array($categories); - } - // Get current categories $c = new Categorie($this->db); $existing = $c->containing($this->id, $type_categ, 'id'); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index f25a6e0933c..d558571d5b8 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1674,7 +1674,8 @@ class FormFile dol_include_once($hookmanager->resArray['classpath']); if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) { if (class_exists($hookmanager->resArray['classname'])) { - $object_instance = new ${$hookmanager->resArray['classname']}($this->db); + $tmpclassname = $hookmanager->resArray['classname']; + $object_instance = new $tmpclassname($this->db); } } } @@ -1813,9 +1814,11 @@ class FormFile print ''; // File + // Check if document source has external module part, if it the case use it for module part on document.php + preg_match('/^[^@]*@([^@]*)$/', $modulepart.'@expertisemedical', $modulesuffix); print ''; //print "XX".$file['name']; //$file['name'] must be utf8 - print 'getDocumentsLink($modulepart, $modulesubdir, $filedir, '^'.preg_quote($file['name'],'/').'$'); - print $this->showPreview($file, $modulepart, $file['relativename']); + print $this->showPreview($file, (empty($modulesuffix) ? $modulepart : $modulesuffix[1]), $file['relativename']); print "\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ef7f320f049..cffd1f752f6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3732,7 +3732,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountline'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', 'asset'=>'infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billr'=>'infobox-commande', 'billd'=>'infobox-commande', - 'conferenceorbooth'=>'infobox-project', + 'margin'=>'infobox-bank_account', 'conferenceorbooth'=>'infobox-project', 'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'collab'=>'infobox-action', 'conversation'=>'infobox-contrat', 'donation'=>'infobox-commande', 'dolly'=>'infobox-commande', 'dollyrevert'=>'flip infobox-order_supplier', 'ecm'=>'infobox-action', 'eventorganization'=>'infobox-project', diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php index c8e27f66189..b1eb321f7f5 100644 --- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php +++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php @@ -78,7 +78,11 @@ class InterfaceContactRoles extends DolibarrTriggers require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $contactdefault = new Contact($this->db); $contactdefault->socid = $socid; - $TContact = $contactdefault->getContactRoles($object->element); + + $TContact = array(); + if (method_exists($contactdefault, 'getContactRoles')) { // For backward compatibility + $TContact = $contactdefault->getContactRoles($object->element); + } if (is_array($TContact) && !empty($TContact)) { $TContactAlreadyLinked = array(); diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index fdcdb5f88e6..621443fb408 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -358,7 +358,7 @@ if (count($typeleaves) == 0) { //var_dump($users['rowid'].' - '.$val['rowid']); print ''; if ($canedit) { - print ''; + print ''; } else { print $nbtoshow; } diff --git a/htdocs/index.php b/htdocs/index.php index 880b5577bbb..8c1433c79cb 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -337,6 +337,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { ), 'supplier_proposal' => array( + 'lang' => 'supplier_proposal', 'groupName' => 'SupplierProposals', 'globalStatsKey' => 'askprice', 'stats' => @@ -486,6 +487,9 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } if (!empty($boards)) { + if (!empty($groupElement['lang'])) { + $langs->load($groupElement['lang']); + } $groupName = $langs->trans($groupElement['groupName']); $groupKeyLowerCase = strtolower($groupKey); $nbTotalForGroup = 0; diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql rename to htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 48887552e7e..0e8e39e6600 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -161,7 +161,7 @@ Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data) PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete log and temporary files +PurgeDeleteTemporaryFilesShort=Delete log and temporary files (no risk of losing data) PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s.
This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files. PurgeRunNow=Purge now PurgeNothingToDelete=No directory or files to delete. diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index c32b49ff1a1..19aff377c65 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -254,18 +254,6 @@ if ($action == 'edit') { } print ''; -// EMail -//If linked user, then emails are going to be sent to users' email -if (!$object->fk_user_creat) { - print ''.$langs->trans("EMail").''; - if ($action == 'edit') { - print ''; - } else { - print dol_print_email($object->mail_admin, 0, 0, 1, 0, 1, 1); - } - print ''; -} - // Receive an email with each vote print ''.$langs->trans('ToReceiveEMailForEachVote').''; if ($action == 'edit') { @@ -323,10 +311,14 @@ print ''; // Author print ''; print $langs->trans("Author").''; -if ($object->fk_user_creat) { +if ($object->fk_user_creat > 0) { print $userstatic->getLoginUrl(1); } else { - print dol_htmlentities($object->nom_admin); + if ($action == 'edit') { + print ''; + } else { + print dol_print_email($object->mail_admin, 0, 0, 1, 0, 1, 1); + } } print ''; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 30e662be7ea..6ed1f2073d2 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -170,7 +170,7 @@ if ($_SESSION["mailsonde"]) { $cochemail = "checked"; } -print ' '.$langs->trans("ToReceiveEMailForEachVote").'
'."\n"; +print '
'."\n"; if ($_SESSION['allow_comments']) { $allow_comments = 'checked'; @@ -178,7 +178,7 @@ if ($_SESSION['allow_comments']) { if (GETPOSTISSET('allow_comments')) { $allow_comments = GETPOST('allow_comments') ? 'checked' : ''; } -print ' '.$langs->trans('CanComment').'
'."\n"; +print '
'."\n"; if ($_SESSION['allow_spy']) { $allow_spy = 'checked'; @@ -186,7 +186,7 @@ if ($_SESSION['allow_spy']) { if (GETPOSTISSET('allow_spy')) { $allow_spy = GETPOST('allow_spy') ? 'checked' : ''; } -print ' '.$langs->trans('CanSeeOthersVote').'
'."\n"; +print '
'."\n"; if (GETPOST('choix_sondage')) { if (GETPOST('choix_sondage') == 'date') { diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 80378bd1b2a..b4c951a953f 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -640,7 +640,7 @@ if (empty($reshook)) { // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); if ($ret < 0) { $error++; } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 23c2976d43a..8c5ef8ca5ca 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2575,13 +2575,13 @@ class Societe extends CommonObject $label .= ' '.$this->getLibStatut(5); } - if (!empty($this->name)) { - $label .= '
'.$langs->trans('Name').': '.dol_escape_htmltag($this->name); - if (!empty($this->name_alias)) { - $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; - } + $label .= '
'.$langs->trans('Name').': '.dol_escape_htmltag($this->name); + if (!empty($this->name_alias)) { + $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; + } + if ($this->email) { + $label .= '
'.img_picto('', 'email', 'class="pictofixedwidth"').$this->email; } - $label .= '
'.img_picto('', 'email', 'class="pictofixedwidth"').$this->email; if (!empty($this->phone) || !empty($this->fax)) { $phonelist = array(); if ($this->phone) { diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index ec05dd89796..1fe95ff57d8 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -44,8 +44,8 @@ $langs->loadLangs(array("admin", "cashdesk", "commercial")); if (GETPOST('action', 'alpha') == 'set') { $db->begin(); - $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'restricthtml'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'restricthtml'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_RECEIPT_NAME", GETPOST('TAKEPOS_RECEIPT_NAME', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_SHOW_CUSTOMER", GETPOST('TAKEPOS_SHOW_CUSTOMER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity); diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index d978d2ac792..627a6c99565 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -119,7 +119,7 @@ if (!empty($conf->global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeTe if (!empty($conf->global->{$constFreeText})) { $newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray); } - print $newfreetext; + print nl2br($newfreetext); } ?>