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 ''; -print ''.$langs->trans("BlockedLogAuthorityUrl").img_info($langs->trans('BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote')).''; -print ''; -print '
'; -print ''; -print ''; -print ''; -print ''; -print '
'; -print ''; - +if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY)) { + // Example with a yes / no select + $var=!$var; + print ''; + print ''.$langs->trans("BlockedLogAuthorityUrl").img_info($langs->trans('BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote')).''; + print ''; + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + print ''; +} print ''; diff --git a/htdocs/blockedlog/admin/fingerprints.php b/htdocs/blockedlog/admin/fingerprints.php index 29cd2a3f73b..95117bf2c28 100644 --- a/htdocs/blockedlog/admin/fingerprints.php +++ b/htdocs/blockedlog/admin/fingerprints.php @@ -74,7 +74,7 @@ print $langs->trans("FingerprintsDesc")."
\n"; print '
'; -echo '
'.$langs->trans('ShowAllFingerPrintsMightBeTooLong').' '.$langs->trans('DownloadBlockChain').'
'; +echo '
'.$langs->trans('ShowAllFingerPrintsMightBeTooLong').' | '.$langs->trans('DownloadBlockChain').'
'; print ''; @@ -97,15 +97,16 @@ foreach($blocks as &$block) { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; @@ -113,6 +114,54 @@ foreach($blocks as &$block) { print '
'.dol_print_date($block->tms,'dayhour').''.$block->ref_object.''.$langs->trans('log'.$block->action).''.$block->getObject().''.$block->getObject().''.img_info($langs->trans('ShowDetails')).''.price($block->amounts).''.$block->getUser().''.$block->signature.''; - 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 '
'; +?> + + +global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { + ?>