• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revision268b4994d1b723db7dbd958d666891061df7ea31 (tree)
Time2018-05-22 05:32:56
Authorumorigu <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.

Change Summary

Incremental Difference

--- 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;