"true" ;'; pwg_query($query); $query = 'SELECT * FROM '.STUFFS_TABLE.';'; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { if ($row['path'] == 'Personal') { $data = unserialize($row['datas']); $row['datas'] = serialize($data[0]); } if ($row['path'] == 'piclenswall') { $row['path'] = PHPWG_PLUGINS_PATH.'piclens/stuffs_module/'; } elseif ($row['path'] != 'MainBlock') { $row['path'] = PHPWG_PLUGINS_PATH.$path.'/modules/'.$row['path'].'/'; } else { // Main Block $row['path'] = null; if (!empty($row['datas'])) { $data = unserialize($row['datas']); $row['datas'] = serialize(!$data['hide']); } else { $row['datas'] = serialize(true); } } $query = 'UPDATE '.STUFFS_TABLE.' SET path = '.(is_null($row['path']) ? 'NULL' : '"'.$row['path'].'"').', datas = "'.addslashes($row['datas']).'" WHERE id = '.$row['id'].' ;'; pwg_query($query); } $conf['Stuffs']['level_perm'] = false; $query = 'SELECT id FROM '.STUFFS_TABLE.' WHERE users <> "guest,generic,normal,admin,webmaster" ;'; $ids = array_from_query($query, 'id'); $conf['Stuffs']['user_perm'] = !empty($ids); $query = 'SELECT id FROM '.STUFFS_TABLE.' WHERE groups IS NOT NULL ;'; $ids = array_from_query($query, 'id'); $conf['Stuffs']['group_perm'] = !empty($ids); $query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("PWG_Stuffs" , "'.pwg_db_real_escape_string(serialize($conf['Stuffs'])).'" , "PWG Stuffs plugin configuration");'; pwg_query($query); } ?>