Remove unnecessary code

pull/41/head
Christian Schrötter 8 years ago
parent e28f3f5959
commit 846dcb756c
No known key found for this signature in database
GPG Key ID: 8038DEBE14AD09A4

@ -1429,13 +1429,10 @@ function db_query ($query, $ignore_errors = 0) {
global $DEBUG_TEXT;
$result = "";
$number_rows = "";
static $link;
$link = db_connect ();
$error_text = "";
if ($ignore_errors) $DEBUG_TEXT = "";
# mysql and pgsql $link are resources, mysqli $link is an object
if (! (is_resource($link) || is_object($link) ) ) $link = db_connect ();
if ($CONF['database_type'] == "mysql") $result = @mysql_query ($query, $link)
or $error_text = "Invalid query: " . mysql_error($link);
if ($CONF['database_type'] == "mysqli") $result = @mysqli_query ($link, $query)

Loading…
Cancel
Save