+ Add tips for repo server cannot connect.
This commit is contained in:
@@ -379,11 +379,13 @@ class adminModel extends model
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkInternet(): bool
|
||||
public function checkInternet($url = ''): bool
|
||||
{
|
||||
if(empty($url)) $url = $this->config->admin->apiSite;
|
||||
|
||||
$timeout = 1;
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $this->config->admin->apiSite);
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
Reference in New Issue
Block a user