$query .= $dumpline; // Don't count the line if in parents (text fields may include unlimited linebreaks) if (!$inparents) { $querylines++; } // Stop if query contains more lines as defined by MAX_QUERY_LINES if ($querylines > MAX_QUERY_LINES) { echo INST_getAlertMsg($LANG_BIGDUMP[14] . $linenumber . $LANG_BIGDUMP[15] . MAX_QUERY_LINES . $LANG_BIGDUMP[16]); $error = true; break; } // Execute query if end of query detected (; as last character) AND NOT in parents if (preg_match("/;\$/", trim($dumpline)) && !$inparents) { if (!TESTMODE) { if ($dbConnection instanceof mysqli && !$dbConnection->query(trim($query)) || !mysql_query(trim($query), $dbConnection)) { echo INST_getAlertMsg($LANG_BIGDUMP[17] . $linenumber . ': ' . trim($dumpline) . '.<br ' . XHTML . '>' . $LANG_BIGDUMP[18] . trim(INST_nl2br(htmlentities($query))) . '<br ' . XHTML . '>' . $LANG_BIGDUMP[19] . ($dbConnection instanceof mysqli ? $dbConnection->error : mysql_error())); $error = true; break; } $totalqueries++; $queries++; $query = ""; $querylines = 0; } $linenumber++; } } // Get the current file position if (!$error) { if (!$gzipmode) { $foffset = ftell($file);
// Add the line to query $query .= $dumpline; // Don't count the line if in parents (text fields may include unlimited linebreaks) if (!$inparents) { $querylines++; } // Stop if query contains more lines as defined by MAX_QUERY_LINES if ($querylines > MAX_QUERY_LINES) { echo INST_getAlertMsg($LANG_BIGDUMP[14] . $linenumber . $LANG_BIGDUMP[15] . MAX_QUERY_LINES . $LANG_BIGDUMP[16]); $error = true; break; } // Execute query if end of query detected (; as last character) AND NOT in parents if (preg_match("/;\$/", trim($dumpline)) && !$inparents) { if (!TESTMODE && !mysql_query(trim($query), $dbconnection)) { echo INST_getAlertMsg($LANG_BIGDUMP[17] . $linenumber . ': ' . trim($dumpline) . '.<br ' . XHTML . '>' . $LANG_BIGDUMP[18] . trim(INST_nl2br(htmlentities($query))) . '<br ' . XHTML . '>' . $LANG_BIGDUMP[19] . mysql_error()); $error = true; break; } $totalqueries++; $queries++; $query = ""; $querylines = 0; } $linenumber++; } } // Get the current file position if (!$error) { if (!$gzipmode) { $foffset = ftell($file);