Plugin Directory

Changeset 334000


Ignore:
Timestamp:
01/18/2011 09:19:23 AM (15 years ago)
Author:
jameslafferty
Message:

Major bug fix.

Location:
contact-dialog/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • contact-dialog/trunk/contact-dialog.php

    r333137 r334000  
    55Description: An AJAX-driven contact form in a modal dialog box.
    66Author: James Lafferty
    7 Version: 0.3
     7Version: 0.4
    88Author URI: https://github.com/kalchas
    99License: GPL2
  • contact-dialog/trunk/lib/nscontactdialog.class.php

    r333137 r334000  
    8080           
    8181            if (isset($_GET['nscdaction'])) {
     82               
     83                $options = NSContactDialogAdmin::get_options();
    8284           
    8385                switch ($_GET['nscdaction']) {
     
    8789                        header('Content-type: application/javascript');
    8890
    89                         $options = NSContactDialogAdmin::get_options();
    90 
    9191                        unset($options['recaptcha_api_private_key']);
    9292
     
    111111                        header('Content-type: application/json');
    112112
    113                         $result = self::send_email($_GET['name'], $_GET['email'], $_GET['subject'], $_GET['message-body'], $_GET['recaptcha_challenge_field'], $_GET['recaptcha_response_field']);
     113                        $result = self::send_email($options['contact_email_address'], $_GET['name'], $_GET['email'], $_GET['subject'], $_GET['message-body'], $_GET['recaptcha_challenge_field'], $_GET['recaptcha_response_field']);
    114114
    115115                        echo json_encode($result);
     
    165165     * @author jameslafferty
    166166     */
    167     private static function send_email ($name = null, $email_address = null, $subject = null, $message = null, $recaptcha_challenge_field = null, $recaptcha_response_field = null) {
     167    private static function send_email ($target_email, $name = null, $email_address = null, $subject = null, $message = null, $recaptcha_challenge_field = null, $recaptcha_response_field = null) {
    168168       
    169169        $response['response'] = 'error'; //Assume the worst.
     
    203203                $message = stripslashes($message);
    204204                   
    205                 $result = array(wp_mail($email_address, stripslashes($subject), $message, $headers));
     205                $result = array(wp_mail($target_email, stripslashes($subject), $message, $headers));
    206206               
    207207                if (true == $result) {
  • contact-dialog/trunk/readme.txt

    r333137 r334000  
    2323
    2424== Frequently Asked Questions ==
    25 There are no Frequently Asked Questions yet, because this has just been released.
     25
     26= Why am I not getting emails? =
     27Could be one of a few things. First, check the version of the plugin you're using. If it's lower than 0.4, upgrade and it should resolve the issue. If that doesn't do it, change the default email address from my address to your own... It'll make my inbox lighter, too. Finally, you may be having an issue with mail in general. Contact your server admin for help.
    2628
    2729== Screenshots ==
     
    3234
    3335== Changelog ==
     36= 0.4 =
     37* Major bugfix. The plugin was sending emails to the sender rather than to the recipient specified in the admin. That must be annoying! Thanks very much to a user who shall remain anonymous for pointing out this issue.
     38
    3439= 0.3 =
    3540* Removed some notices that were appearing in WP_DEBUG mode.
     
    4651
    4752== Upgrade Notice ==
     53= 0.4 =
     54* The previous version sent emails to the sender -- an-NOY-ing! -- This version fixes that and actually sends the emails to the specified admin.
     55
    4856= 0.3 =
    4957* Removes some notices that were appearing in WP_DEBUG mode (minor).
Note: See TracChangeset for help on using the changeset viewer.