From f2a4e4271227800fd0264bb22bf02afa1b612292 Mon Sep 17 00:00:00 2001 From: fhenry Date: Thu, 3 Jan 2013 14:44:04 +0100 Subject: [PATCH 1/3] CheckStyle I check everypalce where this function is call in Dolibarr, and to be consistant it's better to use new attribute names --- htdocs/user/class/user.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 175f01da4ea..59319e97c8c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -909,8 +909,8 @@ class User extends CommonObject $this->admin = 0; $this->nom = $contact->nom; // TODO deprecated $this->prenom = $contact->prenom; // TODO deprecated - $this->lastname = $contact->nom; - $this->firstname = $contact->prenom; + $this->lastname = $contact->lastname; + $this->firstname = $contact->firstname; $this->email = $contact->email; $this->office_phone = $contact->phone_pro; $this->office_fax = $contact->fax; From 3e05581c7007398bc42aab17ba5a4bc024b81932 Mon Sep 17 00:00:00 2001 From: fhenry Date: Thu, 3 Jan 2013 15:13:07 +0100 Subject: [PATCH 2/3] Same as last commit --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 59319e97c8c..441186179b3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -916,7 +916,7 @@ class User extends CommonObject $this->office_fax = $contact->fax; $this->user_mobile = $contact->phone_mobile; - if (empty($login)) $login=strtolower(substr($contact->prenom, 0, 4)) . strtolower(substr($contact->nom, 0, 4)); + if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4)); $this->login = $login; $this->db->begin(); From c730aff87b49dc9efabe94f3bc87cb47d5307058 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 3 Jan 2013 19:13:09 +0100 Subject: [PATCH 3/3] Fix: possibility to activate jquery plugins with a constant --- htdocs/main.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9b51916cee1..9057ae085bd 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -889,7 +889,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs { print ''."\n"; } - if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES)) // jQuery datatables + if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables { //print ''."\n"; print ''."\n"; @@ -898,7 +898,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs //print ''."\n"; print ''."\n"; } - if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)) // jQuery multiselect + if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) // jQuery multiselect { print ''."\n"; } @@ -1032,7 +1032,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery DataTables - if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES)) + if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) { print ''."\n"; print ''."\n"; @@ -1040,7 +1040,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery Multiselect - if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)) + if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) { print ''."\n"; }