1
0
mirror of synced 2025-02-21 09:23:14 +03:00

fix file exists

This commit is contained in:
Grigory Pomadchin 2014-11-25 15:32:28 +03:00
parent 546a89429f
commit dc54ac50e2

View File

@ -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;