Changeset 5367


Ignore:
Timestamp:
03/25/10 23:38:09 (10 years ago)
Author:
patdenice
Message:

Move set_tabsheet function for plugins pages to plugins class.

Location:
trunk/admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_plugins.inc.php

    r5196 r5367  
    4444  return $url; 
    4545} 
    46  
    47 /** 
    48  * Set tabsheet for plugins pages. 
    49  * @param string selected page. 
    50  */ 
    51 function set_plugins_tabsheet($selected) 
    52 { 
    53   include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
    54  
    55   $link = get_root_url().'admin.php?page='; 
    56  
    57   $tabsheet = new tabsheet(); 
    58   $tabsheet->add('plugins_list', l10n('Plugin list'), $link.'plugins_list'); 
    59   $tabsheet->add('plugins_update', l10n('Check for updates'), $link.'plugins_update'); 
    60   $tabsheet->add('plugins_new', l10n('Other plugins'), $link.'plugins_new'); 
    61   $tabsheet->select($selected); 
    62   $tabsheet->assign(); 
    63 } 
    6446?> 
  • trunk/admin/include/plugins.class.php

    r5196 r5367  
    3939      $this->db_plugins_by_id[$db_plugin['id']] = $db_plugin; 
    4040    } 
     41  } 
     42 
     43  /** 
     44   * Set tabsheet for plugins pages. 
     45   * @param string selected page. 
     46   */ 
     47  function set_tabsheet($selected) 
     48  { 
     49    include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 
     50 
     51    $link = get_root_url().'admin.php?page='; 
     52 
     53    $tabsheet = new tabsheet(); 
     54    $tabsheet->add('plugins_list', l10n('Plugin list'), $link.'plugins_list'); 
     55    $tabsheet->add('plugins_update', l10n('Check for updates'), $link.'plugins_update'); 
     56    $tabsheet->add('plugins_new', l10n('Other plugins'), $link.'plugins_new'); 
     57    $tabsheet->select($selected); 
     58    $tabsheet->assign(); 
    4159  } 
    4260 
  • trunk/admin/plugins_list.php

    r5196 r5367  
    5555 
    5656//--------------------------------------------------------------------Tabsheet 
    57 set_plugins_tabsheet($page['page']); 
     57$plugins->set_tabsheet($page['page']); 
    5858 
    5959//---------------------------------------------------------------Order options 
  • trunk/admin/plugins_new.php

    r5297 r5367  
    7777 
    7878//--------------------------------------------------------------------Tabsheet 
    79 set_plugins_tabsheet($page['page']); 
     79$plugins->set_tabsheet($page['page']); 
    8080 
    8181//---------------------------------------------------------------Order options 
  • trunk/admin/plugins_update.php

    r5196 r5367  
    9696 
    9797//--------------------------------------------------------------------Tabsheet 
    98 set_plugins_tabsheet($page['page']); 
     98$plugins->set_tabsheet($page['page']); 
    9999 
    100100// +-----------------------------------------------------------------------+ 
Note: See TracChangeset for help on using the changeset viewer.