diff --git a/inc/display.php b/inc/display.php
index d4aa303b..0f1bc195 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -354,6 +354,10 @@ class Post {
return $built;
}
+ public function ratio() {
+ return fraction($this->filewidth, $this->fileheight, ':');
+ }
+
public function build($index=false) {
global $board, $config;
@@ -473,6 +477,10 @@ class Thread {
return $built;
}
+ public function ratio() {
+ return fraction($this->filewidth, $this->fileheight, ':');
+ }
+
public function build($index=false, $isnoko50=false) {
global $board, $config, $debug;
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 6059fefe..8f2ce843 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1388,7 +1388,7 @@ function mod_edit_post($board, $edit_raw_html, $postID) {
$query->bindValue(':subject', $_POST['subject']);
$query->bindValue(':body', $_POST['body']);
if ($edit_raw_html) {
- $body_nomarkup = $_POST['body'] . '1';
+ $body_nomarkup = $_POST['body'] . "\n1";
$query->bindValue(':body_nomarkup', $body_nomarkup);
}
$query->execute() or error(db_error($query));
diff --git a/post.php b/post.php
index ce45ea52..d2749632 100644
--- a/post.php
+++ b/post.php
@@ -424,7 +424,7 @@ if (isset($_POST['delete'])) {
$post['body'] = escape_markup_modifiers($post['body']);
if ($mod && isset($post['raw']) && $post['raw']) {
- $post['body'] .= '1';
+ $post['body'] .= "\n1";
}
if ($config['country_flags']) {
@@ -432,7 +432,8 @@ if (isset($_POST['delete'])) {
error('GeoIP not available: ' . geoip_db_filename(GEOIP_COUNTRY_EDITION));
}
if ($country_code = @geoip_country_code_by_name($_SERVER['REMOTE_ADDR'])) {
- $post['body'] .= '' . strtolower($country_code) . '';
+ $post['body'] .= "\n" . strtolower($country_code) . "" .
+ "\n" . @geoip_country_name_by_name($_SERVER['REMOTE_ADDR']) . "";
}
}
diff --git a/templates/post_reply.html b/templates/post_reply.html
index 518a8edf..65fd576c 100644
--- a/templates/post_reply.html
+++ b/templates/post_reply.html
@@ -62,8 +62,8 @@
Spoiler Image,
{% endif %}
{{ post.filesize|filesize }}
- {% if post.filex and post.filey %}
- , {{ post.filex}}x{{ post.filey }}
+ {% if post.filewidth and post.fileheight %}
+ , {{ post.filewidth}}x{{ post.fileheight }}
{% if config.show_ratio %}
, {{ post.ratio }}
{% endif %}
diff --git a/templates/post_thread.html b/templates/post_thread.html
index dc788082..adc3b64e 100644
--- a/templates/post_thread.html
+++ b/templates/post_thread.html
@@ -14,8 +14,8 @@
{% trans %}Spoiler Image{% endtrans %},
{% endif %}
{{ post.filesize|filesize }}
- {% if post.filex and post.filey %}
- , {{ post.filex}}x{{ post.filey }}
+ {% if post.filewidth and post.fileheight %}
+ , {{ post.filewidth}}x{{ post.fileheight }}
{% if config.show_ratio %}
, {{ post.ratio }}
{% endif %}