Plugin Directory

Changeset 882327


Ignore:
Timestamp:
03/26/2014 01:24:23 PM (12 years ago)
Author:
SultanICQ
Message:

1.1.6

  • Fixes subdomain verification process
Location:
domain-sharding/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • domain-sharding/trunk/domain-sharding.php

    r882326 r882327  
    55Description: This plugin allows us to change the root domain of images and stylesheets that currently are inside the actual domain and then use a domain sharding structure.
    66Author: David Garcia
    7 Version: 1.1.5
     7Version: 1.1.6
    88*/
    99
     
    162162                    $plugin_url = plugin_dir_url(__FILE__);
    163163
     164                    $main_check_response = '';
    164165                    // Get the contents of the test file.
    165166                    $main_check_file = 'domain.check.valid.txt';
    166167                    $main_check_value = wp_remote_get($plugin_url . $main_check_file );
     168
     169                    if ( isset( $main_check_value['response']['code'] ) )
     170                    {
     171                        $main_check_response = @$main_check_value['response']['code'] . ' ' . @$main_check_value['response']['message'];
     172                    }
     173
    167174                    if ( is_array( $main_check_value ) && $main_check_value['response']['code']=='200' )
    168175                    {
     
    222229                        }
    223230                    } else {
    224                         $verify_result .= ' <strong style="color:#F00;text-decoration:uppercase;">'.__('The file used to check the subdomain configuration is missing. Try reinstalling the plugin.', $this->_slug).'</strong>';
     231                        $verify_result .= ' <strong style="color:#F00;text-decoration:uppercase;">'.__('The file used to check the subdomain configuration is missing. Try reinstalling the plugin.', $this->_slug).'</strong> Server Response Code: ' . $main_check_response;
    225232                    }
    226233                }
     
    365372    }
    366373
    367     function ds_build_domain( $number, $use_schema = true )
     374    function ds_build_domain( $number, $use_schema = true, $use_path = true )
    368375    {
    369376        $domain = str_replace('#', $number, $this->ds_domain);
     
    371378        $host_parsed = parse_url($domain);
    372379
    373         $domain = $host_parsed['host'] . $host_parsed['path'];
     380        $domain = $host_parsed['host'];
     381        if ( $use_path && !empty($host_parsed['path']) )
     382        {
     383            $domain .= $host_parsed['path'];
     384        }
    374385        if ( $use_schema )
    375386        {
     
    450461        for($x=1;$x<=$max;$x++)
    451462        {
    452             $domain = $this->ds_build_domain( $x, false );
     463            $domain = $this->ds_build_domain( $x, false, false );
    453464            $data .= "'$domain',\n";
    454465        }
  • domain-sharding/trunk/readme.txt

    r882326 r882327  
    44Requires at least: 2.8
    55Tested up to: 3.8.1
    6 Stable tag: 1.1.5
     6Stable tag: 1.1.6
    77
    88This plugin modify the url of the images to speed up the page browsing.
     
    3737
    3838== Changelog ==
     39
     40= 1.1.6 =
     41* Fixes subdomain verification process
    3942
    4043= 1.1.5 =
Note: See TracChangeset for help on using the changeset viewer.