]> git.joonet.de Git - adminer.git/commitdiff
Delete unused variable and method
authorJakub Vrana <jakub@vrana.cz>
Sun, 24 Jan 2016 22:25:17 +0000 (14:25 -0800)
committerJakub Vrana <jakub@vrana.cz>
Sun, 24 Jan 2016 22:25:17 +0000 (14:25 -0800)
adminer/drivers/mysql.inc.php
adminer/sql.inc.php

index 98e7bf1b02650be4cfcc044ba750a7f2c0816caa..0a919d6da19936459cbf82d0d5c0a83c7b0ce30e 100644 (file)
@@ -581,16 +581,6 @@ if (!defined("DRIVER")) {
                return h(preg_replace('~^You have an error.*syntax to use~U', "Syntax error", $connection->error));
        }
 
-       /** Get line of error
-       * @return int 0 for first line
-       */
-       function error_line() {
-               global $connection;
-               if (preg_match('~ at line ([0-9]+)$~', $connection->error, $regs)) {
-                       return $regs[1] - 1;
-               }
-       }
-
        /** Create database
        * @param string
        * @param string
index d1835f87a51ffc570d6f228fb26a772e425abb2b..a3fb5da8f01bad009238ae8f0836ad22f2ccf1a0 100644 (file)
@@ -55,7 +55,6 @@ if (!$error && $_POST) {
                }
                $commands = 0;
                $errors = array();
-               $line = 0;
                $parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : '');
                $total_start = microtime(true);
                parse_str($_COOKIE["adminer_export"], $adminer_export);
@@ -161,7 +160,6 @@ if (!$error && $_POST) {
                                                        $start = microtime(true);
                                                } while ($connection->next_result());
 
-                                               $line += substr_count($q.$found, "\n");
                                                $query = substr($query, $offset);
                                                $offset = 0;
                                        }