Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/_public.php

    r1179 r2566  
    2525          $id = isset($attr['id']) ? trim($attr['id']) : ''; 
    2626          $description = isset($attr['description']) ? trim($attr['description']) : ''; 
    27            
     27 
    2828          if (!preg_match('#^(title|span)$#',$description)) { 
    2929               $description = ''; 
    3030          } 
    31            
     31 
    3232          return '<?php echo tplSimpleMenu::displayMenu('. 
    3333                    "'".addslashes($class)."',". 
     
    3636               '); ?>'; 
    3737     } 
    38       
     38 
    3939     # Widget function 
    4040     public static function simpleMenuWidget($w) 
    4141     { 
    4242          global $core, $_ctx; 
    43            
     43 
    4444          if (($w->homeonly == 1 && $core->url->type != 'default') || 
    4545               ($w->homeonly == 2 && $core->url->type == 'default')) { 
     
    5757               ($w->content_only ? '' : '</div>'); 
    5858     } 
    59       
     59 
    6060     public static function displayMenu($class='',$id='',$description='') 
    6161     { 
     
    6767          $menu = @unserialize($menu); 
    6868 
    69           if (is_array($menu))  
     69          if (is_array($menu)) 
    7070          { 
    7171               // Current relative URL 
    7272               $url = $_SERVER['REQUEST_URI']; 
    7373               $abs_url = http::getHost().$url; 
    74            
     74 
    7575               // Home recognition var 
    7676               $home_url = html::stripHostURL($GLOBALS['core']->blog->url); 
     
    8787                    # Active item test 
    8888                    $active = false; 
    89                     if (($url == $href) ||  
    90                          ($abs_url == $href) ||  
    91                          ($_SERVER['URL_REQUEST_PART'] == $href) ||  
     89                    if (($url == $href) || 
     90                         ($abs_url == $href) || 
     91                         ($_SERVER['URL_REQUEST_PART'] == $href) || 
    9292                         (($_SERVER['URL_REQUEST_PART'] == '') && (($href == $home_url) || ($href == $home_directory)))) { 
    9393                         $active = true; 
     
    123123                              '</li>'; 
    124124               } 
    125                 
     125 
    126126               // Final rendering 
    127127               if ($ret) { 
     
    133133     } 
    134134} 
    135  
    136 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map