From ff39a1df914b26e1486970bc5e53c3251dba508d Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:26:30 +0000 Subject: [PATCH 1/7] explicit sorting for PM list --- ext/pm/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/pm/main.php b/ext/pm/main.php index 20935c90..3aa8b9d7 100644 --- a/ext/pm/main.php +++ b/ext/pm/main.php @@ -178,7 +178,8 @@ class PrivMsg extends Extension { SELECT private_message.*,user_from.name AS from_name FROM private_message JOIN users AS user_from ON user_from.id=from_id - WHERE to_id = :toid", + WHERE to_id = :toid + ORDER BY sent_date DESC", array("toid" => $user->id)); $pms = array(); foreach($arr as $pm) { From 279c3dd61a81870d98fd06f4222e8786a5c30a8f Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:26:55 +0000 Subject: [PATCH 2/7] max-width 100% for images inside comments --- ext/comment/style.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/comment/style.css b/ext/comment/style.css index e9052376..555dfad9 100644 --- a/ext/comment/style.css +++ b/ext/comment/style.css @@ -4,6 +4,9 @@ position: relative; word-wrap: break-word; } +.comment IMG { + max-width: 100%; +} .comment .info { visibility: hidden; text-align: center; From 4fe7855a70c5749bd4b791983f4344cee9c7456d Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:27:25 +0000 Subject: [PATCH 3/7] nicer formatting for tag history log --- ext/tag_history/main.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php index b6fe5cea..e67b7ac0 100644 --- a/ext/tag_history/main.php +++ b/ext/tag_history/main.php @@ -261,10 +261,11 @@ class Tag_History extends Extension { } if(count($select_code) == 0) { + log_error("tag_history", "Tried to mass revert without any conditions"); return; } - log_info("tag_history", 'Attempting to revert edits where '.implode(" and ", $select_code)." / ".implode(" and ", $select_args)); + log_info("tag_history", 'Attempting to revert edits where '.implode(" and ", $select_code)." (".implode(" / ", $select_args).")"); // Get all the images that the given IP has changed tags on (within the timeframe) that were last editied by the given IP $result = $database->get_col(' From e69b72dfd3cab5edaa84ec7df9f861acfe51e1d7 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:27:37 +0000 Subject: [PATCH 4/7] only use >> quotes at the start of lines --- ext/bbcode/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 8b613af7..cfa240b9 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -33,7 +33,7 @@ class BBCode extends FormatterExtension { ) as $el) { $text = preg_replace("!\[$el\](.*?)\[/$el\]!s", "<$el>$1", $text); } - $text = preg_replace('!>>([^\d].+)!', '
$1
', $text); + $text = preg_replace('!^>>([^\d].+)!', '
$1
', $text); $text = preg_replace('!>>(\d+)(#c?\d+)?!s', '>>$1$2', $text); $text = preg_replace('!\[url=site://(.*?)(#c\d+)?\](.*?)\[/url\]!s', '$3', $text); $text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '$1$2', $text); From ffdca16b30e82cd5c6126e6c96e0eeb2d351fac7 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:35:59 +0000 Subject: [PATCH 5/7] read-ness column on PM table, for sorting --- ext/pm/theme.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ext/pm/theme.php b/ext/pm/theme.php index 14414b4e..a248be50 100644 --- a/ext/pm/theme.php +++ b/ext/pm/theme.php @@ -6,7 +6,7 @@ class PrivMsgTheme extends Themelet { $html = " - + "; $n = 0; foreach($pms as $pm) { @@ -18,14 +18,21 @@ class PrivMsgTheme extends Themelet { $pm_url = make_link("pm/read/".$pm->id); $del_url = make_link("pm/delete"); $h_date = html_escape($pm->sent_date); - if(!$pm->is_read) $h_subject = "$h_subject"; - $html .= " + $readYN = "Y"; + if(!$pm->is_read) { + $h_subject = "$h_subject"; + $readYN = "N"; + } + $html .= " + + "; + + "; } $html .= " From 5056ac27893a10b8c35ff4202a1db1491f8e3685 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 9 Feb 2013 10:36:58 +0000 Subject: [PATCH 6/7] make sortable tables slightly more obvious --- lib/shimmie.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/shimmie.css b/lib/shimmie.css index 958e8dd9..8b350783 100644 --- a/lib/shimmie.css +++ b/lib/shimmie.css @@ -14,7 +14,11 @@ TABLE.form TBODY TD {text-align: left;} TABLE.form TBODY TH {text-align: right; padding-right: 4px; width: 1%;} TABLE.form TD + TH {padding-left: 8px;} -*[onclick],H3[class~="shm-toggler"] {cursor: pointer;} +*[onclick], +H3[class~="shm-toggler"], +.sortable TH { + cursor: pointer; +} IMG {border: none;} FORM {margin: 0px;} IMG.lazy {display: none;} From 9d5fed4a94564bed0c269e8ec9ffce87f4db2a84 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 11 Feb 2013 08:15:28 +0000 Subject: [PATCH 7/7] sneaky update --- ext/pm/main.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/pm/main.php b/ext/pm/main.php index 3aa8b9d7..b18e0121 100644 --- a/ext/pm/main.php +++ b/ext/pm/main.php @@ -112,8 +112,10 @@ class PrivMsg extends Extension { } else if(($pm["to_id"] == $user->id) || $user->can("view_other_pms")) { $from_user = User::by_id(int_escape($pm["from_id"])); - $database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); - $database->cache->delete("pm-count-{$user->id}"); + if($pm["to_id"] == $user->id) { + $database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); + $database->cache->delete("pm-count-{$user->id}"); + } $this->theme->display_message($page, $from_user, $user, new PM($pm)); } else {
SubjectFromDateAction
R?SubjectFromDateAction
$h_subject
$readYN$h_subject $h_from$h_date
".$user->get_auth_html()." -