Ignore:
Timestamp:
Feb 28, 2011, 10:50:28 AM (13 years ago)
Author:
patdenice
Message:

Some optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/admin/manage.inc.php

    r9383 r9410  
    3737
    3838// Display
    39 $q = 'SELECT id, name, descr, path, parent, id_line, width, datas
     39$q = 'SELECT id, name, descr, path, id_line, width, datas
    4040FROM ' . STUFFS_TABLE . '
    4141ORDER BY pos ASC;';
     
    6060  $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block');
    6161
     62  $missing = false;
     63  if (!empty($module['path']))
     64  {
     65    preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match);
     66    $missing = !isset($pwg_loaded_plugins[$match[1]]);
     67  }
     68
    6269  $template->append('modules', array(
    6370    'ID' => $module['id'],
     
    7380    'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'],
    7481    'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '',
    75     'MISSING' => (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']])),
     82    'MISSING' => $missing,
    7683    )
    7784  );
Note: See TracChangeset for help on using the changeset viewer.