Changeset 9575


Ignore:
Timestamp:
Mar 8, 2011, 4:33:19 PM (14 years ago)
Author:
patdenice
Message:

Level permission was not saved.

Location:
extensions/PWG_Stuffs/admin
Files:
2 edited

Legend:

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

    r9410 r9575  
    3535        $users = !empty($_POST['users']) ? '"' . implode(',', $_POST['users']) . '"' : '""';
    3636      }
     37      $level = !empty($_POST['level']) ? $_POST['level'] : 0;
    3738      $show_title = isset($_POST['show_title']) ? '"true"' : '"false"';
    3839      $on_home = isset($_POST['on_home'])  ? '"true"' : '"false"';
     
    5253    users=' . $users . ',
    5354    groups=' . $groups . ',
     55    level=' . $level . ',
    5456    show_title=' . $show_title .',
    5557    on_home=' . $on_home .',
     
    7274
    7375        $query = '
    74 INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, path, datas, users, groups, show_title, on_home, on_root, on_cats, on_picture, id_line, width )
     76INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, path, datas, users, groups, level, show_title, on_home, on_root, on_cats, on_picture, id_line, width )
    7577VALUES (' . $next_element_id . ' ,
    7678  ' . $pos . ',
     
    8183  ' . $users . ',
    8284  ' . $groups . ',
     85  ' . $level . ',
    8386  ' . $show_title . ',
    8487  ' . $on_home . ',
  • extensions/PWG_Stuffs/admin/config.inc.php

    r9383 r9575  
    2323    pwg_query('UPDATE '.STUFFS_TABLE.' SET groups = NULL;');
    2424  }
     25  if ($conf['Stuffs']['level_perm'] and !isset($_POST['level_perm']))
     26  {
     27    pwg_query('UPDATE '.STUFFS_TABLE.' SET level = 0;');
     28  }
    2529
    2630  $params = array('group_perm', 'user_perm', 'level_perm');
Note: See TracChangeset for help on using the changeset viewer.