Fix. multiple calls fax_send caused error.

Fix. require EventSocket implicitly.
Fix. require `test` class.
This commit is contained in:
Alexey Melnichuk 2015-11-12 14:00:01 +03:00
parent bea4a02056
commit 4fde7dfc80
2 changed files with 20 additions and 12 deletions

View File

@ -29,6 +29,7 @@ include "root.php";
require_once "resources/require.php";
require_once "resources/functions/object_to_array.php";
require_once "resources/functions/parse_attachments.php";
require_once "resources/classes/text.php";
//get accounts to monitor
$sql = "select * from v_fax ";

View File

@ -98,21 +98,28 @@ if (!$included) {
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.((count($_SESSION["domains"]) > 1) ? '/'.$_SESSION['domain_name'] : null);
}
function correct_path($p) {
global $IS_WINDOWS;
if ($IS_WINDOWS) {
return str_replace('/', '\\', $p);
}
return $p;
else {
require_once "resources/classes/EventSocket.php";
}
function gs_cmd($args) {
global $IS_WINDOWS;
if ($IS_WINDOWS) {
return 'gswin32c '.$args;
if(!function_exists('correct_path')) {
function correct_path($p) {
global $IS_WINDOWS;
if ($IS_WINDOWS) {
return str_replace('/', '\\', $p);
}
return $p;
}
}
if(!function_exists('gs_cmd')) {
function gs_cmd($args) {
global $IS_WINDOWS;
if ($IS_WINDOWS) {
return 'gswin32c '.$args;
}
return 'gs '.$args;
}
return 'gs '.$args;
}
//get the fax extension