drop PMA_setFontSizes()
This commit is contained in:
@@ -7,6 +7,11 @@ $Source$
|
||||
|
||||
2005-11-23 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* libraries/display_select_lang.lib.php: correct lang definition
|
||||
* themes/original/*, libraries/auth/*.auth.lib.php, server_privilegs.php,
|
||||
db_printview.php, tbl_properties_structure.php, tbl_properties.inc.php,
|
||||
tbl_relation.php, browse_foreigners.php, css/phpmyadmin.css.php,
|
||||
header_printview.inc.php, header_meta_style.inc.php, themes.php:
|
||||
- drop PMA_setFontSizes()
|
||||
|
||||
2005-11-23 Michal Čihař <michal@cihar.com>
|
||||
* config.default.php, libraries/import/csv.php, libraries/import/ldi.php:
|
||||
|
@@ -25,9 +25,6 @@ $field = urldecode($field);
|
||||
/**
|
||||
* Displays the frame
|
||||
*/
|
||||
// Gets the font sizes to use
|
||||
PMA_setFontSizes();
|
||||
|
||||
$per_page = 200;
|
||||
require_once('./libraries/relation.lib.php'); // foreign keys
|
||||
require_once('./libraries/transformations.lib.php'); // Transformations
|
||||
|
@@ -15,11 +15,6 @@ if ( $GLOBALS['text_dir'] === 'ltr' ) {
|
||||
$left = 'right';
|
||||
}
|
||||
|
||||
// Gets the default font sizes
|
||||
// garvin: TODO: Should be optimized to not include the whole common.lib.php bunch
|
||||
// but only functions used to determine browser heritage.
|
||||
PMA_setFontSizes();
|
||||
|
||||
// Send correct type:
|
||||
header('Content-Type: text/css; charset=ISO-8859-1');
|
||||
|
||||
|
@@ -217,8 +217,8 @@ else {
|
||||
if (isset($sts_data['Create_time']) && !empty($sts_data['Create_time'])) {
|
||||
?>
|
||||
<tr>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatCreateTime . ': '; ?></td>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Create_time'])); ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo $strStatCreateTime . ': '; ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Create_time'])); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -226,8 +226,8 @@ else {
|
||||
if (isset($sts_data['Update_time']) && !empty($sts_data['Update_time'])) {
|
||||
?>
|
||||
<tr>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatUpdateTime . ': '; ?></td>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Update_time'])); ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo $strStatUpdateTime . ': '; ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Update_time'])); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@@ -235,8 +235,8 @@ else {
|
||||
if (isset($sts_data['Check_time']) && !empty($sts_data['Check_time'])) {
|
||||
?>
|
||||
<tr>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo $strStatCheckTime . ': '; ?></td>
|
||||
<td style="font-size: <?php echo $font_smaller; ?>" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Check_time'])); ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo $strStatCheckTime . ': '; ?></td>
|
||||
<td style="font-size: 80%" align="right"><?php echo PMA_localisedDate(strtotime($sts_data['Check_time'])); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
@@ -28,8 +28,6 @@ require_once('./libraries/header_http.inc.php');
|
||||
/**
|
||||
* Sends the beginning of the html page then returns to the calling script
|
||||
*/
|
||||
// Gets the font sizes to use
|
||||
PMA_setFontSizes();
|
||||
// Defines the cell alignment values depending on text direction
|
||||
if ($text_dir == 'ltr') {
|
||||
$cell_align_left = 'left';
|
||||
|
@@ -68,7 +68,7 @@ function PMA_auth_set_user()
|
||||
function PMA_auth_fails()
|
||||
{
|
||||
global $php_errormsg, $cfg;
|
||||
global $right_font_family, $font_size, $font_bigger;
|
||||
|
||||
if (PMA_DBI_getError()) {
|
||||
$conn_error = PMA_DBI_getError();
|
||||
} else if (isset($php_errormsg)) {
|
||||
|
@@ -13,9 +13,6 @@ if (!isset($coming_from_common)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Gets the default font sizes
|
||||
PMA_setFontSizes();
|
||||
|
||||
// timestamp for login timeout
|
||||
$current_time = time();
|
||||
|
||||
@@ -63,10 +60,7 @@ function PMA_cookie_cmp(&$a, $b)
|
||||
*/
|
||||
function PMA_auth()
|
||||
{
|
||||
global $right_font_family, $font_size, $font_bigger;
|
||||
global $cfg, $available_languages;
|
||||
global $lang, $server, $convcharset;
|
||||
global $conn_error;
|
||||
global $cfg, $lang, $server, $convcharset, $conn_error;
|
||||
|
||||
// Tries to get the username from cookie whatever are the values of the
|
||||
// 'register_globals' and the 'variables_order' directives if last login
|
||||
|
@@ -20,7 +20,6 @@
|
||||
* @access public
|
||||
*/
|
||||
function PMA_auth() {
|
||||
global $right_font_family, $font_size, $font_bigger;
|
||||
|
||||
header('WWW-Authenticate: Basic realm="phpMyAdmin ' . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'',$GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose']))) . '"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
@@ -13,9 +13,6 @@
|
||||
* some functions need the constants of libraries/defines.lib.php
|
||||
* and defines_mysql.lib.php
|
||||
*
|
||||
* the PMA_setFontSizes() function must be before the call to the
|
||||
* libraries/auth/cookie.auth.lib.php library
|
||||
*
|
||||
* the include of libraries/defines_mysql.lib.php must be after the connection
|
||||
* to db to get the MySql version
|
||||
*
|
||||
@@ -38,7 +35,6 @@
|
||||
* - definition of PMA_format_sql()
|
||||
* - definition of PMA_mysqlDie()
|
||||
* - definition of PMA_isInto()
|
||||
* - definition of PMA_setFontSizes()
|
||||
* - loading of an authentication library
|
||||
* - db connection
|
||||
* - authentication work
|
||||
@@ -1088,94 +1084,6 @@ function PMA_safe_db_list($only_db_check, $controllink, $dblist_cnt, $rs, $userl
|
||||
return $dblist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the font sizes to use depending on the os and browser of the
|
||||
* user.
|
||||
*
|
||||
* This function is based on an article from phpBuilder (see
|
||||
* http://www.phpbuilder.net/columns/tim20000821.php).
|
||||
*
|
||||
* @return boolean always true
|
||||
*
|
||||
* @global string the standard font size
|
||||
* @global string the font size for titles
|
||||
* @global string the small font size
|
||||
* @global string the smallest font size
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
* @version 1.1
|
||||
*/
|
||||
function PMA_setFontSizes()
|
||||
{
|
||||
global $font_size, $font_biggest, $font_bigger, $font_smaller, $font_smallest;
|
||||
|
||||
// IE (<7)/Opera (<7) for win case: needs smaller fonts than anyone else
|
||||
if (PMA_USR_OS == 'Win'
|
||||
&& ((PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER < 7)
|
||||
|| (PMA_USR_BROWSER_AGENT == 'OPERA' && PMA_USR_BROWSER_VER < 7))) {
|
||||
$font_size = 'x-small';
|
||||
$font_biggest = 'large';
|
||||
$font_bigger = 'medium';
|
||||
$font_smaller = '90%';
|
||||
$font_smallest = '7pt';
|
||||
}
|
||||
// IE6 and other browsers for win case
|
||||
else if (PMA_USR_OS == 'Win') {
|
||||
$font_size = 'small';
|
||||
$font_biggest = 'large';
|
||||
$font_bigger = 'medium';
|
||||
$font_smaller = (PMA_USR_BROWSER_AGENT == 'IE')
|
||||
? '90%'
|
||||
: 'x-small';
|
||||
$font_smallest = 'x-small';
|
||||
}
|
||||
// Some mac browsers need also smaller default fonts size (OmniWeb &
|
||||
// Opera)...
|
||||
// and a beta version of Safari did also, but not the final 1.0 version
|
||||
// so I remove || PMA_USR_BROWSER_AGENT == 'SAFARI'
|
||||
// but we got a report that Safari 1.0 build 85.5 needs it!
|
||||
|
||||
else if (PMA_USR_OS == 'Mac'
|
||||
&& (PMA_USR_BROWSER_AGENT == 'OMNIWEB' || PMA_USR_BROWSER_AGENT == 'OPERA' || PMA_USR_BROWSER_AGENT == 'SAFARI')) {
|
||||
$font_size = 'x-small';
|
||||
$font_biggest = 'large';
|
||||
$font_bigger = 'medium';
|
||||
$font_smaller = '90%';
|
||||
$font_smallest = '7pt';
|
||||
}
|
||||
// ... but most of them (except IE 5+ & NS 6+) need bigger fonts
|
||||
else if ((PMA_USR_OS == 'Mac'
|
||||
&& ((PMA_USR_BROWSER_AGENT != 'IE' && PMA_USR_BROWSER_AGENT != 'MOZILLA')
|
||||
|| PMA_USR_BROWSER_VER < 5))
|
||||
|| PMA_USR_BROWSER_AGENT == 'KONQUEROR'
|
||||
|| PMA_USR_BROWSER_AGENT == 'MOZILLA') {
|
||||
$font_size = 'medium';
|
||||
$font_biggest = 'x-large';
|
||||
$font_bigger = 'large';
|
||||
$font_smaller = 'small';
|
||||
$font_smallest = 'x-small';
|
||||
}
|
||||
// OS/2 browser
|
||||
else if (PMA_USR_OS == 'OS/2'
|
||||
&& PMA_USR_BROWSER_AGENT == 'OPERA') {
|
||||
$font_size = 'small';
|
||||
$font_biggest = 'medium';
|
||||
$font_bigger = 'medium';
|
||||
$font_smaller = 'x-small';
|
||||
$font_smallest = 'x-small';
|
||||
}
|
||||
else {
|
||||
$font_size = 'small';
|
||||
$font_biggest = 'large';
|
||||
$font_bigger = 'medium';
|
||||
$font_smaller = 'x-small';
|
||||
$font_smallest = 'x-small';
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_setFontSizes()' function
|
||||
|
||||
|
||||
if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) {
|
||||
/**
|
||||
|
@@ -5,8 +5,6 @@
|
||||
/**
|
||||
* Sends the beginning of the html page then returns to the calling script
|
||||
*/
|
||||
// Gets the font sizes to use
|
||||
PMA_setFontSizes();
|
||||
// Defines the cell alignment values depending on text direction
|
||||
if ($GLOBALS['text_dir'] == 'ltr') {
|
||||
$GLOBALS['cell_align_left'] = 'left';
|
||||
|
@@ -1382,7 +1382,7 @@ if ( empty( $adduser ) && empty( $checkprivs ) ) {
|
||||
|
||||
uksort( $array_initials, "strnatcasecmp" );
|
||||
|
||||
echo '<table cellspacing="5" style="font-size:' . $font_bigger . '"><tr>';
|
||||
echo '<table cellspacing="5"><tr>';
|
||||
foreach ($array_initials as $tmp_initial => $initial_was_found) {
|
||||
if ($initial_was_found) {
|
||||
echo '<td><a href="' . $PHP_SELF . '?' . $GLOBALS['url_query'] . '&initial=' . urlencode($tmp_initial) . '">' . $tmp_initial . '</a></td>' . "\n";
|
||||
|
@@ -329,7 +329,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) {
|
||||
$ci++;
|
||||
}
|
||||
|
||||
$content_cells[$i][$ci] = '<select style="font-size: ' . $font_smallest . ';" name="field_attribute[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">' . "\n";
|
||||
$content_cells[$i][$ci] = '<select style="font-size: 70%;" name="field_attribute[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">' . "\n";
|
||||
|
||||
$attribute = '';
|
||||
if ($binary) {
|
||||
@@ -434,7 +434,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) {
|
||||
if ($default_current_timestamp) {
|
||||
$content_cells[$i][$ci] .= ' checked="checked" ';
|
||||
}
|
||||
$content_cells[$i][$ci] .= ' /><label for="field_' . $i . '_' . ($ci - $ci_offset) . 'a" style="font-size: ' . $font_smallest . ';">CURRENT_TIMESTAMP</label></div>';
|
||||
$content_cells[$i][$ci] .= ' /><label for="field_' . $i . '_' . ($ci - $ci_offset) . 'a" style="font-size: 70%;">CURRENT_TIMESTAMP</label></div>';
|
||||
}
|
||||
$ci++;
|
||||
|
||||
|
@@ -336,7 +336,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|
||||
<th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $field_name; ?></label></th>
|
||||
<td<?php echo $type_nowrap; ?>><?php echo $type; echo $type_mime; ?><bdo dir="ltr"></bdo></td>
|
||||
<?php echo PMA_MYSQL_INT_VERSION >= 40100 ? ' <td>' . (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>') . '</td>' . "\n" : '' ?>
|
||||
<td nowrap="nowrap" style="font-size: <?php echo $font_smallest; ?>"><?php echo $attribute; ?></td>
|
||||
<td nowrap="nowrap" style="font-size: 70%"><?php echo $attribute; ?></td>
|
||||
<td><?php echo (($row['Null'] == 'YES') ? $strYes : $strNo); ?></td>
|
||||
<td nowrap="nowrap"><?php if (isset($row['Default'])) echo $row['Default']; ?></td>
|
||||
<td nowrap="nowrap"><?php echo $row['Extra']; ?></td>
|
||||
|
@@ -40,12 +40,9 @@ $options_array = array('CASCADE' => 'CASCADE', 'SET_NULL' => 'SET NULL', 'NO_ACT
|
||||
* @access public
|
||||
*/
|
||||
function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected_value) {
|
||||
global $font_smallest;
|
||||
|
||||
echo $dropdown_question . ' ';
|
||||
|
||||
//echo '<select name="' . $radio_name . '" style="font-size: ' . $font_smallest . '">' . "\n";
|
||||
//echo '<option value="nix" style="font-size: ' . $font_smallest . '" >--</option>' . "\n";
|
||||
echo '<select name="' . $radio_name . '">' . "\n";
|
||||
echo '<option value="nix">--</option>' . "\n";
|
||||
|
||||
@@ -54,7 +51,6 @@ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected
|
||||
if ($selected_value == $one_value) {
|
||||
echo ' selected="selected" ';
|
||||
}
|
||||
//echo ' style="font-size: ' . $font_smallest . '">'
|
||||
echo '>' . $one_label . '</option>' . "\n";
|
||||
}
|
||||
echo '</select>' . "\n";
|
||||
|
@@ -9,8 +9,6 @@ require_once('./libraries/select_theme.lib.php');
|
||||
/* set language and charset */
|
||||
require_once('./libraries/header_http.inc.php');
|
||||
|
||||
/* Gets the font sizes to use */
|
||||
PMA_setFontSizes();
|
||||
/* HTML header */
|
||||
$page_title = 'phpMyAdmin - ' . $strTheme;
|
||||
require('./libraries/header_meta_style.inc.php');
|
||||
|
@@ -1,6 +1,5 @@
|
||||
body, input, select {
|
||||
font-family: <?php echo $left_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
color: #000000
|
||||
}
|
||||
|
||||
@@ -46,7 +45,7 @@ div#left_tableList {
|
||||
list-style-position: outside;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: <?php echo $font_smaller; ?>;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
div#left_tableList a {
|
||||
|
@@ -8,7 +8,6 @@ body {
|
||||
margin: 0.5em;
|
||||
padding: 0;
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
color: #000000;
|
||||
<?php
|
||||
if ($GLOBALS['cfg']['RightBgImage'] == '') {
|
||||
@@ -22,20 +21,19 @@ body {
|
||||
background-color: <?php echo $GLOBALS['cfg']['RightBgColor'] . "\n"; ?>
|
||||
}
|
||||
|
||||
pre, tt {font-size: <?php echo $font_size; ?>}
|
||||
th {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>}
|
||||
td {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
|
||||
form {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; padding: 0px; margin: 0px;}
|
||||
input {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>}
|
||||
input.textfield {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
|
||||
select {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
|
||||
textarea {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000; background-color: #FFFFFF}
|
||||
h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_biggest; ?>; font-weight: bold}
|
||||
h2 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
|
||||
h3 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; font-weight: bold}
|
||||
a:link {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
|
||||
a:visited {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: none; color: #0000FF}
|
||||
a:hover {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; text-decoration: underline; color: #FF0000}
|
||||
th {font-family: <?php echo $right_font_family; ?>; font-weight: bold; color: #000000; background-color: <?php echo $GLOBALS['cfg']['ThBgcolor']; ?>}
|
||||
td {font-family: <?php echo $right_font_family; ?>; }
|
||||
form {font-family: <?php echo $right_font_family; ?>; padding: 0px; margin: 0px;}
|
||||
input {font-family: <?php echo $right_font_family; ?>; }
|
||||
input.textfield {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF}
|
||||
select {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF}
|
||||
textarea {font-family: <?php echo $right_font_family; ?>; color: #000000; background-color: #FFFFFF}
|
||||
h1 {font-family: <?php echo $right_font_family; ?>; font-size: 140%; font-weight: bold}
|
||||
h2 {font-family: <?php echo $right_font_family; ?>; font-size: 120%; font-weight: bold}
|
||||
h3 {font-family: <?php echo $right_font_family; ?>; font-weight: bold}
|
||||
a:link {font-family: <?php echo $right_font_family; ?>; text-decoration: none; color: #0000FF}
|
||||
a:visited {font-family: <?php echo $right_font_family; ?>; text-decoration: none; color: #0000FF}
|
||||
a:hover {font-family: <?php echo $right_font_family; ?>; text-decoration: underline; color: #FF0000}
|
||||
dfn {font-style: normal}
|
||||
dfn:hover {font-style: normal; cursor: help}
|
||||
|
||||
@@ -71,14 +69,14 @@ button.mult_submit {
|
||||
visibility: inherit;
|
||||
cursor: move;
|
||||
position: absolute;
|
||||
font-size: <?php echo $font_smaller; ?>;
|
||||
font-size: 80%;
|
||||
border: 1px dashed #000000;
|
||||
}
|
||||
|
||||
.print{font-family:arial;font-size:8pt;}
|
||||
|
||||
/* MySQL Parser */
|
||||
.syntax {font-family: sans-serif; font-size: <?php echo $font_smaller; ?>;}
|
||||
.syntax {font-family: sans-serif; font-size: 80%;}
|
||||
.syntax_comment { padding-left: 4pt; padding-right: 4pt;}
|
||||
.syntax_digit {}
|
||||
.syntax_digit_hex {}
|
||||
@@ -304,7 +302,7 @@ fieldset.confirmation legend {
|
||||
/* end messageboxes */
|
||||
|
||||
|
||||
.tblcomment {font-size: <?php echo $font_smallest; ?>; font-weight: normal; color: #000099; }
|
||||
.tblcomment {font-size: 70%; font-weight: normal; color: #000099; }
|
||||
|
||||
.tblHeaders {
|
||||
background-color: <?php echo $cfg['LeftBgColor']; ?>;
|
||||
@@ -364,7 +362,6 @@ img, input, select, button {
|
||||
/* disabled text */
|
||||
.disabled, .disabled a:link, disabled a:active, .disabled a:visited {
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
color: #666666;
|
||||
}
|
||||
.disabled a:hover {
|
||||
@@ -393,7 +390,6 @@ tr.disabled td, td.disabled {
|
||||
border: 0.1em solid #000000;
|
||||
padding: 0.5em;
|
||||
font-family: <?php echo $right_font_family; ?>;
|
||||
font-size: <?php echo $font_size; ?>;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
|
Reference in New Issue
Block a user