Dotclear


Ignore:
Timestamp:
06/19/14 16:56:47 (11 years ago)
Author:
Dsls
Branch:
default
Message:

One step further towards php hardcoded links annihilation in admin sources, more to come...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r2614 r2720  
    6666 
    6767               if ($core->auth->getBlogCount() > 20) { 
    68                     $blog_box .= ' - <a href="blogs.php">'.__('Change blog').'</a>'; 
     68                    $blog_box .= ' - <a href="'.$core->adminurl->get("admin.blogs").'">'.__('Change blog').'</a>'; 
    6969               } 
    7070               $blog_box .= '</p>'; 
     
    137137          '</ul>'."\n". 
    138138          '<div id="header">'. 
    139           '<h1><a href="index.php"><span class="hidden">'.DC_VENDOR_NAME.'</span></a></h1>'."\n"; 
    140  
    141           echo 
    142           '<form action="index.php" method="post" id="top-info-blog">'. 
     139          '<h1><a href="'.$core->adminurl->get("admin.home").'"><span class="hidden">'.DC_VENDOR_NAME.'</span></a></h1>'."\n"; 
     140 
     141          echo 
     142          '<form action="'.$core->adminurl->get("admin.home").'" method="post" id="top-info-blog">'. 
    143143          $blog_box. 
    144144          '<p><a href="'.$core->blog->url.'" class="outgoing" title="'.__('Go to site'). 
     
    146146          '</p></form>'. 
    147147          '<ul id="top-info-user">'. 
    148           '<li><a class="'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="index.php">'.__('My dashboard').'</a></li>'. 
     148          '<li><a class="'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="'.$core->adminurl->get("admin.home").'">'.__('My dashboard').'</a></li>'. 
    149149          '<li><a class="smallscreen'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' active' : ''). 
    150           '" href="preferences.php">'.__('My preferences').'</a></li>'. 
    151           '<li><a href="index.php?logout=1" class="logout"><span class="nomobile">'.sprintf(__('Logout %s'),$core->auth->userID()). 
     150          '" href="'.$core->adminurl->get("admin.user.preferences").'">'.__('My preferences').'</a></li>'. 
     151          '<li><a href="'.$core->adminurl->get("admin.home",array('logout' => 1)).'" class="logout"><span class="nomobile">'.sprintf(__('Logout %s'),$core->auth->userID()). 
    152152          '</span><img src="images/logout.png" alt="" /></a></li>'. 
    153153          '</ul>'. 
     
    255255          if (!$GLOBALS['__resources']['ctxhelp']) { 
    256256               echo 
    257                '<p id="help-button"><a href="help.php" class="outgoing" title="'. 
     257               '<p id="help-button"><a href="'.$core->adminurl->get("admin.help").'" class="outgoing" title="'. 
    258258               __('Global help').'">'.__('Global help').'</a></p>'; 
    259259          } 
     
    267267          '<div id="main-menu">'."\n". 
    268268 
    269           '<form id="search-menu" action="search.php" method="get">'. 
     269          '<form id="search-menu" action="'.$core->adminurl->get("admin.search").'" method="get">'. 
    270270          '<p><label for="qx" class="hidden">'.__('Search:').' </label>'.form::field('qx',30,255,''). 
    271271          '<input type="submit" value="'.__('OK').'" /></p>'. 
     
    374374     public static function breadcrumb($elements=null,$options=array()) 
    375375     { 
     376          global $core; 
    376377          $with_home_link = isset($options['home_link'])?$options['home_link']:true; 
    377378          $hl = isset($options['hl'])?$options['hl']:true; 
     
    379380          // First item of array elements should be blog's name, System or Plugins 
    380381          $res = '<h2>'.($with_home_link ? 
    381                '<a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>' : 
     382               '<a class="go_home" href="'.$core->adminurl->get("admin.home").'"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>' : 
    382383               '<img src="style/dashboard-alt.png" alt="" />'); 
    383384          $index = 0; 
     
    473474     public static function helpBlock() 
    474475     { 
     476          global $core; 
    475477          $args = func_get_args(); 
    476478 
     
    526528          '<div id="helplink"><hr />'. 
    527529          '<p>'. 
    528           sprintf(__('See also %s'),sprintf('<a href="help.php">%s</a>',__('the global help'))). 
     530          sprintf(__('See also %s'),sprintf('<a href="'.$core->adminurl->get("admin.help").'">%s</a>',__('the global help'))). 
    529531          '.</p>'. 
    530532          '</div></div>'; 
     
    829831     } 
    830832 
    831       
     833 
    832834     public static function jsToolBar() 
    833835     { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map