Changeset 10712
- Timestamp:
- Apr 30, 2011, 10:12:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/main.inc.php
r10643 r10712 80 80 if (isset($_POST['username']) and isset($conf_LCAS[0])) 81 81 { 82 $new_username = LCAS_SearchCaseUsername($_POST['username'],$conf_LCAS[0]); 83 $_POST['username'] = $new_username == '' ? $_POST['username'] : $new_username; 82 $new_username = 83 LCAS_SearchCaseUsername($_POST['username'], $conf_LCAS[0]); 84 $_POST['username'] = ($new_username == '') ? 85 $_POST['username'] : $new_username; 84 86 } 85 87 } 86 88 87 // Add tooltips on register page 88 if (script_basename() == 'register') { 89 // Add tooltips on register and identification page 90 $sb = script_basename(); $fn = ''; 91 if ($sb == 'register' or $sb == 'identification') 92 $fn = ($sb == 'register') ? 93 'LCAS_add_tooltips_prefilter_register' : 94 'LCAS_add_tooltips_prefilter_identification'; 95 if ($fn != '') { 89 96 $template->assign(array( 90 'LCAS_username_tooltip' => $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 91 'LCAS_password_tooltip' => $lang['LCAS_tooltip_password_register'], 97 'LCAS_username_tooltip' => 98 $lang['LCAS_tooltip_username_register'][intval($conf_LCAS[0])], 99 'LCAS_password_tooltip' => 100 $lang['LCAS_tooltip_password_register'], 92 101 )); 93 $template->set_prefilter( 'register', 'LCAS_add_tooltips_prefilter_register');102 $template->set_prefilter($sb, $fn); 94 103 } 95 104 } … … 113 122 $search = 'name="password_conf"'; 114 123 $replacement = 'name="password_conf" title="{$LCAS_password_tooltip}"'; 124 $content = str_replace($search, $replacement, $content); 125 return $content; 126 } 127 128 function LCAS_add_tooltips_prefilter_identification($content, &$smarty) { 129 $search = 'for="username"'; 130 $replacement = 'for="username" title="{$LCAS_username_tooltip}"'; 131 $content = str_replace($search, $replacement, $content); 132 $search = 'name="username"'; 133 $replacement = 'name="username" title="{$LCAS_username_tooltip}"'; 134 $content = str_replace($search, $replacement, $content); 135 $search = 'for="password"'; 136 $replacement = 'for="password" title="{$LCAS_password_tooltip}"'; 137 $content = str_replace($search, $replacement, $content); 138 $search = 'name="password"'; 139 $replacement = 'name="password" title="{$LCAS_password_tooltip}"'; 115 140 $content = str_replace($search, $replacement, $content); 116 141 return $content;
Note: See TracChangeset
for help on using the changeset viewer.