Changeset 3040027
- Timestamp:
- 02/23/2024 04:34:08 AM (2 years ago)
- Location:
- awesome-support/trunk
- Files:
-
- 7 edited
-
awesome-support.php (modified) (2 diffs)
-
includes/admin/upgrade/functions-upgrade.php (modified) (1 diff)
-
includes/admin/views/about-tab-change-log.php (modified) (1 diff)
-
includes/class-member-query.php (modified) (3 diffs)
-
includes/functions-general.php (modified) (1 diff)
-
includes/functions-user.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
awesome-support/trunk/awesome-support.php
r3033134 r3040027 11 11 * Plugin URI: https://getawesomesupport.com 12 12 * Description: Awesome Support is a great ticketing system that will help you improve your customer satisfaction by providing a unique customer support experience. 13 * Version: 6.1. 813 * Version: 6.1.9 14 14 * Author: Awesome Support Team 15 15 * Author URI: https://getawesomesupport.com … … 250 250 */ 251 251 private function setup_constants() { 252 define( 'WPAS_VERSION', '6.1. 8' );252 define( 'WPAS_VERSION', '6.1.9' ); 253 253 define( 'WPAS_DB_VERSION', '1' ); 254 254 define( 'WPAS_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); -
awesome-support/trunk/includes/admin/upgrade/functions-upgrade.php
r3033134 r3040027 889 889 wpas_upgrade_581(); 890 890 } 891 892 /** 893 * Upgrade function for version 6.1.9 894 * 895 * No new capabilities need to be added to certain roles. 896 * 897 * @since 6.1 898 * @return void 899 */ 900 function wpas_upgrade_6190() { 901 // Run the 581 upgrade option for version 6014. 902 // The 581 upgrade was the internal upgrade option during testing of the 6013 release. 903 // Therefore the two routines are the same and there is no reason to write a separate 6013 routine. 904 // But we do want early 581 adopters to get the later changes to the update routine. So 905 // we create this 6014 routine to make sure it runs for early 520 adopters. 906 wpas_upgrade_581(); 907 } -
awesome-support/trunk/includes/admin/views/about-tab-change-log.php
r3033134 r3040027 4 4 5 5 <div class="row"> 6 <div> 7 <div class="about-body"> 8 <h1>What's New In 6.1.9</h1> 9 <h3>6.1.9 includes the vulnerabilities fix and security patches. Here is a more comprehensive list:</h3> 10 <ul style="padding-left: 3em; list-style-type: disc;"> 11 <li>We fixed when the agent was not able to choose a user when changing the ticket creator field.</li> 12 </ul> 13 </div> 14 </div> 15 </div> 16 17 <hr /> <div class="row"> 6 18 <div> 7 19 <div class="about-body"> -
awesome-support/trunk/includes/class-member-query.php
r3033134 r3040027 350 350 351 351 foreach ( $roles as $role ) { 352 $like[] = sprintf( 'CAST(%1$s AS CHAR) LIKE "%2$s"', "$wpdb->usermeta.meta_value", "%$role%" );352 $like[] = $wpdb->prepare( 'CAST(%1$s AS CHAR) LIKE "%2$s"', "$wpdb->usermeta.meta_value", "%$role%" ); 353 353 } 354 354 … … 396 396 foreach ( $this->search['fields'] as $field ) { 397 397 if( 'ID' === $field ) { 398 $search_query[] = "CAST({$wpdb->users}.{$field} AS CHAR) LIKE '%{$this->search['query']}%'";398 $search_query[] = $wpdb->prepare( 'CAST(%1$s.%2$s AS CHAR) LIKE "%3$s"', $wpdb->users, $field , '%'.$this->search['query'].'%') ; 399 399 } else { 400 $search_query[] = "{$wpdb->users}.{$field} LIKE '%{$this->search['query']}%'";400 $search_query[] = $wpdb->prepare( '%1$s.%2$s LIKE "%3$s"' ,$wpdb->users, $field, '%'.$this->search['query'].'%' ); 401 401 } 402 402 } … … 413 413 $order_type = $this->order ? $this->order : 'ASC'; 414 414 415 $sql .= " ORDER BY {$wpdb->users}.{$order_field} {$order_type}"; 416 417 $prepared_query = $wpdb->prepare( $sql ); 418 419 $this->members = $wpdb->get_results( $prepared_query ); 420 415 $sql .= " ORDER BY {$wpdb->users}.{$order_field} {$order_type}"; 416 417 $prepared_query = $wpdb->prepare( $sql ); 418 419 $this->members = $wpdb->get_results( $prepared_query ); 420 421 421 // Cache the results 422 422 wp_cache_add( 'users_' . $this->hash, $this->members, 'wpas' ); -
awesome-support/trunk/includes/functions-general.php
r3018187 r3040027 1690 1690 // gets the Agent role 1691 1691 $wpas_agent_role = get_role( 'wpas_agent' ); 1692 1693 if( wpas_agent_can_delete_attachments() ) { 1694 // This only works, because it accesses the class instance. 1695 $wpas_agent_role->add_cap( 'delete_attachment' ); 1696 $can = true; 1697 } 1698 else 1692 if( $wpas_agent_role ) 1699 1693 { 1700 // This only works, because it accesses the class instance. 1701 $wpas_agent_role->remove_cap( 'delete_attachment' ); 1694 if( wpas_agent_can_delete_attachments() ) { 1695 // This only works, because it accesses the class instance. 1696 $wpas_agent_role->add_cap( 'delete_attachment' ); 1697 $can = true; 1698 } 1699 else 1700 { 1701 // This only works, because it accesses the class instance. 1702 $wpas_agent_role->remove_cap( 'delete_attachment' ); 1703 } 1702 1704 } 1703 1705 } else { 1704 1706 // gets the Support User role 1705 1707 $wpas_user_role = get_role( 'wpas_user' ); 1706 if( wpas_user_can_delete_attachments() ) { 1707 // This only works, because it accesses the class instance. 1708 $wpas_user_role->add_cap( 'delete_attachment' ); 1709 $can = true; 1710 } 1711 else 1708 if( $wpas_user_role ) 1712 1709 { 1713 // This only works, because it accesses the class instance. 1714 $wpas_user_role->remove_cap( 'delete_attachment' ); 1710 if( wpas_user_can_delete_attachments() ) { 1711 // This only works, because it accesses the class instance. 1712 $wpas_user_role->add_cap( 'delete_attachment' ); 1713 $can = true; 1714 } 1715 else 1716 { 1717 // This only works, because it accesses the class instance. 1718 $wpas_user_role->remove_cap( 'delete_attachment' ); 1719 } 1715 1720 } 1716 1721 } -
awesome-support/trunk/includes/functions-user.php
r3033134 r3040027 1026 1026 } 1027 1027 } 1028 1029 foreach ( $all_users->members as $user ) { 1030 1031 /* This user was already added, skip it */ 1032 if ( ! empty( $args['selected'] ) && intval( $user->user_id ) === intval( $args['selected'] ) ) { 1033 continue; 1034 } 1035 1036 $user_id = $user->ID; 1037 $user_name = $user->display_name; 1038 $selected_attr = ''; 1039 1040 if ( false === $marker ) { 1041 if ( false !== $args['selected'] ) { 1042 if ( ! empty( $args['selected'] ) ) { 1043 if ( $args['selected'] === $user_id ) { 1044 $selected_attr = 'selected="selected"'; 1045 } 1046 } else { 1047 if ( isset( $post ) && $user_id == $post->post_author ) { 1048 $selected_attr = 'selected="selected"'; 1028 1029 if( $all_users && !is_null( $all_users->members ) && !empty( $all_users->members ) ) 1030 { 1031 foreach ( $all_users->members as $user ) { 1032 1033 /* This user was already added, skip it */ 1034 if ( ! empty( $args['selected'] ) && intval( $user->user_id ) === intval( $args['selected'] ) ) { 1035 continue; 1036 } 1037 1038 $user_id = $user->ID; 1039 $user_name = $user->display_name; 1040 $selected_attr = ''; 1041 1042 if ( false === $marker ) { 1043 if ( false !== $args['selected'] ) { 1044 if ( ! empty( $args['selected'] ) ) { 1045 if ( $args['selected'] === $user_id ) { 1046 $selected_attr = 'selected="selected"'; 1047 } 1048 } else { 1049 if ( isset( $post ) && $user_id == $post->post_author ) { 1050 $selected_attr = 'selected="selected"'; 1051 } 1049 1052 } 1050 1053 } 1051 1054 } 1052 } 1053 1054 /* Set the marker as true to avoid selecting more than one user */1055 if ( ! empty( $selected_attr ) ) {1056 $marker = true;1057 } 1058 1059 /* Output the option */1060 $options .= "<option value='$user_id' $selected_attr>$user_name</option>"; 1061 1055 1056 /* Set the marker as true to avoid selecting more than one user */ 1057 if ( ! empty( $selected_attr ) ) { 1058 $marker = true; 1059 } 1060 1061 /* Output the option */ 1062 $options .= "<option value='$user_id' $selected_attr>$user_name</option>"; 1063 1064 } 1062 1065 } 1063 1066 … … 1308 1311 ); 1309 1312 1310 $result = array(); 1311 1312 foreach ( $users->members as $user ) { 1313 1314 $result[] = array( 1315 'user_id' => $user->ID, 1316 'user_name' => $user->display_name, 1317 'user_email' => $user->user_email, 1318 'user_avatar' => get_avatar_url( $user->ID, array( 'size' => 32, 'default' => 'mm' ) ), 1319 ); 1320 1321 } 1322 1313 $result = array(); 1314 if( $users && !is_null( $users->members ) && !empty( $users->members ) ) 1315 { 1316 foreach ( $users->members as $user ) { 1317 1318 $result[] = array( 1319 'user_id' => $user->ID, 1320 'user_name' => $user->display_name, 1321 'user_email' => $user->user_email, 1322 'user_avatar' => get_avatar_url( $user->ID, array( 'size' => 32, 'default' => 'mm' ) ), 1323 ); 1324 1325 } 1326 } 1323 1327 echo json_encode( $result ); 1324 1328 die(); -
awesome-support/trunk/readme.txt
r3033134 r3040027 5 5 Requires at least: 4.0 6 6 Tested up to: 6.4 7 Stable tag: 6.1. 87 Stable tag: 6.1.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 448 448 == Changelog == 449 449 450 = 6.1.9 451 * Fix 452 * We fixed when the agent was not able to choose a user when changing the ticket creator field. 453 450 454 = 6.1.8 451 455 * Fix
Note: See TracChangeset
for help on using the changeset viewer.