- // next we add the inactive plugins
- if (!$this->readonly)
- {
- foreach ($available as $plugname => $plugcache)
- {
- if ( ($plugcache['status'] == PLUG_AVAILABLE) ||
- (($plugcache['status'] == PLUG_DISABLED) && !$this->plug_barrel) )
- {
- $plugentry = $plugcache;
- $plugentry['icon'] = $globals->icons->get_action_icon('plugins');
- $type = $plugentry['type'];
- if (empty($plugs[$type])) {
- $plugs[$type] = array();
- }
- array_push($plugs[$type], $plugentry);
- }
+ if (!empty($o_plugs[$type])) {
+ $plugentry['move_up'] = 1;
+ $last = count($o_plugs[$type]) - 1;
+ $o_plugs[$type][$last]['move_down'] = 1;
+ } else {
+ $o_plugs[$type] = array();