Permalink
Browse files

$_result is not needed for minification

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@584 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent c27a877 commit c97325b0905db1557504ffec0b998ecc5dd169cc jakubvrana committed Apr 16, 2009
Showing with 12 additions and 12 deletions.
  1. +1 −1 _compile.php
  2. +10 −10 abstraction.inc.php
  3. +1 −1 todo.txt
View
@@ -127,7 +127,7 @@ function php_shrink($input) {
} elseif ($token[0] === T_VARIABLE && !isset($special_variables[$token[1]])) {
$token[1] = '$' . $short_variables[$token[1]];
} elseif ($token[0] === T_STRING && $tokens[$i+1] === '(' && isset($defined_functions[$token[1]])
- && $tokens[$i-1][0] !== T_DOUBLE_COLON && $tokens[$i-2][0] !== T_NEW && !in_array($tokens[$i-2][1], array('_result', '$_result'), true)
+ && $tokens[$i-1][0] !== T_DOUBLE_COLON && $tokens[$i-2][0] !== T_NEW && $tokens[$i-2][1] !== '_result'
) {
$token[1] = $short_functions[$token[1]];
} elseif ($token[0] == T_CONSTANT_ENCAPSED_STRING && (($tokens[$i-1] === '(' && in_array($tokens[$i-2][1], array('array_map', 'set_exception_handler'), true)) || $token[1] == "'normalize_enum'") && isset($defined_functions[substr($token[1], 1, -1)])) {
View
@@ -191,19 +191,19 @@ function select_db($database) {
}
function query($query) {
- $_result = parent::query($query);
- if (!$_result) {
+ $result = parent::query($query);
+ if (!$result) {
$errorInfo = $this->errorInfo();
$this->error = $errorInfo[2];
return false;
}
- $this->_result = $_result;
- if (!$_result->columnCount()) {
- $this->affected_rows = $_result->rowCount();
+ $this->_result = $result;
+ if (!$result->columnCount()) {
+ $this->affected_rows = $result->rowCount();
return true;
}
- $_result->num_rows = $_result->rowCount();
- return $_result;
+ $result->num_rows = $result->rowCount();
+ return $result;
}
function multi_query($query) {
@@ -218,11 +218,11 @@ function next_result() {
return $this->_result->nextRowset();
}
- function result($_result, $field = 0) {
- if (!$_result) {
+ function result($result, $field = 0) {
+ if (!$result) {
return false;
}
- $row = $_result->fetch();
+ $row = $result->fetch();
return $row[$field];
}
View
@@ -10,4 +10,4 @@ Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.ph
? Execution time in sql.inc.php
? Save token also to cookie - for session expiration and login in other window
? Save uploaded files after error to session variable instead of hidden field
-? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB
+? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS shrink can save 1 KB

0 comments on commit c97325b

Please sign in to comment.