diff options
| author | czaks <marcin@6irc.net> | 2014-09-20 22:14:04 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-09-20 22:14:04 +0200 |
| commit | 7e8bf0ec497f4dc437369b6c5f8061c347733d84 (patch) | |
| tree | 47665ca9c7b2e9dd08d20e56cd7d827699d22ddd /inc | |
| parent | f5820d2aae45f60b6e6998b9ec2997c68a66fbf6 (diff) | |
| parent | 7288f1dec786844a159af30f0286be5912b13db6 (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/bans.php | 6 | ||||
| -rw-r--r-- | inc/config.php | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/inc/bans.php b/inc/bans.php index d5225e95..ed81c6e4 100644 --- a/inc/bans.php +++ b/inc/bans.php @@ -123,12 +123,12 @@ class Bans { $query = prepare('SELECT ``bans``.*' . ($get_mod_info ? ', `username`' : '') . ' FROM ``bans`` ' . ($get_mod_info ? 'LEFT JOIN ``mods`` ON ``mods``.`id` = `creator`' : '') . ' WHERE - (' . ($board ? '(`board` IS NULL OR `board` = :board) AND' : '') . ' + (' . ($board !== false ? '(`board` IS NULL OR `board` = :board) AND' : '') . ' (`ipstart` = :ip OR (:ip >= `ipstart` AND :ip <= `ipend`))) ORDER BY `expires` IS NULL, `expires` DESC'); - if ($board) - $query->bindValue(':board', $board); + if ($board !== false) + $query->bindValue(':board', $board, PDO::PARAM_STR); $query->bindValue(':ip', inet_pton($ip)); $query->execute() or error(db_error($query)); diff --git a/inc/config.php b/inc/config.php index 3dd8eb6c..e2cc2ebd 100644 --- a/inc/config.php +++ b/inc/config.php @@ -274,6 +274,7 @@ 'file_url', 'json_response', 'user_flag', + 'no_country' ); // Enable reCaptcha to make spam even harder. Rarely necessary. @@ -531,6 +532,9 @@ // Attach country flags to posts. $config['country_flags'] = false; + // Allow the user to decide whether or not he wants to display his country + $config['allow_no_country'] = false; + // Load all country flags from one file $config['country_flags_condensed'] = true; $config['country_flags_condensed_css'] = 'static/flags/flags.css'; |
