summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-16 10:07:24 -0400
committerczaks <marcin@6irc.net>2013-08-16 10:07:24 -0400
commit146243c473f24e6b86e711dd1afeebfcdd711af7 (patch)
tree9b50f4b5bf76ada14b29cd9b672758f37522bd03 /post.php
parentc2ffd324369dc8db4f67e6f035ccc335b3b20be7 (diff)
parent0565e2119d54cb4be8c6931ee42acfb586188893 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: inc/config.php inc/display.php inc/functions.php
Diffstat (limited to 'post.php')
-rw-r--r--post.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/post.php b/post.php
index 6721e804..ce45ea52 100644
--- a/post.php
+++ b/post.php
@@ -424,7 +424,16 @@ if (isset($_POST['delete'])) {
$post['body'] = escape_markup_modifiers($post['body']);
if ($mod && isset($post['raw']) && $post['raw']) {
- $post['body'] = '<tinyboard raw html>' . $post['body'] . '</tinyboard>';
+ $post['body'] .= '<tinyboard raw html>1</tinyboard>';
+ }
+
+ if ($config['country_flags']) {
+ if (!geoip_db_avail(GEOIP_COUNTRY_EDITION)) {
+ error('GeoIP not available: ' . geoip_db_filename(GEOIP_COUNTRY_EDITION));
+ }
+ if ($country_code = @geoip_country_code_by_name($_SERVER['REMOTE_ADDR'])) {
+ $post['body'] .= '<tinyboard flag>' . strtolower($country_code) . '</tinyboard>';
+ }
}
if (mysql_version() >= 50503) {