Changeset 2653:8df9de885370 for plugins/widgets/_widgets_functions.php
- Timestamp:
- 02/07/14 14:35:17 (12 years ago)
- Branch:
- default
- Children:
- 2656:95fe4eacc716, 2657:264ffd49d238
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/_widgets_functions.php
r2605 r2653 125 125 public static function bestof($w) 126 126 { 127 global $core ;127 global $core, $_ctx; 128 128 129 129 if (($w->homeonly == 1 && $core->url->type != 'default') || … … 150 150 151 151 while ($rs->fetch()) { 152 $res .= ' <li><a href="'.$rs->getURL().'">'.html::escapeHTML($rs->post_title).'</a></li> '; 152 $class = ''; 153 if ($core->url->type == 'post' && $_ctx->posts instanceof record && $_ctx->posts->post_id == $rs->post_id) { 154 $class = ' class="post-current"'; 155 } 156 $res .= ' <li'.$class.'><a href="'.$rs->getURL().'">'.html::escapeHTML($rs->post_title).'</a></li> '; 153 157 } 154 158 … … 314 318 public static function lastposts($w) 315 319 { 316 global $core ;320 global $core, $_ctx; 317 321 318 322 if (($w->homeonly == 1 && $core->url->type != 'default') || … … 356 360 357 361 while ($rs->fetch()) { 358 $res .= '<li><a href="'.$rs->getURL().'">'. 362 $class = ''; 363 if ($core->url->type == 'post' && $_ctx->posts instanceof record && $_ctx->posts->post_id == $rs->post_id) { 364 $class = ' class="post-current"'; 365 } 366 $res .= '<li'.$class.'><a href="'.$rs->getURL().'">'. 359 367 html::escapeHTML($rs->post_title).'</a></li>'; 360 368 }
Note: See TracChangeset
for help on using the changeset viewer.