Plugin Directory

Changeset 2739599


Ignore:
Timestamp:
06/09/2022 03:59:18 AM (4 years ago)
Author:
diversesolutions
Message:

Updating to version $dsphpversion

Location:
dsidxpress/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • dsidxpress/trunk/admin.php

    r2549383 r2739599  
    103103        $googleMapAPIsAPIKey = isset($account_options->{'GoogleMapsAPIKey'})? esc_html($account_options->{'GoogleMapsAPIKey'}):'';
    104104
    105         if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY") || DSIDXPRESS_GOOGLEMAP_API_KEY == '')
     105        if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY"))
    106106            define("DSIDXPRESS_GOOGLEMAP_API_KEY", $googleMapAPIsAPIKey);
    107107    }
     
    158158            wp_enqueue_script('dsidxpress_admin_utilities', DSIDXPRESS_PLUGIN_URL . 'js/admin-utilities.js', array(), DSIDXPRESS_PLUGIN_VERSION, true);
    159159            wp_localize_script('dsidxpress_admin_utilities', 'mlsCapabilities', self::$capabilities);
    160             wp_localize_script('dsidxpress_admin_utilities', 'dsIDXPressPackage', $dsIDXPressPackage);
     160            wp_add_inline_script('dsidxpress_admin_utilities', 'var dsIDXPressPackage = "' . $dsIDXPressPackage . '";', 'before');
    161161            wp_localize_script('dsidxpress_admin_utilities', 'dsIDXSeachSetupMapData', $mapLatLangData);
    162162            wp_enqueue_style('dsidxpress_admin_options_style', DSIDXPRESS_PLUGIN_URL . 'css/admin-options.css', array(), DSIDXPRESS_PLUGIN_VERSION);
  • dsidxpress/trunk/ajax-handler.php

    r2497486 r2739599  
    211211            }
    212212       
    213         $dsidx_action = $post_vars['dsidx_action'];
    214         $name = $post_vars['name'];
    215         $firstName =  $post_vars['firstName'];
    216         $lastName =  $post_vars['lastName'];
    217         $emailAddress =  $post_vars['emailAddress'];
    218         $phoneNumber = $post_vars['phoneNumber'];
    219         $scheduleYesNo = $post_vars['scheduleYesNo'];
    220         $scheduleDateMonth = $post_vars['scheduleDateMonth'];
    221         $scheduleDateDay = $post_vars['scheduleDateDay'];
    222         $propertyStreetAddress = $post_vars['propertyStreetAddress'];
    223         $propertyCity = $post_vars['propertyCity'];
    224         $propertyZip =  $post_vars['propertyZip'];
    225         $propertyState = $post_vars['propertyState'];
    226         $returnToReferrer = $post_vars['returnToReferrer'];
    227         $propertyID = $post_vars['propertyID'];
    228         $PackageTypeID = $post_vars['PackageTypeID'];
     213        $dsidx_action = isset($post_vars['dsidx_action']) ? $post_vars['dsidx_action'] : '';
     214        $name = isset($post_vars['name']) ? $post_vars['name'] : '';
     215        $firstName = isset($post_vars['firstName']) ? $post_vars['firstName'] : '';
     216        $lastName = isset($post_vars['lastName']) ? $post_vars['lastName'] : '';
     217        $emailAddress = isset($post_vars['emailAddress']) ? $post_vars['emailAddress'] : '';
     218        $phoneNumber = isset($post_vars['phoneNumber']) ? $post_vars['phoneNumber'] : '';
     219        $scheduleYesNo = isset($post_vars['scheduleYesNo']) ? $post_vars['scheduleYesNo'] : '';
     220        $scheduleDateMonth = isset($post_vars['scheduleDateMonth']) ? $post_vars['scheduleDateMonth'] : '';
     221        $scheduleDateDay = isset($post_vars['scheduleDateDay']) ? $post_vars['scheduleDateDay'] : '';
     222        $propertyStreetAddress = isset($post_vars['propertyStreetAddress']) ? $post_vars['propertyStreetAddress'] : '';
     223        $propertyCity = isset($post_vars['propertyCity']) ? $post_vars['propertyCity'] : '';
     224        $propertyZip = isset($post_vars['propertyZip']) ? $post_vars['propertyZip'] : '';
     225        $propertyState = isset($post_vars['propertyState']) ? $post_vars['propertyState'] : '';
     226        $returnToReferrer = isset($post_vars['returnToReferrer']) ? $post_vars['returnToReferrer'] : '';
     227        $propertyID = isset($post_vars['propertyID']) ? $post_vars['propertyID'] : '';
     228        $PackageTypeID = isset($post_vars['PackageTypeID']) ? $post_vars['PackageTypeID'] : '';
    229229
    230230        if($dsidx_action !== "ContactForm") {
  • dsidxpress/trunk/client.php

    r2538310 r2739599  
    143143        remove_action("wp_head", "feed_links_extra");
    144144
     145        // Removing short link from the plugin
     146        remove_action('wp_head', 'wp_shortlink_wp_head');
     147
    145148        $wp_query->found_posts = 0;
    146149        $wp_query->max_num_pages = 0;
     
    161164        $post_id = !$idx_page_id?time():$idx_page_id;
    162165
    163         if ($options["AdvancedTemplate"])
     166        if (isset($options["AdvancedTemplate"]))
    164167            wp_cache_set($post_id, array("_wp_page_template" => array($options["AdvancedTemplate"])), "post_meta");
    165168
     
    272275        if ($action == "results") {
    273276            // save search
    274             if(!empty($get["idx-save"]) && $get["idx-save"] == "true") {
     277            if(isset($get["idx-save"]) && !empty($get["idx-save"]) && $get["idx-save"] == "true") {
    275278                $apiParams["name"] = $get["idx-save-name"];
    276                 $apiParams["updates"] = $get["idx-save-updates"] == "on" ? "true" : "false";
     279                $apiParams["updates"] = isset($get["idx-save-updates"]) && $get["idx-save-updates"] == "on" ? "true" : "false";
    277280
    278281                $apiHttpResponse = dsSearchAgent_ApiRequest::FetchData("SaveSearch", $apiParams, false, 0);
  • dsidxpress/trunk/dsidxpress.php

    r2641022 r2739599  
    77Author: Diverse Solutions
    88Author URI: http://www.diversesolutions.com/
    9 Version: 3.15.0
     9Version: 3.16.0
    1010*/
    1111
     
    201201    $remoteOptions = json_decode($accountOptionsResponse["body"]);
    202202    $localOptions = get_option(DSIDXPRESS_OPTION_NAME);
    203     $localOptions["UseAlternateUrlStructure"] = strtolower($remoteOptions->UseAlternateUrlStructureInDsIdxPress) == "true";
     203
     204    if(isset($remoteOptions->UseAlternateUrlStructureInDsIdxPress)) {
     205        $localOptions["UseAlternateUrlStructure"] = strtolower($remoteOptions->UseAlternateUrlStructureInDsIdxPress) == "true";
     206    }
     207
    204208    update_option(DSIDXPRESS_OPTION_NAME, $localOptions);
    205209    $wp_rewrite->flush_rules();
  • dsidxpress/trunk/dsidxwidgets/widget-service-mapsearch.php

    r2583880 r2739599  
    2222       
    2323        $googleMapAPIsAPIKey = isset($account_options->{'GoogleMapsAPIKey'})? $account_options->{'GoogleMapsAPIKey'}:'';
    24         if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY") || DSIDXPRESS_GOOGLEMAP_API_KEY == '')
     24        if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY"))
    2525            define("DSIDXPRESS_GOOGLEMAP_API_KEY", $googleMapAPIsAPIKey);
    2626  }
  • dsidxpress/trunk/dsidxwidgets/widget-service-quicksearch.php

    r2583880 r2739599  
    55
    66    public function __construct() {
     7        global $pagenow;
     8
    79        parent::__construct("dsidx-quicksearch", "Quick Search", array(
    810            "classname" => "dsidx-widget-quicksearch",
    911            "description" => "Show a quicksearch input widget"
    1012            ));
     13
     14        if ($pagenow == 'widgets.php') {
     15            wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
     16        }
    1117
    1218        $this->widgetsCdn = dsWidgets_Service_Base::$widgets_cdn;
     
    8086    }
    8187    function form($instance) {
    82         wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
    8388        $instance = wp_parse_args($instance, array(
    8489            "eDomain" =>   "",
  • dsidxpress/trunk/dsidxwidgets/widget-service-recentstatus.php

    r2583880 r2739599  
    44
    55    public function __construct() {
     6        global $pagenow;
     7
    68        parent::__construct("dsidx-recentstatus", "Recent Properties", array(
    79            "classname" => "dsidx-widget-recentstatus",
    810            "description" => "Show recent listings from a specific status"
    911            ));
     12
     13        if ($pagenow == 'widgets.php') {
     14            wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
     15        }
    1016
    1117        $this->widgetsCdn = dsWidgets_Service_Base::$widgets_cdn;
     
    96102    }
    97103    function form($instance) {
    98         wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
    99104        $personal_info = stripslashes_deep(get_option('personal_info'));
    100105        $city = empty($personal_info['city']) ? 'Irvine' : $personal_info['city'];
  • dsidxpress/trunk/js/admin-utilities.js

    r2126989 r2739599  
    203203                                    html += '<input type="checkbox" name="groupListStatus" value="2"' + selectConditional + '>Conditional<div style="height:6px; clear:both;"></div>';
    204204                                }
    205                                 if(('HasSoldData' in mlsCapabilities) && mlsCapabilities['HasSoldData'] !== ''){
     205                                if(('HasPendingData' in mlsCapabilities) && mlsCapabilities['HasPendingData'] !== ''){
    206206                                    html += '<input type="checkbox" name="groupListStatus" value="4"' + selectPending + '>Pending<div style="height:6px; clear:both;"></div>';
    207207                                }
  • dsidxpress/trunk/js/autocomplete.js

    r2641022 r2739599  
    325325    }
    326326    if(item.SupportingInfo.indexOf('Address;') != -1)
    327         url = url+item.Name.replace(/ /g, "_");
     327        url = url+item.Name.replace(/ /g, "_").replace(/-/g, "_").replace(/_{2,}/g, "_");
    328328   window.location = url;
    329329}
  • dsidxpress/trunk/readme.txt

    r2641022 r2739599  
    33Tags: IDX, MLS, real estate, realtor, housing, listings, SEO, CRM, lead capture, mobile friendly, customizable, diverse solutions, market leader, ds, marketleader, rets, idxpress, dsidxpress
    44Requires at least: 4.5.0
    5 Tested up to: 5.8
    6 Stable tag: 3.15.0
     5Tested up to: 6.0
     6Stable tag: 3.16.0
    77Requires PHP: 5.4.0
    88
     
    120120
    121121== Changelog ==
     122
     123= 3.16.0 =
     124* WordPress v6.0 compatibility fixes
     125* Non functional short-links Removed
     126* Missing Pending status is added on IDX Filters
     127* Addresses with hyphens searching issue has been fixed
     128* Image scaling issue has been fixed for Thumbnail view
     129* MLS compliance stuff
     130* MLS Number with long characters searching issue has been fixed
    122131
    123132= 3.15.0 =
  • dsidxpress/trunk/rewrite.php

    r2497486 r2739599  
    6767        $uri = strtok( $_SERVER['REQUEST_URI'], '?' );
    6868        if( substr( $uri, -4 ) == '/idx' ){
    69             $protocol = $_SERVER['HTTPS'] ? 'https://' : 'http://';
     69            $protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
    7070            $host = $_SERVER['HTTP_HOST'];
    7171            $querystring = $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '';
  • dsidxpress/trunk/shortcodes.php

    r2538310 r2739599  
    3737        dsidx_footer::ensure_disclaimer_exists();
    3838        $isAdminPost = false;
    39         $referer  =  stripslashes($_SERVER["HTTP_REFERER"]);       
     39
     40        $referer = '';
     41        if(isset($_SERVER["HTTP_REFERER"])) {
     42            $referer = stripslashes($_SERVER["HTTP_REFERER"]);
     43        }
     44
    4045        if ((strpos($referer, '/wp-admin/') !== false) && ((strpos($referer, 'action') !== false) || (strpos($referer, 'post_type') !== false)) ) {
    4146            $isAdminPost = true;
     
    5964            }
    6065            if ($apiHttpResponse["response"]["code"] == "404") {
    61                 return '<p class="dsidx-error">'.sprintf(DSIDXPRESS_INVALID_MLSID_MESSAGE, $atts[mlsnumber]).'</p>';
     66                return '<p class="dsidx-error">'.sprintf(DSIDXPRESS_INVALID_MLSID_MESSAGE, $atts['mlsnumber']).'</p>';
    6267            }
    6368            else if (empty($apiHttpResponse["errors"]) && $apiHttpResponse["response"]["code"] == "200") {
  • dsidxpress/trunk/tinymce/link_builder/dialog.php

    r2497486 r2739599  
    3232    $googleMapAPIsAPIKey = isset($account_options->{'GoogleMapsAPIKey'})? $account_options->{'GoogleMapsAPIKey'}:'';
    3333
    34     if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY") || DSIDXPRESS_GOOGLEMAP_API_KEY == '')
     34    if (!defined("DSIDXPRESS_GOOGLEMAP_API_KEY"))
    3535        define("DSIDXPRESS_GOOGLEMAP_API_KEY", $googleMapAPIsAPIKey);
    3636}
  • dsidxpress/trunk/widget-idx-quick-search.php

    r2583880 r2739599  
    77
    88    public function __construct() {
     9        global $pagenow;
     10
    911        parent::__construct("dsidx-quicksearch", "IDX Quick Search", array(
    1012            "classname" => "dsidx-widget-quick-search",
    1113            "description" => "Choose either horizontal or vertical format. A simple responsive search form. Allow users to type any location, select from available property types and filter by price range."
    1214            ));
     15
     16        if ($pagenow == 'widgets.php') {
     17            wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
     18        }
    1319
    1420        $this->widgetsCdn = dsWidgets_Service_Base::$widgets_cdn;
     
    128134    }
    129135    function form($instance) {
    130         wp_enqueue_script('dsidxwidgets_widget_service_admin', DSIDXWIDGETS_PLUGIN_URL . 'js/widget-service-admin.js', array('jquery'), false, true);
    131136        $instance = wp_parse_args($instance, array(
    132137            "title" => "Real Estate Search",
  • dsidxpress/trunk/widget-listings.php

    r2583880 r2739599  
    22class dsSearchAgent_ListingsWidget extends WP_Widget {
    33    public function __construct() {
     4        global $pagenow;
     5       
    46        parent::__construct("dsidx-listings", "IDX Listings", array(
    57            "classname" => "dsidx-widget-listings",
    68            "description" => "Show a list of real estate listings"
    79        ));
    8            
     10
     11        if ($pagenow == 'widgets.php') {
     12            wp_enqueue_script('dsidxpress_widget_listings', DSIDXPRESS_PLUGIN_URL . 'js/widget-listings.js', array('jquery'), DSIDXPRESS_PLUGIN_VERSION, true);
     13        }           
    914    }
    1015    function widget($args, $instance) {
     
    113118    }
    114119    function form($instance) {
    115         wp_enqueue_script('dsidxpress_widget_listings', DSIDXPRESS_PLUGIN_URL . 'js/widget-listings.js', array('jquery'), DSIDXPRESS_PLUGIN_VERSION, true);
    116120        $options = get_option(DSIDXPRESS_OPTION_NAME);
    117121        $instance = wp_parse_args($instance, array(
  • dsidxpress/trunk/widget-search.php

    r2583880 r2739599  
    22class dsSearchAgent_SearchWidget extends WP_Widget {
    33    function __construct() {
     4        global $pagenow;
     5
    46        $this->WP_Widget("dsidx-search", "IDX Search", array(
    57            "classname" => "dsidx-widget-search",
    68            "description" => "A real estate search form"
    79        ));
     10
     11        if ($pagenow == 'widgets.php') {
     12            wp_enqueue_script('dsidxpress_widget_search', DSIDXPRESS_PLUGIN_URL . 'js/widget-search.js', array('jquery'), DSIDXPRESS_PLUGIN_VERSION, true);
     13        }
    814    }
    915    function widget($args, $instance) {
     
    226232    }
    227233    function form($instance) {
    228         wp_enqueue_script('dsidxpress_widget_search', DSIDXPRESS_PLUGIN_URL . 'js/widget-search.js', array('jquery'), DSIDXPRESS_PLUGIN_VERSION, true);
    229        
    230234        $pluginUrl = DSIDXPRESS_PLUGIN_URL;
    231235
Note: See TracChangeset for help on using the changeset viewer.