remove wrapper function

This commit is contained in:
Marc Delisle
2008-07-11 15:32:51 +00:00
parent 9be515d042
commit 92a26af9bb
2 changed files with 7 additions and 22 deletions

View File

@@ -322,7 +322,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} // end if } // end if
// Checks for something inside quotation marks // Checks for something inside quotation marks
if (PMA_STR_strInStr($c, $quote_list)) { if ($GLOBALS['PMA_strpos']($quote_list, $c) !== false) {
$startquotepos = $count2; $startquotepos = $count2;
$quotetype = $c; $quotetype = $c;
$count2++; $count2++;
@@ -385,21 +385,21 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
// Checks for brackets // Checks for brackets
if (PMA_STR_strInStr($c, $bracket_list)) { if ($GLOBALS['PMA_strpos']($bracket_list, $c) !== false) {
// All bracket tokens are only one item long // All bracket tokens are only one item long
$this_was_bracket = true; $this_was_bracket = true;
$count2++; $count2++;
$type_type = ''; $type_type = '';
if (PMA_STR_strInStr($c, '([{')) { if ($GLOBALS['PMA_strpos']('([{', $c) !== false) {
$type_type = 'open'; $type_type = 'open';
} else { } else {
$type_type = 'close'; $type_type = 'close';
} }
$type_style = ''; $type_style = '';
if (PMA_STR_strInStr($c, '()')) { if ($GLOBALS['PMA_strpos']('()', $c) !== false) {
$type_style = 'round'; $type_style = 'round';
} elseif (PMA_STR_strInStr($c, '[]')) { } elseif ($GLOBALS['PMA_strpos']('[]', $c) !== false) {
$type_style = 'square'; $type_style = 'square';
} else { } else {
$type_style = 'curly'; $type_style = 'curly';
@@ -540,8 +540,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
// Checks for punct // Checks for punct
if (PMA_STR_strInStr($c, $allpunct_list)) { if ($GLOBALS['PMA_strpos']($allpunct_list, $c) !== false) {
while (($count2 < $len) && PMA_STR_strInStr($GLOBALS['PMA_substr']($sql, $count2, 1), $allpunct_list)) { while (($count2 < $len) && $GLOBALS['PMA_strpos']($allpunct_list, $GLOBALS['PMA_substr']($sql, $count2, 1)) !== false) {
$count2++; $count2++;
} }
$l = $count2 - $count1; $l = $count2 - $count1;

View File

@@ -63,21 +63,6 @@ if (@extension_loaded('ctype')) {
require './libraries/string_type_native.lib.php'; require './libraries/string_type_native.lib.php';
} }
/**
* This checks if a string actually exists inside another string
* We don't care about the position it is in.
*
* @uses PMA_STR_pos()
* @param string string to search for
* @param string string to search in
* @return boolean whether the needle is in the haystack or not
* @todo rename PMA_STR_inStr()
*/
function PMA_STR_strInStr($needle, $haystack)
{
return $GLOBALS['PMA_strpos']($haystack, $needle) !== false;
} // end of the "PMA_STR_strInStr()" function
/** /**
* Checks if a given character position in the string is escaped or not * Checks if a given character position in the string is escaped or not
* *