diff options
author | Andrew Dolgov <[email protected]> | 2013-04-17 16:23:15 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-17 16:48:41 +0400 |
commit | 6322ac79a020ab584d412d782d62b2ee77d7c6cf (patch) | |
tree | b2e64a140a3bc9d9ce649ee67f8a687b6511d9f4 /include/sanity_check.php | |
parent | aca75cb5cb323535099c7aef46a78ea3cec082f2 (diff) |
remove $link
Diffstat (limited to 'include/sanity_check.php')
-rw-r--r-- | include/sanity_check.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php index 29de4ff5e..0477efd50 100644 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -21,7 +21,7 @@ return $url_path; } - function initial_sanity_check($link) { + function initial_sanity_check() { $errors = array(); @@ -88,14 +88,10 @@ } if (SINGLE_USER_MODE) { - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); + $result = db_query( "SELECT id FROM ttrss_users WHERE id = 1"); - if ($link) { - $result = db_query($link, "SELECT id FROM ttrss_users WHERE id = 1"); - - if (db_num_rows($result) != 1) { - array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found."); - } + if (db_num_rows($result) != 1) { + array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found."); } } @@ -202,6 +198,6 @@ } } - initial_sanity_check($link); + initial_sanity_check(); ?> |