- $cl = rcCountLink( 50, $days, $page, $more ) . ' | ' .
- rcCountLink( 100, $days, $page, $more ) . ' | ' .
- rcCountLink( 250, $days, $page, $more ) . ' | ' .
- rcCountLink( 500, $days, $page, $more ) .
- ( $doall ? ( ' | ' . rcCountLink( 0, $days, $page, $more ) ) : '' );
- $dl = rcDaysLink( $limit, 1, $page, $more ) . ' | ' .
- rcDaysLink( $limit, 3, $page, $more ) . ' | ' .
- rcDaysLink( $limit, 7, $page, $more ) . ' | ' .
- rcDaysLink( $limit, 14, $page, $more ) . ' | ' .
- rcDaysLink( $limit, 30, $page, $more ) .
- ( $doall ? ( ' | ' . rcDaysLink( $limit, 0, $page, $more ) ) : '' );
-
+
+ # Sort data for display and make sure it's unique after we've added user data.
+ $wgRCLinkLimits[] = $limit;
+ $wgRCLinkDays[] = $days;
+ sort(&$wgRCLinkLimits);
+ sort(&$wgRCLinkDays);
+ $wgRCLinkLimits = array_unique($wgRCLinkLimits);
+ $wgRCLinkDays = array_unique($wgRCLinkDays);
+
+ $cl = array();
+ foreach( $wgRCLinkLimits as $countLink ) {
+ $cl[] = rcCountLink( $countLink, $days, $page, $more, $countLink == $limit );
+ }
+ if( $doall ) $cl[] = rcCountLink( 0, $days, $page, $more );
+ $cl = implode( ' | ', $cl);
+
+ $dl = array();
+ foreach( $wgRCLinkDays as $daysLink ) {
+ $dl[] = rcDaysLink( $limit, $daysLink, $page, $more, $daysLink == $days );
+ }
+ if( $doall ) $dl[] = rcDaysLink( $limit, 0, $page, $more );
+ $dl = implode( ' | ', $dl);
+