Plugin Directory

Changeset 1030489


Ignore:
Timestamp:
11/22/2014 01:09:12 AM (11 years ago)
Author:
warkior
Message:

Release of FormBuilder 1.03

Location:
formbuilder/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • formbuilder/trunk/extensions/formbuilder_xml_db_results.class.php

    r910179 r1030489  
    180180            }
    181181   
    182             if(isset($_POST['form_id']) AND $_POST['form_id'] != "" AND eregi('^[0-9]+$', $_POST['form_id']))
     182            if(isset($_POST['form_id']) AND $_POST['form_id'] != "" AND preg_match('#^[0-9]+$#isU', $_POST['form_id']))
    183183            {
    184184                $form_id = addslashes(trim($_POST['form_id']));
     
    284284       
    285285        // Check to ensure we have a valid looking email id.
    286         if(!eregi('^[0-9]+$', $email_id)) $error .= "Invalid email ID  ";
     286        if(!preg_match('#^[0-9]+$#isU', $email_id)) $error .= "Invalid email ID  ";
    287287
    288288        // Load the details of the email from the DB.
     
    348348    {
    349349        global $wpdb;
    350         if(!eregi('^[0-9]+$', $email_id)) $error = "Invalid email ID";
     350        if(!preg_match('#^[0-9]+$#isU', $email_id)) $error = "Invalid email ID";
    351351       
    352352        if(!isset($error))
     
    470470       
    471471        foreach($email_ids as $email_id)
    472             if(!eregi('^[0-9]+$', $email_id)) $error .= "Invalid email ID(s) detected.  ";
     472            if(!preg_match('#^[0-9]+$#isU', $email_id)) $error .= "Invalid email ID(s) detected.  ";
    473473       
    474474        if(!$error)
     
    575575    {
    576576        global $wpdb;
    577         if(!eregi('^[0-9]+$', $email_id)) $error = "Invalid email ID";
     577        if(!preg_match('#^[0-9]+$#isU', $email_id)) $error = "Invalid email ID";
    578578       
    579579        $searchQuery = '';
     
    831831       
    832832        // Check to see if we should display multiple pages.
    833         if(isset($_GET['pageNumber']) AND eregi("^[0-9]+$", $_GET['pageNumber']))
     833        if(isset($_GET['pageNumber']) AND preg_match("#^[0-9]+$#isU", $_GET['pageNumber']))
    834834            $result_page = $_GET['pageNumber'];
    835835        else
     
    979979        }
    980980
    981         if(isset($_POST['form_id']) AND $_POST['form_id'] != "" AND eregi('^[0-9]+$', $_POST['form_id']))
     981        if(isset($_POST['form_id']) AND $_POST['form_id'] != "" AND preg_match('#^[0-9]+$#isU', $_POST['form_id']))
    982982        {
    983983            $form_id = addslashes(trim($_POST['form_id']));
     
    10131013            foreach($formIDs as $form_id)
    10141014            {
    1015                 if(eregi('^[0-9]+$', $form_id))
     1015                if(preg_match('#^[0-9]+$#isU', $form_id))
    10161016                {
    10171017                    $form_id = addslashes(trim($form_id));
  • formbuilder/trunk/formbuilder.php

    r910488 r1030489  
    55Description: The FormBuilder plugin allows the administrator to create contact forms of a variety of types for use on their WordPress blog.  The FormBuilder has built-in spam protection and can be further protected by installing the Akismet anti-spam plugin.  Uninstall instructions can be found <a href="http://truthmedia.com/wordpress/formbuilder/documentation/uninstall/">here</a>.  Forms can be included on your pages and posts either by selecting the appropriate form in the dropdown below the content editing box, or by adding them directly to the content with [formbuilder:#] where # is the ID number of the form to be included.
    66Author: James Warkentin
    7 Version: 1.01
     7Version: 1.03
    88Author URI: http://warkior.com/
    99
     
    2828*/
    2929   
    30     define("FORMBUILDER_VERSION_NUM", "1.01");
     30    define("FORMBUILDER_VERSION_NUM", "1.03");
    3131
    3232    // Define FormBuilder Related Tables
     
    347347        if($custom_css == "Enabled")
    348348        {
    349             $css_path = FORMBUILDER_PLUGIN_URL . "css/formbuilder_styles.css";
     349            $css_path = plugins_url( 'css/formbuilder_styles.css', __FILE__ );
    350350            ?>
    351351            <link rel='stylesheet' href='<?php echo $css_path; ?>' type='text/css' media='all' />
     
    357357        if(file_exists(WP_CONTENT_DIR . "/additional_styles.css"))
    358358        {
    359             $css_path = WP_CONTENT_URL . "/additional_styles.css";
     359            $css_path = content_url() . "/additional_styles.css";
    360360            ?>
    361361            <!-- ADDITIONAL CSS CUSTOMIZATION -->
     
    366366        elseif(file_exists(FORMBUILDER_PLUGIN_PATH . "additional_styles.css"))
    367367        {
    368             $css_path = FORMBUILDER_PLUGIN_URL . "additional_styles.css";
     368            $css_path = plugins_url( 'additional_styles.css', __DIR__ );
    369369            ?>
    370370            <!-- ADDITIONAL CSS CUSTOMIZATION -->
     
    440440        $tmp = $content;
    441441
    442         while(eregi(FORMBUILDER_CONTENT_TAG, $tmp, $regs)) {
     442        while(preg_match('#' . FORMBUILDER_CONTENT_TAG . '#isU', $tmp, $regs)) {
    443443            $form_ids[$counter]['id'] = trim($regs[1]);
    444444            $form_ids[$counter]['tag'] = $regs[0];
     
    452452    // Function to strip all form tags from any content.
    453453    function formbuilder_strip_content($content) {
    454         while(eregi(FORMBUILDER_CONTENT_TAG, $content, $regs)) {
     454        while(preg_match('#' . FORMBUILDER_CONTENT_TAG . '#isU', $content, $regs)) {
    455455            $content = str_replace($regs[0], "", $content);
    456456        }
     
    775775       
    776776        // Remove extra dots from the list of pages, allowing it to be shortened.
    777         $output = ereg_replace('(\. ){2,}', ' .. ', $output);
     777        $output = preg_replace('#(\. ){2,}#sU', ' .. ', $output);
    778778       
    779779        // Determine whether to show the HTML, or just return it.
  • formbuilder/trunk/html/options_edit_form.inc.php

    r371672 r1030489  
    139139                                        $module_data = implode("", file($module_filename));
    140140               
    141                                         if(eregi("\n\w*name\: ([^\r\n]+)", $module_data, $regs)) {
     141                                        if(preg_match("#\n\w*name\: ([^\r\n]+)#is", $module_data, $regs)) {
    142142                                            $module_name = $regs[1];
    143143                                        } else {
     
    146146                                        $field['options'][$entry] = $module_name;
    147147                                       
    148                                         if(eregi("\n\w*instructions\: ([^\r\n]+)", $module_data, $regs)) {
     148                                        if(preg_match("#\n\w*instructions\: ([^\r\n]+)#is", $module_data, $regs)) {
    149149                                            $module_instructions = "\\n\\n" . addslashes($regs[1]);
    150150                                        } else {
  • formbuilder/trunk/modules/alternate_action.php

    r906598 r1030489  
    258258        }
    259259       
    260         if(eregi("HTTP/([^ ]+) +([0-9]+)", $header, $regs))
     260        if(preg_match("#HTTP/([^ ]+) +([0-9]+)#isU", $header, $regs))
    261261        {
    262262            $headers['HTTPVER'] = trim($regs[1]);
  • formbuilder/trunk/php/formbuilder_activation_script.inc.php

    r910488 r1030489  
    11051105                update_option('formbuilder_version', "1.00");
    11061106            }
    1107            
    1108        
    1109            
     1107
     1108
     1109
    11101110            // Upgrade to version 1.01
    11111111            if(get_option('formbuilder_version') < 1.01)
     
    11141114* Fixed an unpleasant bug introduced in v. 1.00
    11151115                    "));
    1116                
     1116
    11171117                update_option('formbuilder_version', "1.01");
     1118            }
     1119
     1120
     1121
     1122            // Upgrade to version 1.02
     1123            if(get_option('formbuilder_version') < 1.02)
     1124            {
     1125                formbuilder_admin_alert("Upgraded FormBuilder to version 1.02", nl2br("
     1126* Replaced a number of deprecated ereg() calls.
     1127                    "));
     1128
     1129                update_option('formbuilder_version', "1.02");
     1130            }
     1131
     1132
     1133
     1134            // Upgrade to version 1.03
     1135            if(get_option('formbuilder_version') < 1.03)
     1136            {
     1137                formbuilder_admin_alert("Upgraded FormBuilder to version 1.03", nl2br("
     1138* Additional actions and hooks for future enhancements.
     1139* SSL path fixes.
     1140                    "));
     1141
     1142                update_option('formbuilder_version', "1.03");
    11181143            }
    11191144           
  • formbuilder/trunk/php/formbuilder_admin_pages.inc.php

    r910179 r1030489  
    564564                        $module_data = implode("", file($module_filename));
    565565
    566                         if(eregi("\n\w*name\: ([^\r\n]+)", $module_data, $regs)) {
     566                        if(preg_match("#[\r\n]name\: ([^\r\n]+)[\r\n]#is", $module_data, $regs)) {
    567567                            $module_name = $regs[1];
    568568                        } else {
     
    571571                        $field['Type'] .= ",'$entry|$module_name'";
    572572                       
    573                         if(eregi("\n\w*instructions\: ([^\r\n]+)", $module_data, $regs)) {
     573                        if(preg_match("#[\r\n]*instructions\: ([^\r\n]+)[\r\n]#is", $module_data, $regs)) {
    574574                            $module_instructions = "\\n\\n" . addslashes($regs[1]);
    575575                        } else {
     
    855855                    $module_data = implode("", file($module_filename));
    856856   
    857                     if(eregi("\n\w*name\: ([^\r\n]+)", $module_data, $regs)) {
     857                    if(preg_match("#\n\w*name\: ([^\r\n]+)#isU", $module_data, $regs)) {
    858858                        $module_name = $regs[1];
    859859                    } else {
     
    863863                    $action['name'] = $module_name;
    864864                   
    865                     if(eregi("\n\w*instructions\: ([^\r\n]+)", $module_data, $regs)) {
     865                    if(preg_match("#\n\w*instructions\: ([^\r\n]+)#isU", $module_data, $regs)) {
    866866                        $module_instructions = "\\n\\n" . addslashes($regs[1]);
    867867                    } else {
     
    10381038        if(!isset($field_info['Title'])) $field_info['Title'] = "";
    10391039
    1040         if(eregi("[a-z]+\(([0-9]+)\)", $field_info['Type'], $regs))
     1040        if(preg_match("#[a-z]+\(([0-9]+)\)#isU", $field_info['Type'], $regs))
    10411041        {
    10421042            if($regs[1] > 50)  $size = 50;
     
    10541054        }
    10551055
    1056         elseif(eregi("enum\((.+)\)", $field_info['Type'], $regs))
     1056        elseif(preg_match("#enum\((.+)\)#isU", $field_info['Type'], $regs))
    10571057        {
    10581058            $enum_values = explode(",", $regs[1]);
     
    10851085        }
    10861086       
    1087         elseif(eregi("blob", $field_info['Type'])
    1088             OR eregi("text", $field_info['Type'])
    1089             OR eregi("longtext", $field_info['Type']))
     1087        elseif(strpos("blob", $field_info['Type']) !== false
     1088            OR strpos("text", $field_info['Type']) !== false
     1089            OR strpos("longtext", $field_info['Type']) !== false )
    10901090        {
    10911091            $blob_cols = 52;
  • formbuilder/trunk/php/formbuilder_parser.php

    r250774 r1030489  
    2121*/
    2222
    23     $basestart = strpos(__FILE__, 'wp-content/');
    24     $basepath = substr(__FILE__, 0, $basestart);
     23    $basepath = dirname(dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))))) . '/';
     24
    2525    $wp_load = $basepath . 'wp-load.php';
    2626    $wp_conf = $basepath . 'wp-config.php';
     
    3030   
    3131    // Define the field ID
    32     if(eregi("^[0-9]+$", trim($_GET['fieldid'])))
     32    if(preg_match("#^[0-9]+$#isU", trim($_GET['fieldid'])))
    3333        $field_id = trim($_GET['fieldid']);
    3434    else
  • formbuilder/trunk/php/formbuilder_processing.inc.php

    r910488 r1030489  
    131131        $siteurl = get_option('siteurl');
    132132        $relative_path = str_replace(ABSOLUTE_PATH, "/", FORMBUILDER_PLUGIN_PATH);
    133         $page_path = $siteurl . $relative_path;
     133        //$page_path = $siteurl . $relative_path;
     134        $page_path = plugin_dir_url(__DIR__);
    134135
    135136        // Pull the form data from the db for the selected form ID.
     
    153154        if($form['action'] != "") {
    154155            if(include_once(FORMBUILDER_PLUGIN_PATH . "modules/" . $form['action'])) {
    155                 $startup_funcname = "formbuilder_startup_" . eregi_replace("\..+", "", $form['action']);
    156                 $processor_funcname = "formbuilder_process_" . eregi_replace("\..+", "", $form['action']);
     156                $startup_funcname = "formbuilder_startup_" . preg_replace("#\..+#is", "", $form['action']);
     157                $processor_funcname = "formbuilder_process_" . preg_replace("#\..+#is", "", $form['action']);
    157158
    158159                if(function_exists("$startup_funcname"))
     
    194195           
    195196            $formDisplay = "";
     197            $post_errors = '';
    196198           
    197199            $formDisplay = apply_filters('formbuilder_prepend_formDisplay', $formDisplay);
    198200
    199             $formDisplay .= "\n<form class='formBuilderForm form-horizontal $formTags' id='formBuilder$formID' " .
     201            $formDisplayID = "formBuilder{$formID}";
     202            $formDisplayID = apply_filters('formbuilder_formDisplayID', $formDisplayID);
     203
     204            $formDisplay .= "\n<form class='formBuilderForm form-horizontal $formTags' id='{$formDisplayID}' " .
    200205                    "action='" . $form['action_target'] . "' method='" . strtolower($form['method']) . "' onsubmit='return fb_disableForm(this);'>" .
    201206                    "<input type='hidden' name='formBuilderForm[FormBuilderID]' value='" . $form_id . "' />";
     207
     208            $formDisplay = apply_filters('formbuilder_formDisplay_formStart', $formDisplay);
    202209
    203210           
     
    244251            $related = $wpdb->get_results($sql, ARRAY_A);
    245252
     253            // Filter the fields as needed.
     254            $related = apply_filters('formbuilder_filter_fields_processing', $related);
     255            $formDisplay = apply_filters('formbuilder_formDisplay_post_field_filter', $formDisplay);
     256
    246257            $submit_button_set = false;
    247258
     
    276287                    $error_msg = "";
    277288                   
    278                     $divClass = "control-group formBuilderField " . eregi_replace("[^a-z0-9]", "-", $field['field_type']);
     289                    $divClass = "control-group formBuilderField " . preg_replace("#[^a-z0-9]#isU", "-", $field['field_type']);
    279290                    $divID = "formBuilderField" . clean_field_name($field['field_name']);
    280291
     
    318329                    {
    319330                        // If there is a POST value, assign it to the field.
    320                         $field['value'] = htmlentities(stripslashes($_POST['formBuilderForm'][$field['field_name']]), ENT_QUOTES, get_option('blog_charset'));
     331                        if(empty($_POST['formBuilderForm'][$field['field_name']]))
     332                            $field['value'] = '';
     333                        else
     334                            $field['value'] = htmlentities(stripslashes($_POST['formBuilderForm'][$field['field_name']]), ENT_QUOTES, get_option('blog_charset'));
    321335                    }
    322336                    elseif(isset($_GET[$field['field_name']]))
     
    362376                                $option_value = $option_label = $options[$field['value']];
    363377                           
    364                             if(!eregi(FORMBUILDER_PATTERN_EMAIL, $option_value))
     378                            if(!preg_match('#' . FORMBUILDER_PATTERN_EMAIL . '#isU', $option_value))
    365379                            {
    366380                                $error_msg = $field['error_message'];
     
    762776                        break;
    763777                    }
    764                    
    765                     if($field['field_type'] != 'system field' && $field['field_type'] != 'wp user id')
    766                     {
    767                         $formDisplay .= "\n<div class='$divClass' id='$divID' title='" . $field['error_message'] . "' $visibility><a name='$divID'></a>";
    768 
    769                         if(isset($_POST['formBuilderForm']['FormBuilderID']) AND $_POST['formBuilderForm']['FormBuilderID'] == $form_id)
    770                             $formDisplay .= "\n<span id='formBuilderErrorSpace$divID'>$formError</span>";
    771                         elseif(!isset($_GET['supress_errors']) AND !isset($_GET['suppress_errors']))
    772                             $formDisplay .= "\n<span id='formBuilderErrorSpace$divID'>$formError</span>";
    773    
    774                         $formDisplay .= "\n$formLabel";
    775                         $formDisplay .= "\n$formInput";
    776                         $formDisplay .= "\n</div>";
    777                     }
    778                    
     778
     779                    $formFieldDisplay = apply_filters('formbuilder_display_field_filter', $field);
     780
     781                    if(empty($formFieldDisplay) && $field['field_type'] != 'system field' && $field['field_type'] != 'wp user id')
     782                    {
     783                        $formFieldDisplay .= "\n<div class='$divClass' id='$divID' title='" . $field['error_message'] . "' $visibility><a name='$divID'></a>";
     784
     785                        if(isset($_POST['formBuilderForm']['FormBuilderID']) AND $_POST['formBuilderForm']['FormBuilderID'] == $form_id)
     786                            $formFieldDisplay .= "\n<span id='formBuilderErrorSpace$divID'>$formError</span>";
     787                        elseif(!isset($_GET['supress_errors']) AND !isset($_GET['suppress_errors']))
     788                            $formFieldDisplay .= "\n<span id='formBuilderErrorSpace$divID'>$formError</span>";
     789
     790                        $formFieldDisplay .= "\n$formLabel";
     791                        $formFieldDisplay .= "\n$formInput";
     792                        $formFieldDisplay .= "\n</div>";
     793                    }
     794
     795                    // Allow for other methods of displaying the form field
     796                    $formDisplay .= $formFieldDisplay;
     797
    779798                    // Check for new page of form details.
    780799                    if($new_page == true)
     
    910929                }
    911930            }
     931
     932            // Create extended form variable.
     933            $extendedForm = $form;
     934            $extendedForm['allFields'] = $allFields;
     935
     936            if(isset($_POST['formBuilderForm']['FormBuilderID'])
     937               && $_POST['formBuilderForm']['FormBuilderID'] == $form_id)
     938            {
     939                // Final check of fields before marking form as successfully submitted...
     940                $extendedForm = apply_filters('formbuilder_submit_final_check', $extendedForm);
     941                $post_errors = apply_filters('formbuilder_final_errors_filter', $post_errors);
     942            }
     943
    912944           
    913945            // Process Form Results if necessary
    914             if(!isset($post_errors)
     946            if(empty($post_errors)
    915947            && isset($_POST['formBuilderForm']['FormBuilderID'])
    916948            && $_POST['formBuilderForm']['FormBuilderID'] == $form_id)
    917949            {
    918            
    919            
     950
     951                // Apply filter to fields after successful form submission.
     952                $extendedForm = apply_filters('formbuilder_submit_success_pre_value_parsing', $extendedForm);
    920953           
    921954                // Convert numeric selection values to the real form values
    922955                // Iterate through the form fields to add values to the email sent to the recipient.
    923                 foreach($allFields as $key=>$field)
     956                foreach($extendedForm['allFields'] as $key=>$field)
    924957                {
    925958                    // If select box or radio buttons, we need to translate the posted value into the real value.
     
    938971                            $option_value = $option_label = $roption;
    939972                        }
    940                        
    941                         $allFields[$key]['value'] = trim($option_value);
    942                     }
    943                 }
    944                
    945                    
    946                
    947                
     973
     974                        $extendedForm['allFields'][$key]['value'] = trim($option_value);
     975                    }
     976                }
     977
     978                $extendedForm = apply_filters('formbuilder_submit_success_post_value_parsing', $extendedForm);
     979
    948980                $msg = "";
    949981                // If enabled, put backup copies of the form data into a database.
    950982                if(get_option('formbuilder_db_xml') != '0')
    951983                {
    952                     $msg = formbuilder_process_db($form, $allFields);
     984                    $msg = formbuilder_process_db($form, $extendedForm['allFields']);
    953985                }
    954986               
     
    958990                        if(function_exists("$processor_funcname"))
    959991                        {
    960                             $msg = $processor_funcname($form, $allFields);
     992                            $msg = $processor_funcname($form, $extendedForm['allFields']);
    961993                            $func_run = true;
    962994                        }
    963995                        else
    964                             $msg = formbuilder_process_email($form, $allFields);
     996                            $msg = formbuilder_process_email($form, $extendedForm['allFields']);
    965997                }
    966998                else
    967                     $msg = formbuilder_process_email($form, $allFields);
     999                    $msg = formbuilder_process_email($form, $extendedForm['allFields']);
    9681000                   
    9691001                // Check for and process any redirections at this point.
    970                 if(!$msg) formbuilder_check_redirection($form, $allFields);
     1002                if(!$msg) formbuilder_check_redirection($form, $extendedForm['allFields']);
    9711003
    9721004                if(!isset($func_run))
     
    9821014                        // Populate ~variable~ tags in the autoresponse with values submitted by the user.
    9831015                        $txtAllFields = "";
    984                         foreach($allFields as $field)
     1016                        foreach($extendedForm['allFields'] as $field)
    9851017                        {
    9861018                            if(
     
    10261058            else
    10271059            {
    1028                 if(isset($post_errors) AND isset($missing_post_fields) AND $post_errors AND $missing_post_fields)
     1060                if(!empty($post_errors) AND !empty($missing_post_fields))
    10291061                {
    10301062                    $msg = "\n<div class='formBuilderFailure alert alert-error'><h4>" . $formBuilderTextStrings['form_problem'] . "</h4><p>" . $formBuilderTextStrings['send_mistakes'] . "</p>";
     
    10371069                    $formDisplay = $msg;
    10381070                }
    1039                 elseif(isset($post_errors) AND is_string($post_errors))
     1071                elseif(!empty($post_errors) AND is_string($post_errors))
    10401072                {
    10411073                    $msg = "\n<div class='formBuilderFailure alert alert-error'><h4>" . $formBuilderTextStrings['form_problem'] . "</h4>";
     
    10451077                }
    10461078            }
     1079
     1080            $formDisplay = apply_filters('formbuilder_formDisplay_final', $formDisplay);
    10471081
    10481082            return("<div id='$formCSSID'>$formDisplay</div>");
     
    10611095    function formbuilder_check_redirection($form, $fields)
    10621096    {
     1097        $redirect_url = '';
     1098
    10631099        // Iterate through the form fields to add values to the email sent to the recipient.
    10641100        foreach($fields as $field)
     
    10671103            if($field['field_type'] == "followup page" AND trim($field['field_value']) != "")
    10681104            {
    1069                 //echo "<meta HTTP-EQUIV='REFRESH' content='0; url=" . $field['field_value'] . "'>";
    1070                 header("Location: " . $field['field_value']);
    1071             }
    1072 
     1105                $redirect_url = $field['field_value'];
     1106                break;
     1107            }
     1108        }
     1109
     1110        // Capture any plugin related redirects.
     1111        $redirect_url = apply_filters('formbuilder_redirection', $redirect_url);
     1112
     1113        if(!empty($redirect_url))
     1114        {
     1115            header("Location: " . $redirect_url);
    10731116        }
    10741117    }
     
    11141157            case "email address":
    11151158                $pattern = FORMBUILDER_PATTERN_EMAIL;
    1116                 if(eregi($pattern, $field['value']))
     1159                if(preg_match('#' . $pattern . '#isU', $field['value']))
    11171160                {
    11181161                    $last_email_address = $field['value'];
     
    11631206        }
    11641207   
    1165         if(!preg_match("#" . $pattern . "#isu", $field['value']))
     1208        if(!preg_match("#" . $pattern . "#isU", $field['value']))
    11661209        {
    11671210            $post_errors = true;
     
    12751318            {
    12761319                // If we have a recipient selection field, change the form recipient to the selected value.
    1277                 if( eregi(FORMBUILDER_PATTERN_EMAIL, trim($field['value'])) )
     1320                if( preg_match('#' . FORMBUILDER_PATTERN_EMAIL . '#isU', trim($field['value'])) )
    12781321                {
    12791322                    $form['recipient'] = trim($field['value']);
  • formbuilder/trunk/php/phpcreditcard.php

    r537019 r1030489  
    168168   
    169169  // Check that the number is numeric and of the right sort of length.
    170   if (!eregi('^[0-9]{13,19}$',$cardNo))  {
     170  if (!preg_match('#^[0-9]{13,19}$#isU', $cardNo))  {
    171171     $errornumber = 2;     
    172172     $errortext = $ccErrors [$errornumber];
     
    217217  for ($i=0; $i<sizeof($prefix); $i++) {
    218218    $exp = '^' . $prefix[$i];
    219     if (ereg($exp,$cardNo)) {
     219    $exp = str_replace('#', '\#', $exp);
     220    if (preg_match("#{$exp}#sU",$cardNo)) {
    220221      $PrefixValid = true;
    221222      break;
  • formbuilder/trunk/readme.txt

    r910488 r1030489  
    33Tags: form, forms, email, comments, contact, input, spam, form to email, email form, contact form
    44Requires at least: 2.7
    5 Tested up to: 3.9
    6 Stable tag: 1.01
     5Tested up to: 4.0.1
     6Stable tag: 1.03
    77
    88Allows WordPress bloggers to easily create customised contact forms for use on pages or posts.
     
    6969== Changelog ==
    7070
     71= 1.03 =
     72* Bug Fix: Regex fixes in various places to replace deprecated code.
     73* Bug Fix: Path fixes to support SSL properly.
     74* Added some action hooks and filters in preparation for future enhancements.
     75
    7176= 1.00 =
    7277* It's high-time we hit the 1.0 mark with this plugin. With the change in ownership, this is a good time to do it.
Note: See TracChangeset for help on using the changeset viewer.