Commit MetaInfo

修订版268b4994d1b723db7dbd958d666891061df7ea31 (tree)
时间2018-05-22 05:32:56
作者umorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2455 new plugin: Backword compatibility: Keep init()

Some external plugin calls plugin_new_init() directly
and use the messages.
So we need keep this method for the compatibility.

更改概述

差异

--- a/plugin/new.inc.php
+++ b/plugin/new.inc.php
@@ -15,6 +15,16 @@
1515
1616 define('PLUGIN_NEW_DATE_FORMAT', '<span class="comment_date">%s</span>');
1717
18+function plugin_new_init()
19+{
20+ // Backword compatibility: Keep plugin_new_init() and the messages
21+ // Elapsed time => New! message with CSS
22+ $messages['_plugin_new_elapses'] = array(
23+ 60 * 60 * 24 * 1 => ' <span class="new1" title="%s">New!</span>', // 1day
24+ 60 * 60 * 24 * 5 => ' <span class="new5" title="%s">New</span>'); // 5days
25+ set_plugin_messages($messages);
26+}
27+
1828 function plugin_new_inline()
1929 {
2030 global $vars;
Show on old repository browser