* @param string
* @param Min_DB
* @param float
+* @param bool
* @return array
*/
-function get_key_vals($query, $connection2 = null, $timeout = 0) {
+function get_key_vals($query, $connection2 = null, $timeout = 0, $set_keys = true) {
global $connection;
if (!is_object($connection2)) {
$connection2 = $connection;
$connection2->timeout = 0;
if (is_object($result)) {
while ($row = $result->fetch_row()) {
- $return[$row[0]] = $row[1];
+ if ($set_keys) {
+ $return[$row[0]] = $row[1];
+ } else {
+ $return[] = $row[0];
+ }
}
}
return $return;
}
ob_flush();
flush();
- $return = @get_key_vals($query, $connection2, $timeout); // @ - may be killed
+ $return = @get_key_vals($query, $connection2, $timeout, false); // @ - may be killed
if ($connection2) {
echo script("clearTimeout(timeout);");
ob_flush();
flush();
}
- return array_keys($return);
+ return $return;
}
/** Generate BREACH resistant CSRF token