Skip to content

Commit 9d14a57

Browse files
committed
Try to improve old-message clean up
1 parent e4563f7 commit 9d14a57

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

event/listener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ public function clean_message($event)
121121
return;
122122
}
123123

124-
if ($event['topic_data']['topic_first_post_id'] == $event['row']['post_id'])
124+
if ($event['topic_data']['topic_first_post_id'] == $event['row']['post_id'] && $event['topic_data']['topic_time'] < strtotime('September 1, 2017'))
125125
{
126126
$post_row = $event['post_row'];
127127
$message = $post_row['MESSAGE'];
128128

129129
// This freakish looking regex pattern should
130130
// remove the old ideas link-backs from the message.
131-
$message = preg_replace('/(<br[^>]*>\\n?)\\1-{10}\\1\\1.*/s', '', $message);
131+
$message = preg_replace('/(<br[^>]*>\\n?)\\1-{10}\\1\\1.*]/s', '', $message);
132132

133133
$post_row['MESSAGE'] = $message;
134134
$event['post_row'] = $post_row;

0 commit comments

Comments
 (0)