Ignore:
Timestamp:
Nov 23, 2010, 3:59:11 PM (13 years ago)
Author:
patdenice
Message:

Rollback to r7452

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/admin/add_module.php

    r7540 r7855  
    99load_language('plugin.lang', STUFFS_PATH);
    1010
    11 if (!isset($_GET['type']) or ($_GET['type'] != 'MainBlock' and !is_dir(STUFFS_PATH . 'modules/' . $_GET['type'])))
     11if (!isset($_GET['type']) or !is_dir(STUFFS_PATH . 'modules/' . $_GET['type']))
    1212{
    1313  die('Wrong parameters...');
     
    2424if (isset($_POST['submit']) and !is_adviser())
    2525{
    26   @include(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');
     26  include(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');
    2727  if (empty($page['errors']))
    2828  {
    29     if ($type == 'MainBlock')
    30     {
    31       $_POST['module_name'] = 'MainBlock';
    32       $_POST['show_title'] = true;
    33       $_POST['on_home'] = true;
    34       $_POST['on_cats'] = true;
    35       $_POST['on_picture'] = true;
    36     }
    3729    if (empty($_POST['module_name']))
    3830    {
     
    113105  $template->assign(array(
    114106    'STUFFS_TITLE' => l10n('stuffs_edit_mod') . ' <i>' . trigger_event('render_stuffs_name', $module['name']) . '</i>',
    115     'MODULE_ID' => $_GET['edit'],
    116107    'MODULE_NAME' => $module['name'],
    117108    'DESC_VALUE' => (isset($module['descr']) ? $module['descr'] : ''),
     
    148139
    149140// Configuration du module
    150 @include_once(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');
     141include_once(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');
    151142
    152143$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/template/add_module.tpl'));
Note: See TracChangeset for help on using the changeset viewer.