Ignore:
Timestamp:
Mar 1, 2011, 1:00:44 PM (13 years ago)
Author:
patdenice
Message:

Optimizations.

File:
1 edited

Legend:

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

    r9410 r9449  
    3030    pwg_query('
    3131UPDATE ' . STUFFS_TABLE . '
    32 SET datas = "'.addslashes(serialize(array('hide' => isset($_POST['hidemb'])))).'"
     32SET datas = "'.addslashes(serialize(!isset($_POST['hidemb']))).'"
    3333WHERE id=0;');
    3434
     
    6060  $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block');
    6161
    62   $missing = false;
     62  $missing_message = '';
     63  if ($module['path'] == PHPWG_PLUGINS_PATH.'piclens/stuffs_module/' and !file_exists(PICLENS_PATH.'stuffs_module/main.inc.php'))
     64  {
     65    $missing_message = l10n('stuffs_piclens_need_upgrade');
     66  }
    6367  if (!empty($module['path']))
    6468  {
    6569    preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match);
    66     $missing = !isset($pwg_loaded_plugins[$match[1]]);
     70    if (!isset($pwg_loaded_plugins[$match[1]]))
     71    {
     72      $missing_message = l10n('stuffs_parent_plugin_is_missing');
     73    }
    6774  }
    6875
     
    8087    'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'],
    8188    'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '',
    82     'MISSING' => $missing,
     89    'MISSING' => $missing_message,
    8390    )
    8491  );
    8592
    86   if (empty($module['path']) and !empty($module['datas']))
     93  if (empty($module['path']))
    8794  {
    88     $datas = unserialize($module['datas']);
    89     $template->assign('HIDEMB', $datas['hide']);
     95    $show = unserialize($module['datas']);
     96    $template->assign('HIDEMB', !$show);
    9097  }
    9198}
Note: See TracChangeset for help on using the changeset viewer.