mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-30 19:11:28 +00:00
add Public_Handler
misc code cleanup
This commit is contained in:
@@ -61,7 +61,7 @@ function db_query($link, $query, $die_on_error = true) {
|
||||
if (!$result) {
|
||||
$query = htmlspecialchars($query); // just in case
|
||||
if ($die_on_error) {
|
||||
die("Query <i>$query</i> failed [$result]: " . pg_last_error($link));
|
||||
die("Query <i>$query</i> failed [$result]: " . ($link ? pg_last_error($link) : "No connection"));
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
@@ -70,7 +70,7 @@ function db_query($link, $query, $die_on_error = true) {
|
||||
if (!$result) {
|
||||
$query = htmlspecialchars($query);
|
||||
if ($die_on_error) {
|
||||
die("Query <i>$query</i> failed: " . mysql_error($link));
|
||||
die("Query <i>$query</i> failed: " . ($link ? mysql_error($link) : "No connection"));
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user