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/include/class.inc.php

    r7541 r7855  
    3636
    3737    $query = '
    38 SELECT id, name, type, datas, users, groups, show_title, id_line, width
     38SELECT id, name, type, datas, groups, show_title, id_line, width
    3939FROM ' . STUFFS_TABLE . '
    40 WHERE id = 0 OR (
    41   users LIKE "%' . $user['status'] . '%"
     40WHERE users LIKE "%' . $user['status'] . '%"
    4241';
    4342
     
    5554    else return;
    5655
    57     $query .= ')
     56    $query .= '
    5857ORDER BY pos ASC;';
    5958
     
    7170    foreach ($this->modules as $module)
    7271    {
    73         if (!empty($module['groups']))
    74       {
    75                 $authorized_groups = explode(',', $module['groups']);
    76                 if (array_intersect($this->user_groups, $authorized_groups) == array()) continue;
    77         }
    78 
    7972      if ($module['type'] == 'MainBlock')
    8073      {
    81         global $user;
    82         if (strpos($module['users'], $user['status']) === false)
     74                $this->pos = 'end';
     75        if (!empty($module['datas'])
     76          and $datas = unserialize($module['datas'])
     77          and $datas['hide'])
    8378        {
    8479          add_event_handler('loc_end_index', 'hide_main_block');
    8580        }
    86         $this->pos = 'end';
    8781                continue;
     82        }
     83        if (!empty($module['groups']))
     84      {
     85                $authorized_groups = explode(',', $module['groups']);
     86                if (array_intersect($this->user_groups, $authorized_groups) == array()) continue;
    8887        }
    8988
Note: See TracChangeset for help on using the changeset viewer.