sqlite3 returns integers as ints
This commit is contained in:
@@ -112,7 +112,7 @@ function update_builds()
|
||||
$version = "$major.$minor.$maintenance.$build";
|
||||
$res = $DB->query(kl_str_sql("select count(*) as c from builds where nr=!i and chan=!s", $build, $chan));
|
||||
$row = $DB->fetchRow($res);
|
||||
if ($row["c"] === "0") {
|
||||
if ($row["c"] == 0) {
|
||||
$DB->query(kl_str_sql("insert into builds (nr, chan, version, file, modified) ".
|
||||
"values (!i, !s, !s, !s, !t)",
|
||||
$build, $chan, $version, $file, $modified));
|
||||
@@ -174,7 +174,7 @@ function add_build($build, $chan, $version, $hash)
|
||||
|
||||
$res = $DB->query(kl_str_sql("select count(*) as c from builds where nr=!i and chan=!s", $build, $chan));
|
||||
$row = $DB->fetchRow($res);
|
||||
if ($row["c"] === "0") {
|
||||
if ($row["c"] == 0) {
|
||||
$DB->query(kl_str_sql("insert into builds (nr, chan, version, hash, modified) ".
|
||||
"values (!i, !s, !s, !s, !t)",
|
||||
$build, $chan, $version, $hash, time() - date("Z")));
|
||||
|
||||
@@ -82,6 +82,13 @@ if (!$DB->connect($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS)) {
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
if (PHP_SAPI != "cli") {
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 600));
|
||||
header('Cache-Control: max-age=' . (4 * 3600));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/* Prevent XSS attacks via PHP_SELF */
|
||||
$_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
|
||||
|
||||
Reference in New Issue
Block a user