diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 2abc3b10841..ba43b6d47a6 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 76d40e57c17..60e0b2c3b48 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -33,8 +33,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -$langs->load("admin"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index f47f92faa4c..0ec1968ab34 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -28,8 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index e78c4ef29e5..3a5226d00f4 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -31,8 +31,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 75a3c4ee0d7..91df8e59ea5 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members")); $action=GETPOST('action', 'alpha'); diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 8fb1851e021..f22070107ca 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); $id = GETPOST('id','int')?GETPOST('id','int'):GETPOST('rowid','int'); diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 46b2b827d73..7e46b7864f8 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -33,9 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("members"); -$langs->load("companies"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","other")); + $id=GETPOST('id','int'); $action=GETPOST('action','alpha'); diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 030700bb0f6..931e9323904 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("members"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); // Security check $result=restrictedArea($user,'adherent'); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index f7389e9fbbc..5b830623a4b 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -29,10 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("ldap"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","ldap","admin")); $rowid = GETPOST('id','int'); $action = GETPOST('action','aZ09'); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index ae278b5dbb5..8cd12cd6ca2 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -$langs->load("companies"); -$langs->load("members"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills")); $action=GETPOST('action','alpha'); $id=GETPOST('id','int'); diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index 7ae29a7eeb9..defbde2dce2 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -44,8 +44,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 9de537ed39a..2175569b7ce 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -45,8 +45,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 902c2d35359..e3bc7287864 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -46,8 +46,8 @@ $year = strftime("%Y", time()); $startyear=$year-2; $endyear=$year; -$langs->load("members"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members")); /* diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 9f5c15ad951..94950f02b05 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -30,10 +30,8 @@ if (! empty($conf->banque->enabled)) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; } -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); $adh = new Adherent($db); $object = new Subscription($db); diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 649a1e22996..eb8f8e4eab3 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -28,10 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; -$langs->load("companies"); -$langs->load("bills"); -$langs->load("members"); -$langs->load("users"); +// Load translation files required by the page +$langs->loadLangs(array("companies","members","bills","users")); if (!$user->rights->adherent->lire) accessforbidden(); diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 5d60beb2a4d..c18074130aa 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; -$langs->load("members"); -$langs->load("admin"); -$langs->load("ldap"); +// Load translation files required by the page +$langs->loadLangs(array("admin","members","ldap")); $id = GETPOST('rowid', 'int'); $action = GETPOST('action','alpha'); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 7bc968457f9..f7242ee43bc 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -50,6 +50,7 @@ $error=0; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('admincompany','globaladmin')); + /* * Actions */ @@ -397,7 +398,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''.img_delete($langs->trans("Delete")).''; if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { print '   '; - print ''; + print ''; } } else { print ''; @@ -791,7 +792,7 @@ else } else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { - print ''; + print ''; } else { diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 4cb5a907927..1f2fdd26e5f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -413,7 +413,7 @@ if ($action == 'edit') // Edit print ''.img_delete($langs->trans("Delete")).''; if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) { print '   '; - print ''; + print ''; } } else { print ''; @@ -561,7 +561,7 @@ else // Show print $conf->global->MAIN_LOGIN_BACKGROUND; if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) { - print ''; + print ''; } else { diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 2864fe79df0..0db2d3cd6d1 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -28,9 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; - -$langs->load("admin"); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array("other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 2e6d8a91008..9d0178c956d 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -27,8 +27,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; -$langs->load("other"); -$langs->load("admin"); +// Load translation files required by the page +$langs->loadLangs(array("other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 0446c59af1d..7b1a73f2f09 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -24,9 +24,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->load("users"); -$langs->load("admin"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("user","other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index e9ea61ac944..ba61203191a 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -28,10 +28,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -$langs->load("admin"); -$langs->load("help"); -$langs->load("members"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("help","members","other","admin")); $action=GETPOST('action','alpha'); @@ -196,7 +194,7 @@ if ($showpromotemessage) { print '
'; print '
'; - + if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0)) { print $langs->trans("TitleExampleForMajorRelease").':
'; diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index c5aeff70b88..9df49489e34 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -26,9 +26,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("admin"); -$langs->load("install"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("install","other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 9d4c4fc3cec..d510cc07773 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -24,9 +24,8 @@ require '../../main.inc.php'; -$langs->load("admin"); -$langs->load("user"); -$langs->load("install"); +// Load translation files required by the page +$langs->loadLangs(array("install","user","admin")); if (!$user->admin) diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 4dd4ef9dc9b..9c2ee62565d 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -$langs->load("admin"); -$langs->load("install"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("install","other","admin")); $action=GETPOST('action','alpha'); diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 65e19fb9d83..c70ad1b7fba 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -25,9 +25,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("admin"); -$langs->load("install"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("install","other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 85ac2aea006..d69723f1299 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -26,9 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -$langs->load("admin"); -$langs->load("install"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array("install","other","admin")); if (! $user->admin) accessforbidden(); diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 3f82a6aca98..f118ea51f0e 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -109,16 +109,16 @@ class Asset extends CommonObject public $entity; /** - * @var string Asset label - */ - public $label; + * @var string Asset label + */ + public $label; public $amount; /** * @var int Thirdparty ID */ - public $fk_soc; + public $fk_soc; /** * @var string description diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 7f3b2c58300..b7846cd0864 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -29,9 +29,9 @@ class Bookmark extends CommonObject { /** - * @var string ID to identify managed object - */ - public $element='bookmark'; + * @var string ID to identify managed object + */ + public $element='bookmark'; /** * @var string Name of table without prefix where object is stored @@ -41,9 +41,9 @@ class Bookmark extends CommonObject public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = 'bookmark'; + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bookmark'; /** * @var DoliDB Database handler. @@ -56,9 +56,9 @@ class Bookmark extends CommonObject public $id; /** - * @var int User ID - */ - public $fk_user; + * @var int User ID + */ + public $fk_user; public $datec; public $url; diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 24b94562915..de0324a97fe 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -63,7 +63,7 @@ top_htmlhead('','',0,0,'',$arrayofcss); logo_small)) { - print 'Logo company'; + print 'Logo company'; } else { diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 3937c9dbde3..0d4a484b66e 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -47,7 +47,7 @@ $object->fetch($facid);

name; ?>
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index f2983a190c9..1bf4680e30d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -47,9 +47,9 @@ class ActionComm extends CommonObject public $table_rowid = 'id'; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto='action'; + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='action'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -67,7 +67,7 @@ class ActionComm extends CommonObject * Id of the event * @var int */ - public $id; + public $id; /** * Id of the event. Use $id as possible diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 4f0a824007a..a483bbfe07e 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -56,9 +56,9 @@ class CActionComm public $color; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto; + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto; public $type_actions=array(); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 6dc3bdc639d..6f525837648 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -64,6 +64,9 @@ class Commande extends CommonOrder */ public $fk_element = 'fk_commande'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'order'; /** diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 7681434bdfe..e66d6f73731 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -46,6 +46,9 @@ class Account extends CommonObject */ public $table_element = 'bank_account'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'account'; /** @@ -1664,6 +1667,9 @@ class AccountLine extends CommonObject */ public $table_element='bank'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'generic'; /** diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 10bcd9a07c4..cc291c6be64 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -30,7 +30,10 @@ class BankCateg // extends CommonObject { //public $element='bank_categ'; //!< Id that identify managed objects //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored - public $picto='generic'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='generic'; /** * @var int ID diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index 3a6fe74ab37..d5fe542ce42 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -40,6 +40,9 @@ class PaymentVarious extends CommonObject */ public $table_element='payment_various'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'bill'; /** @@ -82,7 +85,6 @@ class PaymentVarious extends CommonObject $this->db = $db; $this->element = 'payment_various'; $this->table_element = 'payment_various'; - return 1; } /** @@ -384,13 +386,14 @@ class PaymentVarious extends CommonObject // Insert payment into llx_bank // Add link 'payment_various' in bank_url between payment and bank transaction - if ($this->sens == '0') $sign='-'; + $sign=1; + if ($this->sens == '0') $sign=-1; $bank_line_id = $acc->addline( $this->datep, $this->type_payment, $this->label, - $sign.abs($this->amount), + $sign * abs($this->amount), $this->num_payment, '', $user @@ -540,11 +543,13 @@ class PaymentVarious extends CommonObject /** * Send name clicable (with possibly the picto) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option link option - * @return string Chaine with URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param string $option link option + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip 1=Disable tooltip + * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0, $option='', $save_lastsearch_value=-1, $notooltip=0) { global $langs; @@ -555,8 +560,8 @@ class PaymentVarious extends CommonObject $linkend=''; $result .= $linkstart; - if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); - if ($withpicto != 2) $result.= ($maxlen?dol_trunc($this->ref,$maxlen):$this->ref); + if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : ''); $result .= $linkend; return $result; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 012dac4a274..95fa81c9e7e 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -59,6 +59,9 @@ class FactureRec extends CommonInvoice */ public $fk_element='fk_facture'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='bill'; public $entity; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 498118c30fc..984e206ea66 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -73,6 +73,9 @@ class Facture extends CommonInvoice */ public $fk_element = 'fk_facture'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='bill'; /** diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 2b53770183d..45efdf69c83 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -39,22 +39,25 @@ class Localtax extends CommonObject */ public $table_element='localtax'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; - var $ltt; - var $tms; - var $datep; - var $datev; - var $amount; + public $ltt; + public $tms; + public $datep; + public $datev; + public $amount; /** * @var string local tax */ public $label; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * Constructor diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index b28ca9dcb18..719c8cdcac8 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -43,12 +43,15 @@ class RemiseCheque extends CommonObject */ public $table_element='bordereau_cheque'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; - var $num; - var $intitule; + public $num; + public $intitule; //! Numero d'erreur Plage 1024-1279 - var $errno; + public $errno; public $amount; public $date_bordereau; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 1fd2ad8bbef..4e536e7ba6b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -40,40 +40,46 @@ class Paiement extends CommonObject * @var string ID to identify managed object */ public $element='payment'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='paiement'; - - public $picto = 'payment'; - var $facid; - var $datepaye; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; + + public $facid; + public $datepaye; + /** * @deprecated * @see amount, amounts */ - var $total; + public $total; + /** * @deprecated * @see amount, amounts */ - var $montant; - var $amount; // Total amount of payment - var $amounts=array(); // Array of amounts - var $multicurrency_amounts=array(); // Array of amounts - var $author; - var $paiementid; // Type de paiement. Stocke dans fk_paiement + public $montant; + + public $amount; // Total amount of payment + public $amounts=array(); // Array of amounts + public $multicurrency_amounts=array(); // Array of amounts + public $author; + public $paiementid; // Type de paiement. Stocke dans fk_paiement // de llx_paiement qui est lie aux types de //paiement de llx_c_paiement - var $num_paiement; // Numero du CHQ, VIR, etc... - var $num_payment; // Numero du CHQ, VIR, etc... - var $bank_account; // Id compte bancaire du paiement - var $bank_line; // Id de la ligne d'ecriture bancaire + public $num_paiement; // Numero du CHQ, VIR, etc... + public $num_payment; // Numero du CHQ, VIR, etc... + public $bank_account; // Id compte bancaire du paiement + public $bank_line; // Id de la ligne d'ecriture bancaire // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) // fk_paiement dans llx_paiement_facture est le rowid du paiement - var $fk_paiement; // Type of paiment + public $fk_paiement; // Type of paiment /** diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 7eba6afec29..acb9dcf2444 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -43,33 +43,36 @@ class BonPrelevement extends CommonObject * @var string ID to identify managed object */ public $element='widthdraw'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='prelevement_bons'; - + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; - var $date_echeance; - var $raison_sociale; - var $reference_remise; - var $emetteur_code_guichet; - var $emetteur_numero_compte; - var $emetteur_code_banque; - var $emetteur_number_key; + public $date_echeance; + public $raison_sociale; + public $reference_remise; + public $emetteur_code_guichet; + public $emetteur_numero_compte; + public $emetteur_code_banque; + public $emetteur_number_key; - var $emetteur_iban; - var $emetteur_bic; - var $emetteur_ics; + public $emetteur_iban; + public $emetteur_bic; + public $emetteur_ics; - var $total; - var $_fetched; - var $statut; // 0-Wait, 1-Trans, 2-Done - var $labelstatut=array(); + public $total; + public $fetched; + public $statut; // 0-Wait, 1-Trans, 2-Done + public $labelstatut=array(); - var $invoice_in_error=array(); - var $thirdparty_in_error=array(); + public $invoice_in_error=array(); + public $thirdparty_in_error=array(); /** @@ -106,7 +109,7 @@ class BonPrelevement extends CommonObject $this->methodes_trans[0] = "Internet"; - $this->_fetched = 0; + $this->fetched = 0; } /** @@ -312,7 +315,7 @@ class BonPrelevement extends CommonObject $this->statut = $obj->statut; - $this->_fetched = 1; + $this->fetched = 1; return 1; } @@ -420,7 +423,7 @@ class BonPrelevement extends CommonObject $error = 0; - if ($this->_fetched == 1) + if ($this->fetched == 1) { if ($date >= $this->date_trans) { diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 48877412d76..7c68b673ac1 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -41,6 +41,9 @@ class PaymentSalary extends CommonObject */ public $table_element='payment_salary'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; public $tms; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index bad851450a7..1fe5d448d6e 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -36,33 +36,36 @@ class ChargeSociales extends CommonObject * @var string ID to identify managed object */ public $element='chargesociales'; - + public $table='chargesociales'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='chargesociales'; - - public $picto = 'bill'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bill'; /** * {@inheritdoc} */ protected $table_ref_field = 'ref'; - var $date_ech; - var $lib; - var $type; - var $type_libelle; - var $amount; - var $paye; - var $periode; - var $date_creation; - var $date_modification; - var $date_validation; - var $fk_account; - var $fk_project; + public $date_ech; + public $lib; + public $type; + public $type_libelle; + public $amount; + public $paye; + public $periode; + public $date_creation; + public $date_modification; + public $date_validation; + public $fk_account; + public $fk_project; /** diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 4a989554b69..d66fb0e56c2 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -41,17 +41,22 @@ class PaymentSocialContribution extends CommonObject */ public $table_element='paiementcharge'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'payment'; public $fk_charge; public $datec=''; public $tms=''; public $datep=''; + /** * @deprecated * @see amount */ public $total; + public $amount; // Total amount of payment public $amounts=array(); // Array of amounts public $fk_typepaiement; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 6b1211cd1fc..7517ecbdbe8 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -43,23 +43,26 @@ class Tva extends CommonObject */ public $table_element='tva'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto='payment'; - var $tms; - var $datep; - var $datev; - var $amount; - var $type_payment; - var $num_payment; + public $tms; + public $datep; + public $datev; + public $amount; + public $type_payment; + public $num_payment; /** * @var string label */ public $label; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * Constructor diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4cd6fe81820..ddb9acfe39f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -41,13 +41,17 @@ class Contact extends CommonObject * @var string ID to identify managed object */ public $element='contact'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='socpeople'; - + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ public $picto = 'contact'; @@ -726,7 +730,7 @@ class Contact extends CommonObject $this->date_creation = $this->db->jdate($obj->date_creation); $this->date_modification = $this->db->jdate($obj->date_modification); - + $this->fk_departement = $obj->fk_departement; // deprecated $this->state_id = $obj->fk_departement; $this->departement_code = $obj->state_code; // deprecated diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 053d51905df..c64402777e7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -61,7 +61,10 @@ class Contrat extends CommonObject */ public $fk_element='fk_contrat'; - public $picto='contract'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto='contract'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 6a91384a2f2..8449d68fd7d 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -34,9 +34,9 @@ class DiscountAbsolute public $db; /** - * @var string Error code (or message) - */ - public $error; + * @var string Error code (or message) + */ + public $error; /** * @var string[] Array of error strings @@ -48,9 +48,9 @@ class DiscountAbsolute */ public $id; - /** - * @var int Thirdparty ID - */ + /** + * @var int Thirdparty ID + */ public $fk_soc; public $discount_type; // 0 => customer discount, 1 => supplier discount @@ -60,14 +60,14 @@ class DiscountAbsolute public $tva_tx; // Vat rate /** - * @var int User ID Id utilisateur qui accorde la remise - */ - public $fk_user; + * @var int User ID Id utilisateur qui accorde la remise + */ + public $fk_user; /** - * @var string description - */ - public $description; + * @var string description + */ + public $description; public $datec; // Date creation public $fk_facture_line; // Id invoice line when a discount is used into an invoice line (for absolute discounts) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d3b71badf4a..df4403fc778 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1485,10 +1485,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= { $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; - require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $formactions=new FormActions($db); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index feb41f5dffd..432c857850b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1268,7 +1268,7 @@ function dol_delete_dir($dir,$nophperrors=0) * @param int $nophperrors Disable all PHP output errors * @param int $onlysub Delete only files and subdir, not main directory * @param int $countdeleted Counter to count nb of elements found really deleted - * @return int Number of files and directory we try to remove. NB really removed is returned into $countdeleted. + * @return int Number of files and directory we try to remove. NB really removed is returned into var by reference $countdeleted. */ function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$countdeleted=0) { @@ -2161,10 +2161,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$dirins.'/'.$original_file; } // Wrapping for some images - elseif (($modulepart == 'mycompany' || $modulepart == 'companylogo') && !empty($conf->mycompany->dir_output)) + elseif ($modulepart == 'mycompany' && !empty($conf->mycompany->dir_output)) { $accessallowed=1; - $original_file=$conf->mycompany->dir_output.'/logos/'.$original_file; + $original_file=$conf->mycompany->dir_output.'/'.$original_file; } // Wrapping for users photos elseif ($modulepart == 'userphoto' && !empty($conf->user->dir_output)) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 6d10399088c..0e67b9a4c44 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -451,7 +451,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target // Contact on a thirdparty that is a different thirdparty than the thirdparty of object if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id) { - $targetcontact->fetch_thirparty(); + $targetcontact->fetch_thirdparty(); $companytouseforaddress = $targetcontact->thirdparty; } diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 73bb51d464a..235421a598e 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -662,6 +662,7 @@ function accessforbidden($message='',$printheader=1,$printfooter=1,$showonlymess { include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs=new Translate('',$conf); + $langs->setDefaultLang(); } $langs->load("errors"); diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index a23661f2f02..8c8bb3cbb10 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -228,11 +228,11 @@ if (! function_exists('dol_loginfunction')) if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_small); + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); } elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($mysoc->logo); + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width=128; } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png')) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 19e8cb3002f..e6ce5c1bddd 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -160,9 +160,9 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ $urllogo = DOL_URL_ROOT . '/theme/login_logo.png'; if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) { - $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('thumbs/' . $mysoc->logo_small); + $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('logos/thumbs/'.$mysoc->logo_small); } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) { - $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode($mysoc->logo); + $urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('logos/'.$mysoc->logo); $width = 128; } elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.png')) { $urllogo = DOL_URL_ROOT . '/theme/dolibarr_logo.png'; diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 913ed96356e..e59ac551eb3 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -150,9 +150,11 @@ function dolWebsiteOutput($content) $nbrep=0; if (! $symlinktomediaexists) { - $content=preg_replace('/(]*href=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1'.$urlwithroot.'/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); - $content=preg_replace('/(]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1'.$urlwithroot.'/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); - $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1'.$urlwithroot.'/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); + $content=preg_replace('/(]*src=")[^\"]*document\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\document.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); + + $content=preg_replace('/(]*href=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); + $content=preg_replace('/(]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); + $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1/viewimage.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep); } else { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index fee6ae6c595..9878d8a2ca8 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -273,7 +273,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_mini); + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); } else { @@ -517,7 +517,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $tmp=explode('?',$menu_array[$i]['url'],2); $url = $shorturl = $tmp[0]; $param = (isset($tmp[1])?$tmp[1]:''); // params in url of the menu link - + // Complete param to force leftmenu to '' to close open menu when we click on a link with no leftmenu defined. if ((! preg_match('/mainmenu/i',$param)) && (! preg_match('/leftmenu/i',$param)) && ! empty($menu_array[$i]['mainmenu'])) { diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 0186b90cc16..4c42d22280e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -469,7 +469,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; if (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('thumbs/'.$mysoc->logo_mini); + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); } else { diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 02fdedb7f2a..ba55a03a577 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -19,6 +19,7 @@ // Need global variable $title to be defined by caller (like dol_loginfunction) // Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...); + // Protection to avoid direct call of template if (empty($conf) || ! is_object($conf)) { @@ -27,6 +28,8 @@ if (empty($conf) || ! is_object($conf)) } +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + header('Cache-Control: Public, must-revalidate'); header("Content-type: text/html; charset=".$conf->file->character_set_client); @@ -55,10 +58,16 @@ if (! preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) $disablenof print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disablenofollow); + +$colorbackhmenu1='60,70,100'; // topmenu +if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1; +$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1); +$colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' + ?> -global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> +global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>> dol_use_jmobile)) { ?> -