From 900452a47d281b3166229da59fb09ccdb1de8a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 27 Oct 2020 18:46:42 +0100 Subject: [PATCH] formcolor parameter is deprecated --- htdocs/core/lib/usergroups.lib.php | 211 +++++++++++------------------ 1 file changed, 76 insertions(+), 135 deletions(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 722c0f41263..d82b57f8d0c 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -38,8 +38,7 @@ function user_prepare_head($object) $langs->load("users"); $canreadperms = true; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) - { + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadperms = ($user->admin || ($user->id != $object->id && $user->rights->user->user_advance->readperms) || ($user->id == $object->id && $user->rights->user->self_advance->readperms)); } @@ -52,8 +51,7 @@ function user_prepare_head($object) $h++; if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE)) - && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) - { + && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT.'/user/ldap.php?id='.$object->id; $head[$h][1] = $langs->trans("LDAPCard"); @@ -61,8 +59,7 @@ function user_prepare_head($object) $h++; } - if ($canreadperms) - { + if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id; $head[$h][1] = $langs->trans("Rights").(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.($object->nb_rights).'' : ''); $head[$h][2] = 'rights'; @@ -74,15 +71,13 @@ function user_prepare_head($object) $head[$h][2] = 'guisetup'; $h++; - if (!empty($conf->agenda->enabled)) - { + if (!empty($conf->agenda->enabled)) { if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5; $MAXAGENDA = $conf->global->AGENDA_EXT_NB; $i = 1; $nbagenda = 0; - while ($i <= $MAXAGENDA) - { + while ($i <= $MAXAGENDA) { $key = $i; $name = 'AGENDA_EXT_NAME_'.$object->id.'_'.$key; $src = 'AGENDA_EXT_SRC_'.$object->id.'_'.$key; @@ -99,8 +94,7 @@ function user_prepare_head($object) $h++; } - if (!empty($conf->clicktodial->enabled)) - { + if (!empty($conf->clicktodial->enabled)) { $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$object->id; $head[$h][1] = $langs->trans("ClickToDial"); $head[$h][2] = 'clicktodial'; @@ -108,19 +102,16 @@ function user_prepare_head($object) } // Notifications - if ($user->socid == 0 && !empty($conf->notification->enabled)) - { + if ($user->socid == 0 && !empty($conf->notification->enabled)) { $nbNote = 0; $sql = "SELECT COUNT(n.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n"; $sql .= " WHERE fk_user = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $nbNote = $obj->nb; $i++; @@ -147,8 +138,7 @@ function user_prepare_head($object) || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read)) || (!empty($conf->expensereport->enabled) && !empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) || (!empty($conf->holiday->enabled) && !empty($user->rights->holiday->read) && ($user->id == $object->id || $user->rights->holiday->read_all)) - ) - { + ) { // Bank $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id; $head[$h][1] = $langs->trans("HRAndBank"); @@ -157,8 +147,7 @@ function user_prepare_head($object) } // Such info on users is visible only by internal user - if (empty($user->socid)) - { + if (empty($user->socid)) { // Notes $nbNote = 0; if (!empty($object->note)) $nbNote++; @@ -202,8 +191,7 @@ function group_prepare_head($object) global $langs, $conf, $user; $canreadperms = true; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) - { + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadperms = ($user->admin || $user->rights->user->group_advance->readperms); } @@ -216,8 +204,7 @@ function group_prepare_head($object) $h++; if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE)) - && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) - { + && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT.'/user/group/ldap.php?id='.$object->id; $head[$h][1] = $langs->trans("LDAPCard"); @@ -225,8 +212,7 @@ function group_prepare_head($object) $h++; } - if ($canreadperms) - { + if ($canreadperms) { $head[$h][0] = DOL_URL_ROOT.'/user/group/perms.php?id='.$object->id; $head[$h][1] = $langs->trans("GroupRights").''.($object->nb_rights).''; $head[$h][2] = 'rights'; @@ -305,10 +291,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) $formother = new FormOther($db); $dirthemes = array('/theme'); - if (!empty($conf->modules_parts['theme'])) // Using this feature slow down application - { - foreach ($conf->modules_parts['theme'] as $reldir) - { + if (!empty($conf->modules_parts['theme'])) { // Using this feature slow down application + foreach ($conf->modules_parts['theme'] as $reldir) { $dirthemes = array_merge($dirthemes, (array) ($reldir.'theme')); } } @@ -334,8 +318,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; // Title - if ($foruserprofile) - { + if ($foruserprofile) { print ''; print ''; print ''; @@ -348,8 +331,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } else { $dirthemestring = ''; - foreach ($dirthemes as $dirtheme) - { + foreach ($dirthemes as $dirtheme) { $dirthemestring .= '"'.$dirtheme.'" '; } @@ -369,22 +351,17 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' 
'; print ''; @@ -469,7 +442,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; print ''; @@ -510,7 +481,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; @@ -552,7 +521,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; print ''; @@ -595,7 +562,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; @@ -773,7 +726,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; print ''; @@ -828,16 +779,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; @@ -868,16 +816,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; @@ -953,8 +895,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) 'tritanopes' => $langs->trans('Tritanopes'), ); - if ($edit) - { + if ($edit) { print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0); } else { if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) {
'; $i = 0; - foreach ($dirthemes as $dir) - { + foreach ($dirthemes as $dir) { //print $dirroot.$dir;exit; $dirtheme = dol_buildpath($dir, 0); // This include loop on $conf->file->dol_document_root $urltheme = dol_buildpath($dir, 1); - if (is_dir($dirtheme)) - { + if (is_dir($dirtheme)) { $handle = opendir($dirtheme); - if (is_resource($handle)) - { - while (($subdir = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($subdir = readdir($handle)) !== false) { if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' - && substr($subdir, 0, 3) <> 'CVS' && !preg_match('/common|phones/i', $subdir)) - { + && substr($subdir, 0, 3) <> 'CVS' && !preg_match('/common|phones/i', $subdir)) { // Disable not stable themes (dir ends with _exp or _dev) if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) continue; if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) continue; @@ -398,8 +375,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) else $title = $langs->trans("ShowPreview"); print ''.$title.''; print '
'; - if ($subdir == $selected_theme) - { + if ($subdir == $selected_theme) { print ' '.$subdir.''; } else { print ' '.$subdir; @@ -435,14 +411,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Show logo - if ($foruserprofile) - { + if ($foruserprofile) { // Nothing } else { // Show logo print '
'.$langs->trans("EnableShowLogo").''; - if ($edit) - { + if ($edit) { print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1); //print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); } else { @@ -457,8 +431,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TopMenuDisableImages - if ($foruserprofile) - { + if ($foruserprofile) { /* print '
'.$langs->trans("TopMenuDisableImages").''; if ($edit) { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','formcolor',1).' '; + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_TOPMENU_DISABLE_IMAGE,array()),''),'THEME_TOPMENU_DISABLE_IMAGE','',1).' '; } else { @@ -484,8 +457,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuDisableImages").''; - if ($edit) - { + if ($edit) { print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1); //print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1); } else { @@ -498,8 +470,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Background color THEME_ELDY_BACKBODY - if ($foruserprofile) - { + if ($foruserprofile) { /* print '
'.$langs->trans("TopMenuBackgroundColor").''; if ($edit) { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' '; } else { @@ -525,9 +496,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''.$langs->trans("BackgroundColor").''; //var_dump($conf->global->THEME_ELDY_BACKBODY); - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', 'formcolor', 1, '', '', 'colorbackbody').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''); if ($color) print ''; @@ -540,8 +510,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // TopMenuBackgroundColor - if ($foruserprofile) - { + if ($foruserprofile) { /* print '
'.$langs->trans("TopMenuBackgroundColor").''; if ($edit) { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','',1).' '; } else { @@ -568,9 +537,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuBackgroundColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', 'formcolor', 1, '', '', 'colorbackhmenu1').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', '', 1, '', '', 'colorbackhmenu1').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''); if ($color) print ''; @@ -583,8 +551,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // LeftMenuBackgroundColor - if ($foruserprofile) - { + if ($foruserprofile) { /* print '
'.$langs->trans("TopMenuBackgroundColor").''; if ($edit) { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','formcolor',1).' '; + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1,array()),''),'THEME_ELDY_VERMENU_BACK1','',1).' '; } else { @@ -611,9 +578,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("LeftMenuBackgroundColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', 'formcolor', 1, '', '', 'colorbackvmenu1').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', '', 1, '', '', 'colorbackvmenu1').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''); if ($color) print ''; @@ -626,17 +592,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // TextTitleColor for title of Pages - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default = (empty($colortexttitlenotab) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlenotab))); print '
'.$langs->trans("TextTitleColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', 'formcolor', 1, '', '', 'colortexttitlenotab').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', '', 1, '', '', 'colortexttitlenotab').' '; } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); } @@ -648,17 +612,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // BackgroundTableTitleColor - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default = (empty($colorbacktitle1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacktitle1))); print '
'.$langs->trans("BackgroundTableTitleColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', 'formcolor', 1, '', '', 'colorbacktitle1').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', '', 1, '', '', 'colorbacktitle1').' '; } else { print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); } @@ -670,17 +632,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // TextTitleColor - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default = (empty($colortexttitle) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitle))); print '
'.$langs->trans("BackgroundTableTitleTextColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', 'formcolor', 1, '', '', 'colortexttitle').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', '', 1, '', '', 'colortexttitle').' '; } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default")); } @@ -692,17 +652,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // TextTitleLinkColor - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink))); print '
'.$langs->trans("BackgroundTableTitleTextlinkColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1, '', '', 'colortexttitlelink').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', '', 1, '', '', 'colortexttitlelink').' '; } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default")); } @@ -715,17 +673,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // BackgroundTableLineOddColor - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default = (empty($colorbacklineimpair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklineimpair1))); print '
'.$langs->trans("BackgroundTableLineOddColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', 'formcolor', 1, '', '', 'colorbacklinepair2').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', '', 1, '', '', 'colorbacklinepair2').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''); if ($color) print ''; @@ -738,17 +694,15 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // BackgroundTableLineEvenColor - if ($foruserprofile) - { + if ($foruserprofile) { } else { $default = (empty($colorbacklinepair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepair1))); print '
'.$langs->trans("BackgroundTableLineEvenColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', 'formcolor', 1, '', '', 'colorbacklineimpair2').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', '', 1, '', '', 'colorbacklineimpair2').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''); if ($color) print ''; @@ -761,8 +715,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Text LinkColor - if ($foruserprofile) - { + if ($foruserprofile) { /* print '
'.$langs->trans("TopMenuBackgroundColor").''; if ($edit) { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' '; + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','',1).' '; } else { @@ -789,9 +742,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("LinkColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', 'formcolor', 1, '', '', 'colortextlink').' '; + if ($edit) { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', '', 1, '', '', 'colortextlink').' '; } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''); if ($color) print ''; @@ -808,8 +760,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Use Hover - if ($foruserprofile) - { + if ($foruserprofile) { /* Must first change option to choose color of highlight instead of yes or no. print '
'.$langs->trans("HighlightLinesOnMouseHover").''; //print ''; //print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; - if ($edit) - { + if ($edit) { if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover)); else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), ''); - print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1, '', '', 'colorbacklinepairhover').' '; + print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, '', '', 'colorbacklinepairhover').' '; } else { if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover)); else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), ''); - if ($color) - { + if ($color) { if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print ''; else print $langs->trans("Default"); } else print $langs->trans("Default"); @@ -848,8 +797,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Use Checked - if ($foruserprofile) - { + if ($foruserprofile) { /* Must first change option to choose color of highlight instead of yes or no. print '
'.$langs->trans("HighlightLinesOnMouseHover").''; //print ''; //print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; - if ($edit) - { + if ($edit) { if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), ''); - print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', 'formcolor', 1, '', '', 'colorbacklinepairchecked').' '; + print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, '', '', 'colorbacklinepairchecked').' '; } else { if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), ''); - if ($color) - { + if ($color) { if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); } else print $langs->trans("Default"); @@ -889,20 +835,17 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } // Use MAIN_OPTIMIZEFORTEXTBROWSER - if ($foruserprofile) - { + if ($foruserprofile) { //$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); $default = $langs->trans('No'); print '
'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").''; //print ajax_constantonoff("MAIN_OPTIMIZEFORTEXTBROWSER", array(), null, 0, 0, 1, 0); - if ($edit) - { + if ($edit) { print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1); } else { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER); } else { print yn(1); @@ -937,8 +880,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // Use MAIN_OPTIMIZEFORTEXTBROWSER - if ($foruserprofile) - { + if ($foruserprofile) { //$default=yn($conf->global->MAIN_OPTIMIZEFORCOLORBLIND); $default = $langs->trans('No'); print '