mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Set downloading voip client as the default
Use same tmp dir as Limesurvey Check if tmp dir writable before using to avoid server overloading
This commit is contained in:
@@ -92,9 +92,9 @@ if (is_voip_enabled($operator_id))
|
|||||||
$exta = $exts[1];
|
$exta = $exts[1];
|
||||||
$extp = get_extension_password($operator_id);
|
$extp = get_extension_password($operator_id);
|
||||||
if (get_extension_status($operator_id))
|
if (get_extension_status($operator_id))
|
||||||
print "<div class='online statusbutton'><a href='news://turnvoipoff'>" . T_("VoIP On") . "</a></div>";
|
print "<div class='online statusbutton'>" . T_("VoIP On") . "</div>";
|
||||||
else
|
else
|
||||||
print "<div class='offline statusbutton'><a href='irc://$exta:$extp@" . VOIP_SERVER . "/'>" . T_("VoIP Off") . "</a></div>";
|
print "<div class='offline statusbutton'><a href='voip/downloadvoipclient.php'>" . T_("VoIP Off") . "</a></div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
print "<div class='online statusbutton'>" . T_("No VoIP") . "</div>";
|
print "<div class='online statusbutton'>" . T_("No VoIP") . "</div>";
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function tempdir($dir, $prefix='', $mode=0700)
|
|||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tempdir = realpath(dirname(__FILE__) . '/tmp');
|
$tempdir = realpath(dirname(__FILE__) . '/../include/limesurvey/tmp');
|
||||||
$operator_id = get_operator_id();
|
$operator_id = get_operator_id();
|
||||||
|
|
||||||
if ($operator_id)
|
if ($operator_id)
|
||||||
@@ -60,6 +60,8 @@ if ($operator_id)
|
|||||||
$rs = $db->GetRow($sql);
|
$rs = $db->GetRow($sql);
|
||||||
|
|
||||||
if (!empty($rs))
|
if (!empty($rs))
|
||||||
|
{
|
||||||
|
if (is_writable($tempdir))
|
||||||
{
|
{
|
||||||
$zipdir=tempdir($tempdir);
|
$zipdir=tempdir($tempdir);
|
||||||
|
|
||||||
@@ -98,5 +100,6 @@ if ($operator_id)
|
|||||||
readfile($zipfile);
|
readfile($zipfile);
|
||||||
unlink($zipfile);
|
unlink($zipfile);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user