Plugin Directory

Changeset 3040027


Ignore:
Timestamp:
02/23/2024 04:34:08 AM (2 years ago)
Author:
yeisonbp
Message:

init v6.1.9

Location:
awesome-support/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • awesome-support/trunk/awesome-support.php

    r3033134 r3040027  
    1111 * Plugin URI:        https://getawesomesupport.com
    1212 * 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.8
     13 * Version:           6.1.9
    1414 * Author:            Awesome Support Team
    1515 * Author URI:         https://getawesomesupport.com
     
    250250         */
    251251        private function setup_constants() {
    252             define( 'WPAS_VERSION',           '6.1.8' );
     252            define( 'WPAS_VERSION',           '6.1.9' );
    253253            define( 'WPAS_DB_VERSION',        '1' );
    254254            define( 'WPAS_URL',               trailingslashit( plugin_dir_url( __FILE__ ) ) );
  • awesome-support/trunk/includes/admin/upgrade/functions-upgrade.php

    r3033134 r3040027  
    889889    wpas_upgrade_581();
    890890}
     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 */
     900function 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  
    44   
    55    <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">
    618        <div>
    719            <div class="about-body">
  • awesome-support/trunk/includes/class-member-query.php

    r3033134 r3040027  
    350350
    351351            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%" );
    353353            }
    354354
     
    396396            foreach ( $this->search['fields'] as $field ) {
    397397                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'].'%') ;
    399399                } 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'].'%' );
    401401                }
    402402            }
     
    413413        $order_type = $this->order ? $this->order : 'ASC';
    414414       
    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       
    421421        // Cache the results
    422422        wp_cache_add( 'users_' . $this->hash, $this->members, 'wpas' );
  • awesome-support/trunk/includes/functions-general.php

    r3018187 r3040027  
    16901690        // gets the Agent role
    16911691        $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 )
    16991693        {
    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            }
    17021704        }
    17031705    } else {
    17041706        // gets the Support User role
    17051707        $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 )
    17121709        {
    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            }
    17151720        }
    17161721    }
  • awesome-support/trunk/includes/functions-user.php

    r3033134 r3040027  
    10261026        }
    10271027    }
    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                        }
    10491052                    }
    10501053                }
    10511054            }
    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        }
    10621065    }
    10631066
     
    13081311    );
    13091312
    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    }
    13231327    echo json_encode( $result );
    13241328    die();
  • awesome-support/trunk/readme.txt

    r3033134 r3040027  
    55Requires at least: 4.0
    66Tested up to: 6.4
    7 Stable tag: 6.1.8
     7Stable tag: 6.1.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    448448== Changelog ==
    449449
     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       
    450454= 6.1.8
    451455* Fix   
Note: See TracChangeset for help on using the changeset viewer.