Changeset 1293
- Timestamp:
- 03/10/10 15:06:06 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/content/plugins/sb_base/libs/SbBaseFunctions.php
r1217 r1293 129 129 $end = date('YmdHis', strtotime($upcoming_duration)); // should be negative 130 130 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 131 $h->vars['orderby'] = "post_votes_up DESC ";131 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 132 132 } 133 133 elseif ($type == 'top-24-hours') … … 138 138 $end = date('YmdHis', strtotime("-1 day")); 139 139 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 140 $h->vars['orderby'] = "post_votes_up DESC ";140 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 141 141 } 142 142 elseif ($type == 'top-48-hours') … … 147 147 $end = date('YmdHis', strtotime("-2 days")); 148 148 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 149 $h->vars['orderby'] = "post_votes_up DESC ";149 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 150 150 } 151 151 elseif ($type == 'top-7-days') … … 156 156 $end = date('YmdHis', strtotime("-7 days")); 157 157 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 158 $h->vars['orderby'] = "post_votes_up DESC ";158 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 159 159 } 160 160 elseif ($type == 'top-30-days') … … 165 165 $end = date('YmdHis', strtotime("-30 days")); 166 166 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 167 $h->vars['orderby'] = "post_votes_up DESC ";167 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 168 168 } 169 169 elseif ($type == 'top-365-days') … … 174 174 $end = date('YmdHis', strtotime("-365 days")); 175 175 $h->vars['filter']['(post_date >= %s AND post_date <= %s)'] = array($end, $start); 176 $h->vars['orderby'] = "post_votes_up DESC ";176 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 177 177 } 178 178 elseif ($type == 'top-all-time') … … 180 180 // Filters page to "top" stories in order of votes 181 181 $h->vars['filter']['post_status = %s'] = 'top'; 182 $h->vars['orderby'] = "post_votes_up DESC ";182 $h->vars['orderby'] = "post_votes_up DESC, post_date DESC"; 183 183 } 184 184 elseif ($type == 'top')
Note: See TracChangeset
for help on using the changeset viewer.