Revision | 3eac8110d96ae9ef5c0f51bc07b99f533e25ecde (tree) |
---|---|
Time | 2017-10-25 20:50:54 |
Author | umorigu <umorigu@gmai...> |
Commiter | umorigu |
BugTrack/693 calendar_viewer plugin: Extend the show limit (1 to 4)
@@ -17,6 +17,10 @@ define('PLUGIN_CALENDAR_VIEWER_DATE_FORMAT', | ||
17 | 17 | // '[Y-m-d]' // '[2004-02-09]' |
18 | 18 | 'Y/n/j ($\w)' // '2004/2/9 (Mon)' |
19 | 19 | ); |
20 | +/** | |
21 | + * Limit of show count per pagename | |
22 | + */ | |
23 | +define('PLUGIN_CALENDAR_VIEWER_MAX_SHOW_COUNT', 4); | |
20 | 24 | |
21 | 25 | // ---- |
22 | 26 |
@@ -106,7 +110,7 @@ function plugin_calendar_viewer_convert() | ||
106 | 110 | $show_count[$pagename] = 0; |
107 | 111 | } |
108 | 112 | $show_count[$pagename] += 1; |
109 | - if ($show_count[$pagename] > 4) { | |
113 | + if ($show_count[$pagename] > PLUGIN_CALENDAR_VIEWER_MAX_SHOW_COUNT) { | |
110 | 114 | $s_page = htmlsc($pagename); |
111 | 115 | return "#calendar_viewer(): Exceeded the limit of show count: $s_page<br />"; |
112 | 116 | } |