diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 0bd283de611..f9209f24be3 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -503,6 +503,14 @@ $tabfieldcheck[34] = array(); complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck); +// Defaut sortorder +if (empty($sortfield)) +{ + $tmp1 = explode(',',$tabsqlsort[$id]); + $tmp2 = explode(' ',$tmp1[0]); + $sortfield=preg_replace('/^.*\./', '', $tmp2[0]); +} + // Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact") $elementList = array(); $sourceList=array(); @@ -947,7 +955,8 @@ if ($id) if (! preg_match('/ WHERE /',$sql)) $sql.= " WHERE 1 = 1"; if ($search_country_id > 0) $sql.= " AND c.rowid = ".$search_country_id; - if ($search_code != '') $sql.= natural_search("code", $search_code); + if ($search_code != '' && $id != 9) $sql.= natural_search("code", $search_code); + if ($search_code != '' && $id == 9) $sql.= natural_search("code_iso", $search_code); if ($sortfield) { diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 3c143b70b83..f77c6e9edd8 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -101,20 +101,20 @@ print $block_static->getSignature(); print ''; - -// Example with a yes / no select -$var=!$var; -print '
| '.dol_print_date($block->tms,'dayhour').' | '; print ''.$block->ref_object.' | '; print ''.$langs->trans('log'.$block->action).' | '; - print ''.$block->getObject().' | '; + print ''.$block->getObject().''.img_info($langs->trans('ShowDetails')).' | '; print ''.price($block->amounts).' | '; print ''.$block->getUser().' | '; print ''.$block->signature.' | '; print ''; - print $block->checkSignature() ? img_picto('OkCheckPaymentValidity', 'on') : img_picto($langs->trans('KoCheckPaymentValidity'), 'off'); - print ' '.($block->certified ? img_picto($langs->trans('AddedByAuthority'), 'info') : img_picto($langs->trans('NotAddedByAuthorityYet'), 'info_black') ); - + print $block->checkSignature() ? img_picto($langs->trans('OkCheckFingerprintValidity'), 'on') : img_picto($langs->trans('KoCheckFingerprintValidity'), 'off'); + if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { + print ' '.($block->certified ? img_picto($langs->trans('AddedByAuthority'), 'info') : img_picto($langs->trans('NotAddedByAuthorityYet'), 'info_black') ); + } print ' | '; print ''; @@ -113,6 +114,54 @@ foreach($blocks as &$block) { print '