Changeset 152
- Timestamp:
- Apr 3, 2009, 11:04:47 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/oninstall.php
r102 r152 153 153 name varchar(50) NOT NULL default '' , 154 154 description text NOT NULL default '', 155 group_type varchar( 10) NOT NULL default '' ,155 group_type varchar(50) NOT NULL default '' , 156 156 role varchar(20) NOT NULL default '' , 157 157 login_all smallint(5) unsigned NOT NULL default '0' , -
trunk/include/onupdate.php
r151 r152 126 126 name varchar(50) NOT NULL default '' , 127 127 description text NOT NULL default '', 128 group_type varchar( 10) NOT NULL default '' ,128 group_type varchar(50) NOT NULL default '' , 129 129 role varchar(20) NOT NULL default '' , 130 130 login_all smallint(5) unsigned NOT NULL default '0' , -
trunk/wp-content/plugins/xpressme/xpressme_class.php
r149 r152 139 139 $table = get_wp_prefix() . 'group_role'; 140 140 $xoops_group = get_xoops_prefix() . 'groups'; 141 $xoops_group_permission = get_xoops_prefix() . 'group_permission'; 142 143 $module_id = get_xpress_modid(); 144 141 145 $sql= "SELECT * FROM $table"; 142 146 $before_groupes = $xoops_db->get_results($sql); … … 145 149 $xoops_db->query($sql); 146 150 147 148 $sql= "SELECT * FROM $xoops_group WHERE group_type <> 'Anonymous'"; 151 $sql = "SELECT * FROM $xoops_group_permission WHERE gperm_itemid = $module_id"; 152 $gperms = $xoops_db->get_results($sql); 153 154 $sql = "SELECT * FROM $xoops_group WHERE group_type <> 'Anonymous'"; 149 155 $groupes = $xoops_db->get_results($sql); 150 156 $insert_sql = ''; 151 157 foreach ($groupes as $groupe) { 152 $role = ''; 153 foreach ($before_groupes as $before_groupe) { 154 if ($groupe->groupid == $before_groupe->groupid) { 155 $role = $before_groupe->role; 156 $login_all = $before_groupe->login_all; 158 $parmsql = "SELECT * FROM $xoops_group_permission WHERE gperm_itemid = $module_id AND gperm_groupid = $groupe->groupid"; 159 $gperms = $xoops_db->get_results($parmsql); 160 $parmission = ''; 161 foreach ($gperms as $gperm) { 162 $parmission = $gperm->gperm_name; 163 if ($parmission == 'module_admin') break; 164 } 165 166 if (!empty($parmission)){ 167 $role = ''; 168 foreach ($before_groupes as $before_groupe) { 169 if ($groupe->groupid == $before_groupe->groupid) { 170 $role = $before_groupe->role; 171 $login_all = $before_groupe->login_all; 172 } 157 173 } 158 } 159 160 $insert_sql = "INSERT INTO $table "; 161 $insert_sql .= "(groupid , name , description , group_type , role , login_all) "; 162 $insert_sql .= "VALUES ("; 163 $insert_sql .= $groupe->groupid . ', '; 164 $insert_sql .= "'" . $groupe->name . "' , "; 165 $insert_sql .= "'" . $groupe->description . "' , "; 166 $insert_sql .= "'" . $groupe->group_type . "' , "; 167 $insert_sql .= "'" . $role . "' , '"; 168 $insert_sql .= $login_all . "')"; 169 $xoops_db->query($insert_sql); 174 if ($parmission == 'module_admin') $role = 'administrator'; 175 176 $insert_sql = "INSERT INTO $table "; 177 $insert_sql .= "(groupid , name , description , group_type , role , login_all) "; 178 $insert_sql .= "VALUES ("; 179 $insert_sql .= $groupe->groupid . ', '; 180 $insert_sql .= "'" . $groupe->name . "' , "; 181 $insert_sql .= "'" . $groupe->description . "' , "; 182 $insert_sql .= "'" . $parmission . "' , "; 183 $insert_sql .= "'" . $role . "' , '"; 184 $insert_sql .= $login_all . "')"; 185 $xoops_db->query($insert_sql); 186 } 170 187 } 171 188 … … 406 423 $selected = ''; 407 424 } 408 if ($groupe->group_type != ' Admin' || $groupe->groupid > 3|| !empty($selected)) {425 if ($groupe->group_type != 'module_admin'|| !empty($selected)) { 409 426 $role_list .= "<option value=\"{$role}\"{$selected}>{$name}</option>\n"; 410 427 } 411 428 } 412 if ($groupe->group_type != ' Admin' || $groupe->groupid > 3) {429 if ($groupe->group_type != 'module_admin') { 413 430 if ( $group_has_role ) { 414 431 $role_list .= '<option value="default">' . __('Default Role of WordPress', 'xpressme') . "</option>\n"; -
trunk/xoops_version.php
r150 r152 31 31 $modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XPRESS_NAME') ; 32 32 $modversion['description'] = constant( '_MI_XPRESS_DESC'); 33 $modversion['version'] = "0.2 2";33 $modversion['version'] = "0.23"; 34 34 $modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://www.toemon.com) ;"; 35 35 $modversion['author'] = "toemon (http://www.toemon.com)"; … … 40 40 41 41 // status 42 $modversion['codename'] = "r15 0";42 $modversion['codename'] = "r152"; 43 43 44 44 // onInstall, onUpdate, onUninstall
Note: See TracChangeset
for help on using the changeset viewer.