Plugin Directory

Changeset 1556545


Ignore:
Timestamp:
12/17/2016 07:08:38 AM (9 years ago)
Author:
baseapp
Message:

json_decode fix

Location:
wpbase-cache/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpbase-cache/trunk/wpbase-cache-admin.php

    r1462053 r1556545  
    134134        $wpbase_cache->flush_all_cache();
    135135
    136         delete_option('wpbase_req_cache');
     136        delete_option('wpbase_req_cache_new');
    137137       
    138138        echo 1;
     
    151151}
    152152else{
    153     delete_option('wpbase_req_cache');
     153    delete_option('wpbase_req_cache_new');
    154154    delete_option('wpbase_check_site');
    155155}
  • wpbase-cache/trunk/wpbase-cache.php

    r1462053 r1556545  
    7171            $dbname = $match[1];
    7272            $sitename = substr($dbname, 2);
    73             $req_cache = get_option('wpbase_req_cache');
     73            $req_cache = get_option('wpbase_req_cache_new');
    7474            $req_cache = json_decode($req_cache, true);
    75             if (!get_option('wpbase_req_cache')) {
     75            if (!get_option('wpbase_req_cache_new')) {
    7676                $content = wp_remote_get("https://wpoven.com/sites/checksiteinfo/" . $sitename);
    77                 $return_array = json_decode($content, true);
    78                 update_option('wpbase_req_cache', $content);
     77                $return_array = json_decode($content['body'], true);
     78                update_option('wpbase_req_cache_new', $content['body']);
    7979            } else {
    8080                $return_array = $req_cache;
Note: See TracChangeset for help on using the changeset viewer.