Changeset 2334672
- Timestamp:
- 07/03/2020 07:46:17 AM (6 years ago)
- Location:
- appful/trunk
- Files:
-
- 2 edited
-
appful.php (modified) (1 diff)
-
singletons/api.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
appful/trunk/appful.php
r2314331 r2334672 4 4 Plugin URI: https://appful.io/ 5 5 Description: appful is one of the world's most remarkable & beautiful app service for Blogger and Online magazines. It is designed to create outstanding real native iOS and Android Apps based on the content of your Wordpress site or YouTube channel. appful is surprisingly simple to use and not a single line of code is required. 6 Version: 1.0.1 196 Version: 1.0.120 7 7 Author: appful GmbH 8 8 Author URI: https://appful.io/ -
appful/trunk/singletons/api.php
r2314329 r2334672 421 421 } 422 422 423 if (isset($_REQUEST["setServer"])) {424 $this->save_option("appful_server_id", (int)$_REQUEST["setServer"]);425 }426 427 423 if (isset($_REQUEST["setSession"])) { 428 424 $this->save_option($this->wpml->filterVar("appful_session_id"), $_REQUEST["setSession"]); … … 722 718 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 723 719 curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); 720 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 724 721 if (isset($_REQUEST["debug_curl"])) { 725 722 curl_setopt($ch, CURLOPT_VERBOSE, true); … … 768 765 $url = "https://api.appful.io/v2/plugin/". $location; 769 766 if (!get_option("appful_ssl_available") && !get_option("appful_disable_ssl")) { 770 if (get_option("appful_last_ssl_check")+ 24*60*60 < time()) {767 if (get_option("appful_last_ssl_check")+60 < time()) { 771 768 $fp = fsockopen("ssl://api.appful.io", 443, $ErrNo, $ErrString, 30); 772 769 … … 798 795 if (!$response) $response = $this->get_contents($url, $params); 799 796 800 if ((!$response || !$response && $serverOffline) && !isset($_REQUEST["useSSL"])) {801 $serverCount = get_option("appful_server_count", 2);802 for ($i = 1; $i <= $serverCount; $i++) {803 if ($i != get_option("appful_server_id", 1)) {804 $response = $this->get_contents(str_replace("s". get_option("appful_server_id", 1). ".", "s". $i . ".", $url), $params);805 if ($response) {806 $this->save_option("appful_server_id", $i);807 break;808 }809 }810 }811 }812 813 797 if (!$response) { 814 798 delete_option("appful_ssl_available"); … … 822 806 $this->save_option("appful_invalid_session", "1"); 823 807 } 824 if ($response["server_id"] > 0) { 825 $this->save_option("appful_server_id", $response["server_id"]); 826 } 808 827 809 return $response; 828 810 } … … 1185 1167 if(isset($response["payload"]["overlay_banner"])) $this->save_option("appful_overlay_banner", $this->response->encode_json($response["payload"]["overlay_banner"])); 1186 1168 else delete_option("appful_overlay_banner"); 1187 $this->save_option("appful_server_count", $response["payload"]["server_count"] ? $response["payload"]["server_count"] : 2);1188 1169 if (isset($response["payload"]["push_default"])) $this->save_option("appful_push_default", $response["payload"]["push_default"] ? 1 : 0); 1189 1170 if (isset($response["payload"]["cached_post_types"])) $this->save_option("appful_cached_post_types", $this->response->encode_json($response["payload"]["cached_post_types"]));
Note: See TracChangeset
for help on using the changeset viewer.