Changeset 25545
- Timestamp:
- Nov 18, 2013, 6:03:00 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/template/user_list.tpl
r25502 r25545 206 206 jQuery("#action select[name=associate] option").each(function() { 207 207 var selected = ''; 208 if (user.groups.indexOf( jQuery(this).val()) != -1) {208 if (user.groups.indexOf( parseInt(jQuery(this).val()) ) != -1) { 209 209 selected = ' selected="selected"'; 210 210 } … … 554 554 "bProcessing": true, 555 555 "bServerSide": true, 556 "sServerMethod": "POST", 556 557 "sAjaxSource": "admin/user_list_backend.php", 557 558 "oLanguage": { -
trunk/admin/user_list_backend.php
r25475 r25545 29 29 */ 30 30 $sLimit = ""; 31 if ( isset( $_ GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )31 if ( isset( $_REQUEST['iDisplayStart'] ) && $_REQUEST['iDisplayLength'] != '-1' ) 32 32 { 33 $sLimit = "LIMIT ".pwg_db_real_escape_string( $_ GET['iDisplayStart'] ).", ".34 pwg_db_real_escape_string( $_ GET['iDisplayLength'] );33 $sLimit = "LIMIT ".pwg_db_real_escape_string( $_REQUEST['iDisplayStart'] ).", ". 34 pwg_db_real_escape_string( $_REQUEST['iDisplayLength'] ); 35 35 } 36 36 … … 39 39 * Ordering 40 40 */ 41 if ( isset( $_ GET['iSortCol_0'] ) )41 if ( isset( $_REQUEST['iSortCol_0'] ) ) 42 42 { 43 43 $sOrder = "ORDER BY "; 44 for ( $i=0 ; $i<intval( $_ GET['iSortingCols'] ) ; $i++ )44 for ( $i=0 ; $i<intval( $_REQUEST['iSortingCols'] ) ; $i++ ) 45 45 { 46 if ( $_ GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" )46 if ( $_REQUEST[ 'bSortable_'.intval($_REQUEST['iSortCol_'.$i]) ] == "true" ) 47 47 { 48 $sOrder .= $aColumns[ intval( $_ GET['iSortCol_'.$i] ) ]."49 ".pwg_db_real_escape_string( $_ GET['sSortDir_'.$i] ) .", ";48 $sOrder .= $aColumns[ intval( $_REQUEST['iSortCol_'.$i] ) ]." 49 ".pwg_db_real_escape_string( $_REQUEST['sSortDir_'.$i] ) .", "; 50 50 } 51 51 } … … 66 66 */ 67 67 $sWhere = ""; 68 if ( $_ GET['sSearch'] != "" )68 if ( $_REQUEST['sSearch'] != "" ) 69 69 { 70 70 $sWhere = "WHERE ("; 71 71 for ( $i=0 ; $i<count($aColumns) ; $i++ ) 72 72 { 73 $sWhere .= $aColumns[$i]." LIKE '%".pwg_db_real_escape_string( $_ GET['sSearch'] )."%' OR ";73 $sWhere .= $aColumns[$i]." LIKE '%".pwg_db_real_escape_string( $_REQUEST['sSearch'] )."%' OR "; 74 74 } 75 75 $sWhere = substr_replace( $sWhere, "", -3 ); … … 80 80 for ( $i=0 ; $i<count($aColumns) ; $i++ ) 81 81 { 82 if ( $_ GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' )82 if ( $_REQUEST['bSearchable_'.$i] == "true" && $_REQUEST['sSearch_'.$i] != '' ) 83 83 { 84 84 if ( $sWhere == "" ) … … 90 90 $sWhere .= " AND "; 91 91 } 92 $sWhere .= $aColumns[$i]." LIKE '%".pwg_db_real_escape_string($_ GET['sSearch_'.$i])."%' ";92 $sWhere .= $aColumns[$i]." LIKE '%".pwg_db_real_escape_string($_REQUEST['sSearch_'.$i])."%' "; 93 93 } 94 94 } … … 130 130 */ 131 131 $output = array( 132 "sEcho" => intval($_ GET['sEcho']),132 "sEcho" => intval($_REQUEST['sEcho']), 133 133 "iTotalRecords" => $iTotal, 134 134 "iTotalDisplayRecords" => $iFilteredTotal, -
trunk/include/ws_functions/pwg.permissions.php
r25281 r25545 58 58 if (!isset($perms[ $row['cat_id'] ])) 59 59 { 60 $perms[ $row['cat_id'] ]['id'] = $row['cat_id'];61 } 62 $perms[ $row['cat_id'] ]['users'][] = $row['user_id'];60 $perms[ $row['cat_id'] ]['id'] = intval($row['cat_id']); 61 } 62 $perms[ $row['cat_id'] ]['users'][] = intval($row['user_id']); 63 63 } 64 64 … … 77 77 if (!isset($perms[ $row['cat_id'] ])) 78 78 { 79 $perms[ $row['cat_id'] ]['id'] = $row['cat_id'];80 } 81 $perms[ $row['cat_id'] ]['users_indirect'][] = $row['user_id'];79 $perms[ $row['cat_id'] ]['id'] = intval($row['cat_id']); 80 } 81 $perms[ $row['cat_id'] ]['users_indirect'][] = intval($row['user_id']); 82 82 } 83 83 … … 94 94 if (!isset($perms[ $row['cat_id'] ])) 95 95 { 96 $perms[ $row['cat_id'] ]['id'] = $row['cat_id'];97 } 98 $perms[ $row['cat_id'] ]['groups'][] = $row['group_id'];96 $perms[ $row['cat_id'] ]['id'] = intval($row['cat_id']); 97 } 98 $perms[ $row['cat_id'] ]['groups'][] = intval($row['group_id']); 99 99 } 100 100 … … 121 121 } 122 122 123 $cat['groups'] = !empty($cat['groups']) ? array_ unique($cat['groups']) : array();124 $cat['users'] = !empty($cat['users']) ? array_ unique($cat['users']) : array();125 $cat['users_indirect'] = !empty($cat['users_indirect']) ? array_ unique($cat['users_indirect']) : array();123 $cat['groups'] = !empty($cat['groups']) ? array_values(array_unique($cat['groups'])) : array(); 124 $cat['users'] = !empty($cat['users']) ? array_values(array_unique($cat['users'])) : array(); 125 $cat['users_indirect'] = !empty($cat['users_indirect']) ? array_values(array_unique($cat['users_indirect'])) : array(); 126 126 } 127 127 unset($cat); -
trunk/include/ws_functions/pwg.users.php
r25474 r25545 168 168 ;'; 169 169 170 $users = hash_from_query($query, 'id'); 170 $users = array(); 171 $result = pwg_query($query); 172 while ($row = pwg_db_fetch_assoc($result)) 173 { 174 $row['id'] = intval($row['id']); 175 $users[ $row['id'] ] = $row; 176 } 171 177 172 178 if (count($users) > 0) … … 183 189 while ($row = pwg_db_fetch_assoc($result)) 184 190 { 185 $users[ $row['user_id'] ]['groups'][] = $row['group_id'];191 $users[ $row['user_id'] ]['groups'][] = intval($row['group_id']); 186 192 } 187 193 }
Note: See TracChangeset
for help on using the changeset viewer.