diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index ec4c5fd4605..dd37e4987e5 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -84,6 +84,11 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_array_options=array(); } +if ($action == 'setMAIN_ENABLE_DEFAULT_VALUES') +{ + if (GETPOST('value')) dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 1, 'chaine', 0, '', $conf->entity); + else dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 0, 'chaine', 0, '', $conf->entity); +} if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('actionmodify')) { @@ -185,6 +190,23 @@ print load_fiche_titre($langs->trans("DefaultValues"),'','title_setup'); print $langs->trans("DefaultValuesDesc")."
\n"; print "
\n"; +print $langs->trans("EnableDefaultValues").' '; +if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) +{ + // Button off, click to enable + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; +} +else +{ + // Button on, click to disable + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); + print ''; +} +print "

\n"; + $param='&mode='.$mode; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 94bfa8e05bb..d318566ff61 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -330,6 +330,24 @@ if ($mode == 'desc') else $text.=$langs->trans("Disabled"); $text.='
'; + $tmp = $objMod->getLastActivationInfo(); + $authorid = $tmp['authorid']; + if ($authorid > 0) + { + $tmpuser = new User($db); + $tmpuser->fetch($authorid); + $text.=''.$langs->trans("LastActivationAuthor").': '; + $text.= $tmpuser->getNomUrl(1); + $text.='
'; + } + $ip = $tmp['ip']; + if ($ip) + { + $text.=''.$langs->trans("LastActivationIP").': '; + $text.= $ip; + $text.='
'; + } + $moduledesclong=$objMod->getDescLong(); if ($moduledesclong) $text.='

'.$moduledesclong.'
'; } diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index c47586b2b2a..433508be908 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -402,9 +402,9 @@ if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouM print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup'); // Start to show page -if ($mode=='common') print $langs->trans("ModulesDesc")."
\n"; -if ($mode=='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."
\n"; -if ($mode=='deploy') print $langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."
\n"; +if ($mode=='common') print ''.$langs->trans("ModulesDesc")."
\n"; +if ($mode=='marketplace') print ''.$langs->trans("ModulesMarketPlaceDesc")."
\n"; +if ($mode=='deploy') print ''.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."
\n"; $h = 0; @@ -640,7 +640,8 @@ if ($mode == 'common') { $disableSetup = 0; - print ''; + // Link enable/disabme + print ''; if (! empty($arrayofwarnings[$modName])) { print ''."\n"; @@ -662,12 +663,12 @@ if ($mode == 'common') } print ''."\n"; - // Config link + // Link config if (! empty($objMod->config_page_url) && !$disableSetup) { if (is_array($objMod->config_page_url)) { - print ''; + print ''; $i=0; foreach ($objMod->config_page_url as $page) { @@ -693,22 +694,23 @@ if ($mode == 'common') } else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) { - print ''.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').''; + print ''.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').''; } else { - print ''.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').''; + print ''.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').''; } } else { - print ''.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').''; + print ''.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').''; } } else // Module not yet activated { - print ''; + // Link enable/disable + print ''; if (! empty($objMod->always_enabled)) { // Should never happened @@ -754,7 +756,9 @@ if ($mode == 'common') print "\n"; } print "\n"; - print ''.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').''; + + // Link config + print ''.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').''; } print "\n"; diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index c8204f213c2..050e00e6278 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -149,6 +149,7 @@ if (! empty($conf->productbatch->enabled)) //if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) //{ print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule")); +print '
'; //} // Title rule for stock decrease @@ -433,7 +434,7 @@ if ($virtualdiffersfromphysical) print '
'; -if ($conf->global->MAIN_LEVEL_FEATURES >= 2) +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { $var=false; print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 42feea8f8ec..0c7574b7ec4 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -167,7 +167,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); $head=user_admin_prepare_head(); -dol_fiche_head($head,'card', $langs->trans("MenuUsersAndGroups"), 0, 'user'); +dol_fiche_head($head,'card', $langs->trans("MenuUsersAndGroups"), -1, 'user'); print '
'; print ''; @@ -205,7 +205,7 @@ print ''; print '
'; - +print '
'; $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index db5ef3cbf59..4642e6d3183 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -151,7 +151,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); $head=user_admin_prepare_head(); -dol_fiche_head($head,'usergroupcard', $langs->trans("MenuUsersAndGroups"), 0, 'user'); +dol_fiche_head($head,'usergroupcard', $langs->trans("MenuUsersAndGroups"), -1, 'user'); $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 26089c3d07c..c1882ce4bf9 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -62,14 +62,15 @@ function printBookmarksList($aDb, $aLangs) */ $ret.= ''."\n"; - $ret.= '
'; + $ret.= ''; $ret.= ''; + print ''; print '     '; - print ''; + print ''; print '
'; echo ''; @@ -373,8 +373,14 @@ if ($action == 'create') if ($action == 'view' || $action == 'edit' || empty($action)) { $object = new Inventory($db); - $object->fetch($id); - + $result = $object->fetch($id); + if ($result < 0) dol_print_error($db, $object->error, $object->errors); + + $warehouse = new Entrepot($db); + $warehouse->fetch($object->fk_warehouse); + + + if($action == 'changePMP') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ApplyNewPMP'), $langs->trans('ConfirmApplyNewPMP', $object->getTitle()), 'confirm_changePMP', array(),'no',1); @@ -396,18 +402,17 @@ if ($action == 'view' || $action == 'edit' || empty($action)) print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('RegulateStock'),$langs->trans('ConfirmRegulateStock',$object->getTitle()),'confirm_regulate',array(),'no',1); } - $warehouse = new Entrepot($db); - $warehouse->fetch($object->fk_warehouse); - print dol_get_fiche_head(inventoryPrepareHead($object, $langs->trans('inventoryOfWarehouse', $warehouse->libelle), empty($action) ? '': '&action='.$action)); $lines = array(); card_line($object, $lines, $action); - print ''.$langs->trans('inventoryOnDate')." ".$object->getDate('date_inventory').'

'; + print $langs->trans('Ref')." ".$object->ref.'
'; + print $langs->trans('Date')." ".$object->getDate('date_inventory').'

'; $objectTPL = array( - 'id'=> $object->id + 'id'=> $object->id + ,'ref'=> $object->ref ,'date_cre' => $object->getDate('date_cre', 'd/m/Y') ,'date_maj' => $object->getDate('date_maj', 'd/m/Y H:i') ,'fk_warehouse' => $object->fk_warehouse @@ -608,8 +613,8 @@ function _headerList($view) ?> -   Produit - trans('Warehouse'); ?> + trans('Product'); ?> + trans('Warehouse'); ?> barcode->enabled)) { ?> trans('Barcode'); ?> diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 93bbb38f6e7..8cb1f56eb9d 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -69,6 +69,7 @@ class Inventory extends CoreObject */ protected $fields=array( 'fk_warehouse'=>array('type'=>'integer','index'=>true) + ,'ref'=>array('type'=>'string','index'=>true) ,'entity'=>array('type'=>'integer','index'=>true) ,'status'=>array('type'=>'integer','index'=>true) ,'date_inventory'=>array('type'=>'date') @@ -113,7 +114,8 @@ class Inventory extends CoreObject if(!$loadChild) $this->withChild = false; $res = parent::fetch($id, $loadChild); - if($res > 0) + + if ($res > 0) { $this->sortDet(); $this->amount = 0; diff --git a/htdocs/product/inventory/tpl/inventory.tpl.php b/htdocs/product/inventory/tpl/inventory.tpl.php index 2a1c3bc3ee4..05de0f4c002 100644 --- a/htdocs/product/inventory/tpl/inventory.tpl.php +++ b/htdocs/product/inventory/tpl/inventory.tpl.php @@ -80,7 +80,7 @@ - +
@@ -92,7 +92,7 @@ - +
'; - if (! empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s=picto_from_langcode($key); - //print ''; + + print '
'; print '
'; print '
'; print ($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; - //print '
'; print ''; @@ -296,6 +294,7 @@ else if ($action != 'add') print ''; } print '
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
'; + print '
'; } } if (! $cnt_trans && $action != 'add') print '
'. $langs->trans('NoTranslation').'
'; diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index 37db7d02e4c..2a60252f7f8 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup'); $head = societe_admin_prepare_head(); -dol_fiche_head($head, 'attributes_contacts', $langs->trans("ThirdParties"), 0, 'company'); +dol_fiche_head($head, 'attributes_contacts', $langs->trans("ThirdParties"), -1, 'company'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 517672d14ed..63ba12197fd 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -307,7 +307,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup'); $head = societe_admin_prepare_head(); -dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), 0, 'company'); +dol_fiche_head($head, 'general', $langs->trans("ThirdParties"), -1, 'company'); $dirsociete=array_merge(array('/core/modules/societe/'),$conf->modules_parts['societe']); diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php index 89f44d53aa7..a722ec61b86 100644 --- a/htdocs/societe/admin/societe_extrafields.php +++ b/htdocs/societe/admin/societe_extrafields.php @@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("CompanySetup"),$linkback,'title_setup'); $head = societe_admin_prepare_head(); -dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), 0, 'company'); +dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), -1, 'company'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png old mode 100644 new mode 100755 index 3ee46b51553..5287d9dcc25 Binary files a/htdocs/theme/dolibarr_logo.png and b/htdocs/theme/dolibarr_logo.png differ diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php index 5995303c34a..920fa7833af 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/eldy/graph-color.php @@ -28,7 +28,7 @@ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $theme_bordercolor = array(235,235,224); -$theme_datacolor = array(array(136,102,136), array(140,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); +$theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f4d5c5c32bd..3278b685c80 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -90,10 +90,10 @@ $colorbacklinepair1='248,248,248'; // line pair $colorbacklinepair2='248,248,248'; // line pair $colorbacklinepairhover='238,246,252'; // line pair $colorbackbody='255,255,255'; -$colortexttitlenotab='60,60,20'; +$colortexttitlenotab='100,60,20'; $colortexttitle='0,0,0'; $colortext='0,0,0'; -$colortextlink='0,0,120'; +$colortextlink='0,0,100'; $fontsize='13'; $fontsizesmaller='12'; $useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1); @@ -988,6 +988,9 @@ div.fiche { dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'."\n"; ?> dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?> } +div.fiche>table:first-child { + margin-bottom: 15px !important; +} div.fichecenter { /* margin-top: 10px; */ width: 100%; @@ -2018,6 +2021,9 @@ a.tabTitle { white-space: nowrap; } +a.tabunactive { + color: rgb() !important; +} a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: ; padding: 12px 9px 12px; @@ -2942,15 +2948,15 @@ div.error { /* Info admin */ div.info { - color: #303035; + color: #fff; padding: 0.4em 0.4em 0.4em 0.4em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #e0e0e0; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; - background: #EaE4Ea; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background: #806090; + /* text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); */ } div.warning a, div.info a, div.error a { @@ -3034,7 +3040,7 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; } div.titre { font-family: ; font-size: 14px; - /* font-weight: bold; */ + font-weight: bold; color: rgb(); text-decoration: none; padding-top: 5px; diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php index 99eab0e3a88..8dad702935f 100644 --- a/htdocs/user/admin/group_extrafields.php +++ b/htdocs/user/admin/group_extrafields.php @@ -71,7 +71,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); $head = user_admin_prepare_head(); -dol_fiche_head($head, 'attributes_group', $langs->trans("MenuUsersAndGroups"), 0, 'user'); +dol_fiche_head($head, 'attributes_group', $langs->trans("MenuUsersAndGroups"), -1, 'user'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php index bb035d9f95f..28bf22da654 100644 --- a/htdocs/user/admin/user_extrafields.php +++ b/htdocs/user/admin/user_extrafields.php @@ -70,7 +70,7 @@ print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); $head = user_admin_prepare_head(); -dol_fiche_head($head, 'attributes', $langs->trans("MenuUsersAndGroups"), 0, 'user'); +dol_fiche_head($head, 'attributes', $langs->trans("MenuUsersAndGroups"), -1, 'user'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index d8aba34a934..e789a8277f3 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -42,7 +42,7 @@ $actiontest=GETPOST('test','alpha'); $actionsave=GETPOST('save','alpha'); if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5; -$MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB; +$MAXAGENDA=$conf->global->AGENDA_EXT_NB; // List of available colors $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5'); @@ -50,7 +50,8 @@ $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5') // Security check $id = GETPOST('id','int'); $object = new User($db); -$object->fetch($id); +$object->fetch($id, '', '', 1); +$object->getrights(); // Security check $socid=0; @@ -81,12 +82,12 @@ if (empty($reshook)) { if ($actionsave) { $db->begin(); - $i = 1; $errorsaved = 0; $error = 0; $tabparam = array(); // Save agendas + $i = 1; while ($i <= $MAXAGENDA) { $name = trim(GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$i, 'alpha')); $src = trim(GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$i, 'alpha')); @@ -110,7 +111,7 @@ if (empty($reshook)) { $tabparam['AGENDA_EXT_COLOR_'.$id.'_'.$i]=$color; $tabparam['AGENDA_EXT_ENABLED_'.$id.'_'.$i]=$enabled; - $i ++; + $i++; } if (!$error) { @@ -167,7 +168,6 @@ print "
\n"; $selectedvalue=$conf->global->AGENDA_DISABLE_EXT; if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; -$var=true; print '
'; print ""; @@ -180,7 +180,6 @@ print ''; print ""; $i=1; -$var=true; while ($i <= $MAXAGENDA) { $key=$i; @@ -189,7 +188,7 @@ while ($i <= $MAXAGENDA) $offsettz='AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key; $color='AGENDA_EXT_COLOR_'.$id.'_'.$key; - + print ''; // Nb print '"; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index c9551cdbc23..9f36bc91e31 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -50,7 +50,8 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); $object = new User($db); if ($id > 0 || ! empty($ref)) { - $result = $object->fetch($id, $ref); + $result = $object->fetch($id, $ref, '', 1); + $object->getrights(); } /* diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 3255dc676cf..675f5748842 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1140,7 +1140,7 @@ else if ($id > 0) { - $object->fetch($id); + $object->fetch($id, '', '', 1); if ($res < 0) { dol_print_error($db,$object->error); exit; } $res=$object->fetch_optionals($object->id,$extralabels); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 5299f348431..1500a3be55c 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -83,7 +83,8 @@ llxHeader("","ClickToDial"); if ($id > 0) { $object = new User($db); - $object->fetch($id); + $object->fetch($id, '', '', 1); + $object->getrights(); $object->fetch_clicktodial(); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index a8d5000e809..8b055979992 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -86,7 +86,7 @@ if (! $sortfield) $sortfield="name"; $object = new User($db); if ($id > 0 || ! empty($ref)) { - $result = $object->fetch($id, $ref); + $result = $object->fetch($id, $ref, '', 1); $object->getrights(); $entitytouseforuserdir = $object->entity; if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1; diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 86bff7147ff..d20624063f2 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -34,7 +34,7 @@ $id = GETPOST('id','int'); $object = new User($db); if ($id > 0 || ! empty($ref)) { - $result = $object->fetch($id, $ref); + $result = $object->fetch($id, $ref, '', 1); $object->getrights(); } diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 0f0cc6b4ed7..252ed9f82b4 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -42,7 +42,7 @@ if ($user->id == $id) $feature2=''; // A user can always read its own card $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); $object = new User($db); -$object->fetch($id); +$object->fetch($id, '', '', 1); $object->getrights(); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array diff --git a/htdocs/user/note.php b/htdocs/user/note.php index ca9f821d14c..2844676a465 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -36,7 +36,7 @@ $langs->load("bills"); $langs->load("users"); $object = new User($db); -$object->fetch($id); +$object->fetch($id, '', '', 1); $object->getrights(); // If user is not user read and no permission to read other users, we stop @@ -53,9 +53,9 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); $hookmanager->initHooks(array('usercard','globalcard')); -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ +/* + * Actions + */ $parameters=array('id'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks @@ -76,9 +76,9 @@ if (empty($reshook)) { } -/******************************************************************************/ -/* Affichage fiche */ -/******************************************************************************/ +/* + * View + */ llxHeader(); diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 4f47578f543..2b7c31d75df 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -122,7 +122,8 @@ if ($action == 'delete') $form = new Form($db); $object = new User($db); -$result=$object->fetch($id); +$result=$object->fetch($id, '', '', 1); +$object->getrights(); $title=$langs->trans("ThirdParty").' - '.$langs->trans("Notification"); if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Notification"); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index e84cfe09ca8..b40c79f783e 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -68,7 +68,7 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); if ($user->id <> $id && ! $canreaduser) accessforbidden(); $object = new User($db); -$object->fetch($id); +$object->fetch($id, '', '', 1); $object->getrights(); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
'.$langs->trans("Color").'
'.$langs->trans("AgendaExtNb",$key)."