Plugin Directory

Changeset 1097293


Ignore:
Timestamp:
02/23/2015 03:27:58 PM (11 years ago)
Author:
jquindlen
Message:

4.9.47

  • Added: A bunch of new CC options added
  • Updated: Changed the description of email address over-ride setting so that it accurately described the feature
Location:
wpsc-support-tickets
Files:
134 added
3 edited

Legend:

Unmodified
Added
Removed
  • wpsc-support-tickets/trunk/nbproject/private/private.xml

    r1089125 r1097293  
    44    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
    55    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
    6         <group>
    7             <file>file:/D:/PORTABLES/EasyPHP-5.3.3/www/wordpress2/wp-content/plugins/wpsc-support-tickets/wpsc-support-tickets.php</file>
    8             <file>file:/D:/PORTABLES/EasyPHP-5.3.3/www/wordpress2/wp-content/plugins/wpsc-support-tickets/php/publicajax.php</file>
    9             <file>file:/D:/PORTABLES/EasyPHP-5.3.3/www/wordpress2/wp-content/plugins/wpsc-support-tickets/readme.txt</file>
    10         </group>
     6        <group/>
    117    </open-files>
    128</project-private>
  • wpsc-support-tickets/trunk/readme.txt

    r1089125 r1097293  
    55Requires at least: 3.5.0
    66Tested up to: 4.2
    7 Stable tag: 4.9.46
     7Stable tag: 4.9.47
    88
    99== Description ==
     
    109109* Added: the ability for users to reply by email
    110110* Added: the ability to search through ticket content (backend always, frontend on public guest enabled blogs.)
    111 * Updated: Added randomized addition to filenames & updated the file upload presentation (added 4.9.29 if you turn on beta testing)
     111* Updated: Added randomized addition to filenames & updated the file upload presentation (added in 4.9.29 as beta feature, went live for all in 4.9.33)
     112
     113= 4.9.47 =
     114* Added: A bunch of new CC options added
     115* Updated: Changed the description of email address over-ride setting so that it accurately described the feature
    112116
    113117= 4.9.46 =
  • wpsc-support-tickets/trunk/wpsc-support-tickets.php

    r1089125 r1097293  
    44  Plugin URI: http://indiedevbundle.com/app/idb-ultimate-wordpress-bundle/#idbsupporttickets
    55  Description: An open source help desk and support ticket system for Wordpress using jQuery. Easy to use for both users & admins.
    6   Version: 4.9.46
     6  Version: 4.9.47
    77  Author: IndieDevBundle.com
    88  Author URI: URI: http://indiedevbundle.com/app/idb-ultimate-wordpress-bundle/#idbsupporttickets
     
    9797     * @param string $headers
    9898     */
    99     function wpscSupportTickets_mail($to, $subject, $message, $headers='') {
     99    function wpscSupportTickets_mail($to, $subject, $message, $headers='', $cc=null) {
    100100        $devOptions = get_option('wpscSupportTicketsAdminOptions');
    101101        if($devOptions['disable_all_emails']=='false') {
     
    110110
    111111            $headers .= 'From: ' . $devOptions['email'] . "\r\n" .
    112             'Reply-To: ' . $devOptions['email'] .  "\r\n" .
    113             'X-Mailer: PHP/' . phpversion();       
     112            'Reply-To: ' . $devOptions['email'] .  "\r\n";
     113           
     114            if($cc != null) {
     115                $headers .= "CC: " . $cc . "\r\n";               
     116            }
     117           
     118            $headers .= 'X-Mailer: PHP/' . phpversion();       
    114119            wp_mail($to, $subject, $message, $headers);
    115120        }
     
    433438                'show_advanced_options' => 'false',
    434439                'converted_departments_phase2' => 'false',
    435                 'custom_new_ticket_button_text' => __('Create a New Ticket', 'wpsc-support-tickets')
     440                'custom_new_ticket_button_text' => __('Create a New Ticket', 'wpsc-support-tickets'),
     441                'cc_all_new_tickets' => 'false',
     442                'cc_all_new_tickets_to_email' => get_bloginfo('admin_email'),
     443                'cc_all_user_replies' => 'false',
     444                'cc_all_user_replies_to_email' => get_bloginfo('admin_email'),
     445                'cc_all_admin_replies' => 'false',
     446                'cc_all_admin_replies_to_email' => get_bloginfo('admin_email')                 
    436447            );             
    437448           
     
    598609                }               
    599610 
     611                if(isset($_POST['cc_all_new_tickets'])) {
     612                    $devOptions['cc_all_new_tickets'] = esc_sql($_POST['cc_all_new_tickets']);
     613                } 
     614                if(isset($_POST['cc_all_new_tickets_to_email'])) {
     615                    $devOptions['cc_all_new_tickets_to_email'] = esc_sql($_POST['cc_all_new_tickets_to_email']);
     616                } 
     617                if(isset($_POST['cc_all_user_replies'])) {
     618                    $devOptions['cc_all_user_replies'] = esc_sql($_POST['cc_all_user_replies']);
     619                }                 
     620                if(isset($_POST['cc_all_user_replies_to_email'])) {
     621                    $devOptions['cc_all_user_replies_to_email'] = esc_sql($_POST['cc_all_user_replies_to_email']);
     622                } 
     623                if(isset($_POST['cc_all_admin_replies'])) {
     624                    $devOptions['cc_all_admin_replies'] = esc_sql($_POST['cc_all_admin_replies']);
     625                } 
     626                if(isset($_POST['cc_all_admin_replies_to_email'])) {
     627                    $devOptions['cc_all_admin_replies_to_email'] = esc_sql($_POST['cc_all_admin_replies_to_email']);
     628                } 
     629               
    600630                update_option($this->adminOptionsName, $devOptions);
    601631
     
    866896               
    867897                if ($devOptions['show_advanced_options'] == 'true') {
     898                   
     899                    echo '
     900                    <div style="padding:5px;border:1px dotted black;">
     901                    <p><strong>' , __('CC All New Tickets?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all new tickets.', 'wpsc-support-tickets') , '  <br />
     902                    <select name="cc_all_new_tickets">
     903                     ';
     904
     905                    $pagesY[0] = 'true';
     906                    $pagesY[1] = 'false';
     907                    foreach ($pagesY as $pagg) {
     908                        $option = '<option value="' . $pagg . '"';
     909                        if ($pagg === $devOptions['cc_all_new_tickets']) {
     910                            $option .= ' selected="selected"';
     911                        }
     912                        $option .='>';
     913                        $option .= $pagg;
     914                        $option .= '</option>';
     915                        echo $option;
     916                    }
     917
     918                    echo '
     919                    </select>
     920                    </p>
     921                    <strong>' , __('Email Address to CC on New Tickets', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new tickets.', 'wpsc-support-tickets') , '<br /><input name="cc_all_new_tickets_to_email" value="' , $devOptions['cc_all_new_tickets_to_email'] , '" style="width:95%;" />
     922                    <br /><br />                   
     923                    ';                   
     924                   
     925                   
     926                    echo '
     927                    <p><strong>' , __('CC All User Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all user replies to tickets.', 'wpsc-support-tickets') , '  <br />
     928                    <select name="cc_all_user_replies">
     929                     ';
     930
     931                    $pagesY[0] = 'true';
     932                    $pagesY[1] = 'false';
     933                    foreach ($pagesY as $pagg) {
     934                        $option = '<option value="' . $pagg . '"';
     935                        if ($pagg === $devOptions['cc_all_user_replies']) {
     936                            $option .= ' selected="selected"';
     937                        }
     938                        $option .='>';
     939                        $option .= $pagg;
     940                        $option .= '</option>';
     941                        echo $option;
     942                    }
     943
     944                    echo '
     945                    </select>
     946                    </p>
     947                    <strong>' , __('Email Address to CC on All User Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new user replies.', 'wpsc-support-tickets') , '<br /><input name="cc_all_user_replies_to_email" value="' , $devOptions['cc_all_user_replies_to_email'] , '" style="width:95%;" />
     948                    <br /><br />                   
     949                    ';                       
     950                   
     951                   
     952                   
     953                    echo '
     954                    <p><strong>' , __('CC All Admin Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all admin replies to tickets.', 'wpsc-support-tickets') , '  <br />
     955                    <select name="cc_all_admin_replies">
     956                     ';
     957
     958                    $pagesY[0] = 'true';
     959                    $pagesY[1] = 'false';
     960                    foreach ($pagesY as $pagg) {
     961                        $option = '<option value="' . $pagg . '"';
     962                        if ($pagg === $devOptions['cc_all_admin_replies']) {
     963                            $option .= ' selected="selected"';
     964                        }
     965                        $option .='>';
     966                        $option .= $pagg;
     967                        $option .= '</option>';
     968                        echo $option;
     969                    }
     970
     971                    echo '
     972                    </select>
     973                    </p>
     974                    <strong>' , __('Email Address to CC on All Admin Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new admin replies.', 'wpsc-support-tickets') , '<br /><input name="cc_all_admin_replies_to_email" value="' , $devOptions['cc_all_admin_replies_to_email'] , '" style="width:95%;" />
     975                    <br /><br />   
     976                    </div>
     977                    <br /><br /> 
     978                    ';                     
     979                   
     980                   
     981                   
    868982                                        echo '
    869983                                        <p style="padding:5px;border:1px dotted black;">
     
    8901004                                        <br />
    8911005                                        <strong>' , __('Override Name Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The name of the admin email sender, such as "Business Name Support Team", or whatever is appropriate for your situation.', 'wpsc-support-tickets') ,'<br /><input name="email_name" value="' , $devOptions['email_name'] , '" style="width:95%;" /><br /><br />
    892                                         <strong>' , __('Override Email Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The name of the admin email sender, such as "Business Name Support Team", or whatever is appropriate for your situation.', 'wpsc-support-tickets') ,'<br /><input name="overrides_email" value="' , $devOptions['overrides_email'] , '" style="width:95%;" /><br /><br />
     1006                                        <strong>' , __('Override Email Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The email address that all outgoing emails will appear to be sent from.', 'wpsc-support-tickets') ,'<br /><input name="overrides_email" value="' , $devOptions['overrides_email'] , '" style="width:95%;" /><br /><br />
    8931007                                            </p>';
    8941008                }
     
    29263040
    29273041        if($devOptions['disable_all_emails']=='false') { // If we're sending out emails
     3042            $cc = null;
     3043            if($devOptions['cc_all_new_tickets'] == 'true') {
     3044               $cc = $devOptions['cc_all_new_tickets_to_email'];
     3045            }               
     3046           
    29283047            $to      = $wpscst_email; // Send this to the ticket creator
    29293048            if($devOptions['allow_html']=='true') {
     
    29433062                $message .= $cleaned_message;
    29443063            }   
    2945             $headers = '';
    2946 
    2947             wpscSupportTickets_mail($to, $subject, $message, $headers);
     3064
     3065
     3066            wpscSupportTickets_mail($to, $subject, $message, null, $cc);
    29483067
    29493068
     
    30263145
    30273146    if (session_id() == "") {@session_start();};
     3147   
     3148    $is_an_admin_reply = false;
    30283149
    30293150    if ( current_user_can('manage_wpsct_support_tickets')) { // admin edits such as closing tickets should happen here first:
     3151        $is_an_admin_reply = true;
    30303152        if(@isset($_POST['wpscst_status']) && @isset($_POST['wpscst_department']) && is_numeric($_POST['wpscst_edit_primkey'])) {
    30313153            $wpscst_department = intval($_POST['wpscst_department']);
     
    32253347                if($devOptions['disable_all_emails']=='false') { // If emails are turned on
    32263348                    if (@isset($_POST['wpsctnoemail']) && $_POST['wpsctnoemail'] == 'on' && $results[0]['email'] != $wpscst_email) {
     3349                        $cc = null;
     3350                        if($devOptions['cc_all_user_replies'] == 'true' && !$is_an_admin_reply) {
     3351                           $cc = $devOptions['cc_all_user_replies_to_email'];
     3352                        }                       
     3353                       
    32273354                        $to      = $results[0]['email']; // Send this to the original ticket creator
    32283355                        if($devOptions['allow_html']=='true') {
     
    32433370                        }           
    32443371
    3245                         wpscSupportTickets_mail($to, $subject, $message);
     3372                        wpscSupportTickets_mail($to, $subject, $message, null, $cc);
    32463373                    }
    32473374
    32483375                    if( $devOptions['email']!=$results[0]['email']) {
     3376                        $cc = null;
     3377                        if($devOptions['cc_all_admin_replies'] == 'true' && $is_an_admin_reply) {
     3378                           $cc = $devOptions['cc_all_admin_replies'];
     3379                        }                                 
     3380                       
    32493381                        $to      = $devOptions['email']; // Send this to the admin
    32503382                        if($devOptions['allow_html']=='true') {
     
    32683400                        }
    32693401
    3270                         wpscSupportTickets_mail($to, $subject, $message);
     3402                        wpscSupportTickets_mail($to, $subject, $message, null, $cc);
    32713403                    }
    32723404                   
Note: See TracChangeset for help on using the changeset viewer.