Coding standards
This commit is contained in:
@@ -6,6 +6,12 @@ $Id$
|
|||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
|
||||||
|
2002-10-25 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* libraries/common.lib.php3; libraries/display_tbl.lib.php3;
|
||||||
|
libraries/kanji-encoding.lib.php3; libraries/sqlparser.lib.php3
|
||||||
|
libraries/string.lib.php3; user_password.php3: coding standards.
|
||||||
|
* libraries/auth/cookie.auth.php3: fixes a PHP3 bug.
|
||||||
|
|
||||||
2002-10-25 Marc Delisle <lem9@users.sourceforge.net>
|
2002-10-25 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* Documentation.html, clarification about using Relation View
|
* Documentation.html, clarification about using Relation View
|
||||||
|
|
||||||
|
@@ -1497,7 +1497,7 @@ if (typeof(document.getElementById) != 'undefined'
|
|||||||
&& strpos(' ' . $lang, 'ja-')
|
&& strpos(' ' . $lang, 'ja-')
|
||||||
&& file_exists('./libraries/kanji-encoding.lib.php3')) {
|
&& file_exists('./libraries/kanji-encoding.lib.php3')) {
|
||||||
include('./libraries/kanji-encoding.lib.php3');
|
include('./libraries/kanji-encoding.lib.php3');
|
||||||
define('PMA_MULTIBYTE_ENCODING',1);
|
define('PMA_MULTIBYTE_ENCODING', 1);
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
} // $__PMA_COMMON_LIB__
|
} // $__PMA_COMMON_LIB__
|
||||||
|
@@ -578,10 +578,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
} else {
|
} else {
|
||||||
//$is_in_sort = eregi('[[:space:]](`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
|
//$is_in_sort = eregi('[[:space:]](`?)' . str_replace('\\', '\\\\', $fields_meta[$i]->name) . '(`?)[ ,$]', $sql_order);
|
||||||
$pattern = str_replace('\\', '\\\\', $fields_meta[$i]->name);
|
$pattern = str_replace('\\', '\\\\', $fields_meta[$i]->name);
|
||||||
$pattern = str_replace('(','\(', $pattern);
|
$pattern = str_replace('(', '\(', $pattern);
|
||||||
$pattern = str_replace(')','\)', $pattern);
|
$pattern = str_replace(')', '\)', $pattern);
|
||||||
$is_in_sort = eregi('[[:space:]](`?)' . $pattern . '(`?)[ ,$]', $sql_order);
|
$is_in_sort = eregi('[[:space:]](`?)' . $pattern . '(`?)[ ,$]', $sql_order);
|
||||||
|
|
||||||
}
|
}
|
||||||
// 2.1.3 Checks if the table name is required (it's the case
|
// 2.1.3 Checks if the table name is required (it's the case
|
||||||
// for a query with a "JOIN" statement and if the column
|
// for a query with a "JOIN" statement and if the column
|
||||||
|
@@ -149,6 +149,5 @@ if (!defined('PMA_ENCODING_LIB_INCLUDED')) {
|
|||||||
|
|
||||||
PMA_internal_enc_check();
|
PMA_internal_enc_check();
|
||||||
|
|
||||||
|
|
||||||
} // $__PMA_ENCODING_LIB_INCLUDED
|
} // $__PMA_ENCODING_LIB_INCLUDED
|
||||||
?>
|
?>
|
||||||
|
@@ -513,12 +513,12 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
$t_suffix = '_functionName';
|
$t_suffix = '_functionName';
|
||||||
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_column_type, $PMA_SQPdata_column_type_cnt)) {
|
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_column_type, $PMA_SQPdata_column_type_cnt)) {
|
||||||
$t_suffix = '_columnType';
|
$t_suffix = '_columnType';
|
||||||
//temporary fix for BUG #621357
|
// Temporary fix for BUG #621357
|
||||||
//TODO FIX PROPERLY NEEDS OVERHAUL OF SQL TOKENIZER
|
// TODO FIX PROPERLY NEEDS OVERHAUL OF SQL TOKENIZER
|
||||||
if($d_cur_upper == 'SET' && $t_next != 'punct_bracket_open_round') {
|
if ($d_cur_upper == 'SET' && $t_next != 'punct_bracket_open_round') {
|
||||||
$t_suffix = '_reservedWord';
|
$t_suffix = '_reservedWord';
|
||||||
}
|
}
|
||||||
//END OF TEMPORARY FIX
|
// END OF TEMPORARY FIX
|
||||||
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_reserved_word, $PMA_SQPdata_reserved_word_cnt)) {
|
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_reserved_word, $PMA_SQPdata_reserved_word_cnt)) {
|
||||||
$t_suffix = '_reservedWord';
|
$t_suffix = '_reservedWord';
|
||||||
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_column_attrib, $PMA_SQPdata_column_attrib_cnt)) {
|
} else if (PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_column_attrib, $PMA_SQPdata_column_attrib_cnt)) {
|
||||||
@@ -528,7 +528,7 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
|
|||||||
}
|
}
|
||||||
$sql_array[$i]['type'] .= $t_suffix;
|
$sql_array[$i]['type'] .= $t_suffix;
|
||||||
}
|
}
|
||||||
}
|
} // end for
|
||||||
|
|
||||||
// Stores the size of the array inside the array, as count() is a slow
|
// Stores the size of the array inside the array, as count() is a slow
|
||||||
// operation.
|
// operation.
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
if (!defined('PMA_STR_LIB_INCLUDED')) {
|
if (!defined('PMA_STR_LIB_INCLUDED')) {
|
||||||
define('PMA_STR_LIB_INCLUDED', 1);
|
define('PMA_STR_LIB_INCLUDED', 1);
|
||||||
|
|
||||||
//this is for handling input better
|
// This is for handling input better
|
||||||
if(defined('PMA_MULTIBYTE_ENCODING')) {
|
if (defined('PMA_MULTIBYTE_ENCODING')) {
|
||||||
$GLOBALS['PMA_strlen'] = 'mb_strlen';
|
$GLOBALS['PMA_strlen'] = 'mb_strlen';
|
||||||
$GLOBALS['PMA_strpos'] = 'mb_strpos';
|
$GLOBALS['PMA_strpos'] = 'mb_strpos';
|
||||||
$GLOBALS['PMA_strrpos'] = 'mb_strrpos';
|
$GLOBALS['PMA_strrpos'] = 'mb_strrpos';
|
||||||
@@ -32,6 +32,7 @@ if (!defined('PMA_STR_LIB_INCLUDED')) {
|
|||||||
$GLOBALS['PMA_substr'] = 'substr';
|
$GLOBALS['PMA_substr'] = 'substr';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This checks if a string actually exists inside another string
|
* This checks if a string actually exists inside another string
|
||||||
* We try to do it in a PHP3-portable way.
|
* We try to do it in a PHP3-portable way.
|
||||||
@@ -242,9 +243,8 @@ if (!defined('PMA_STR_LIB_INCLUDED')) {
|
|||||||
/**
|
/**
|
||||||
* Checks if a character is an accented character
|
* Checks if a character is an accented character
|
||||||
*
|
*
|
||||||
* @note Presently this only works for some
|
* @note Presently this only works for some character sets. More work
|
||||||
* character sets. More work may be
|
* may be needed to fix it.
|
||||||
* needed to fix it.
|
|
||||||
*
|
*
|
||||||
* @param string character to check for
|
* @param string character to check for
|
||||||
*
|
*
|
||||||
@@ -255,7 +255,6 @@ if (!defined('PMA_STR_LIB_INCLUDED')) {
|
|||||||
*/
|
*/
|
||||||
function PMA_STR_isAccented($c)
|
function PMA_STR_isAccented($c)
|
||||||
{
|
{
|
||||||
|
|
||||||
$ord_min1 = 192; //ord('A');
|
$ord_min1 = 192; //ord('A');
|
||||||
$ord_max1 = 214; //ord('Z');
|
$ord_max1 = 214; //ord('Z');
|
||||||
$ord_min2 = 216; //ord('A');
|
$ord_min2 = 216; //ord('A');
|
||||||
|
@@ -107,13 +107,13 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5)
|
|||||||
// Displays the form
|
// Displays the form
|
||||||
?>
|
?>
|
||||||
<form method="post" action="./user_password.php3" name="chgPassword" onsubmit="return checkPassword(this)">
|
<form method="post" action="./user_password.php3" name="chgPassword" onsubmit="return checkPassword(this)">
|
||||||
|
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
||||||
|
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
|
<input type="radio" name="nopass" value="1" onclick="pma_pw.value = ''; pma_pw2.value = ''; this.checked = true" />
|
||||||
<?php echo $GLOBALS['strNoPassword'] . "\n"; ?>
|
<?php echo $GLOBALS['strNoPassword'] . "\n"; ?>
|
||||||
<input type="hidden" name="lang" value="<?php echo $lang; ?>" />
|
|
||||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
Reference in New Issue
Block a user