fix file exists
This commit is contained in:
parent
546a89429f
commit
dc54ac50e2
@ -1089,7 +1089,7 @@ class ICrmOrderActions
|
||||
*/
|
||||
|
||||
public static function forkedOrderAgent() {
|
||||
if(self::isForkable() && is_callable('curl_init')) {
|
||||
if(self::isForkable()) {
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch,CURLOPT_URL,
|
||||
($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') .
|
||||
@ -1534,8 +1534,8 @@ class ICrmOrderActions
|
||||
public static function isForkable() {
|
||||
$fork = COption::GetOptionString('main', 'agents_use_crontab', 'N');
|
||||
if($fork === 'N') {
|
||||
$dir = $_SERVER['DOCUMENT_ROOT'] . '/retailcrm/agent.php';
|
||||
return file_exists($dir) && is_dir($dir);
|
||||
$file = $_SERVER['DOCUMENT_ROOT'] . '/retailcrm/agent.php';
|
||||
return file_exists($file) && is_callable('curl_init');
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user