Changeset 7541 for extensions
- Timestamp:
- Nov 1, 2010, 3:30:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/include/class.inc.php
r7540 r7541 36 36 37 37 $query = ' 38 SELECT id, name, type, datas, groups, show_title, id_line, width38 SELECT id, name, type, datas, users, groups, show_title, id_line, width 39 39 FROM ' . STUFFS_TABLE . ' 40 WHERE users LIKE "%' . $user['status'] . '%" 40 WHERE id = 0 OR ( 41 users LIKE "%' . $user['status'] . '%" 41 42 '; 42 43 … … 54 55 else return; 55 56 56 if (!$page['is_homepage']) 57 { 58 $query .= ' OR id = 0'; 59 } 60 61 $query .= ' 57 $query .= ') 62 58 ORDER BY pos ASC;'; 63 59 … … 75 71 foreach ($this->modules as $module) 76 72 { 77 if ($module['type'] == 'MainBlock')78 {79 $this->pos = 'end';80 continue;81 }82 73 if (!empty($module['groups'])) 83 74 { … … 86 77 } 87 78 79 if ($module['type'] == 'MainBlock') 80 { 81 global $user; 82 if (strpos($module['users'], $user['status']) === false) 83 { 84 add_event_handler('loc_end_index', 'hide_main_block'); 85 } 86 $this->pos = 'end'; 87 continue; 88 } 89 88 90 $datas = (!empty($module['datas']) ? unserialize($module['datas']) : false); 89 91 $block = array(); … … 102 104 $block['TEMPLATE'] = 'stuffs_'.strtolower($module['type']).'.tpl'; 103 105 $this->set_tpl_block($block, $module); 104 }105 if ($this->pos == 'begin')106 {107 add_event_handler('loc_end_index', 'hide_main_block');108 106 } 109 107 }
Note: See TracChangeset
for help on using the changeset viewer.