diff --git a/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc b/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc
index cbbbcfcab72c369639d46449b7f3f79f4255838b..1990dd30d9a69ab5c45d5c570a2fbc42391aaffa 100644 (file)
{
/* Definitions */
var $plHeadline = "FAX Reports";
- var $plDescription = "View the FAX report or single documents that have been recieved";
+ var $plDescription = "View the FAX report or single documents that have been received";
var $plIcon = "plugins/gofax/images/reports.png";
/* For internal use */
/* Create class */
function faxreport (&$config, &$ui)
{
+ $this->initTime = microtime(TRUE);
+
/* Include config object */
$this->config = $config;
$this->ui = &$ui;
foreach($tmp as $attrs){
$this->uidToDN[$attrs['uid'][0]] = $attrs['dn'];
}
+
+ // Create statistic table entry
+ stats::log('plugin', $class = get_class($this), $category = array($this->acl_category), $action = 'open',
+ $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
+
}
// Check database accessibility
if(!isset($this->config->data['SERVERS']['FAX'])){
- msg_dialog::display(_("Error"), _("No fax server found!"), ERROR_DIALOG);
+ msg_dialog::display(_("Error"), _("No FAX server found!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}elseif(!is_callable("mysql_connect")){
msg_dialog::display(_("Configuration error"), sprintf(
$link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']);
if ($link === FALSE){
msg_dialog::display(_("Error"), sprintf(
- _("Cannot connect to %s database!"), "GOfax"), ERROR_DIALOG);
+ _("Cannot connect to %s database!"), "<b>".$cfg['SERVER'].":"."GOfax"."</b>"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
if (! @mysql_select_db("gofax")){
// Query for the requested fay entry
$query = "SELECT id,uid,date_format(queuing_time, '%Y%m%d%H%i%s') ".
"as queuing_time,status,sender_id,sender_msn,receiver_id,".
- "receiver_msn,pages,status_message,transfer_time FROM faxlog WHERE id=".$detail.";";
+ "receiver_msn,pages,status_message,transfer_time FROM faxlog WHERE id='".$detail."';";
$cfg= $this->config->data['SERVERS']['FAX'];
$result = @mysql_query($query);
$acls = $this->ui->get_permissions($dn,"users/viewFaxEntries","");
if(!preg_match("/r/",$acls)){
msg_dialog::display(_("Permission error"),
- _("You have no permission to view this fax id!"), ERROR_DIALOG);
+ _("You have no permission to view this FAX id!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
}
$format= _("Y-M-D");
$queuing_time= $line['queuing_time'];
- $smarty->assign("plug", "?plug=".get_post('plug'));
- $smarty->assign("detail", set_post(get_post($detail)));
+
+ $plug = (isset($_GET['plug'])) ? '?plug='.$_GET['plug'] : '';
+ $smarty->assign("plug", $plug);
+ $smarty->assign("detail", set_post($detail));
$date= preg_replace("/Y/", substr($queuing_time,0,4), $format);
$date= preg_replace("/M/", substr($queuing_time,4,2), $date);
$date= preg_replace("/D/", substr($queuing_time,6,2), $date);
{
return (array(
- "plShortName" => _("View fax reports"),
- "plDescription" => _("View fax reports")." <i>"._("All entries are readonly")."</i>",
+ "plShortName" => _("View FAX reports"),
+ "plDescription" => _("View FAX reports")." <i>"._("All entries are read-only")."</i>",
"plRequirements"=> array(
'activePlugin' => 'faxreport',
'ldapSchema' => array('goFaxAccount' => '>=1.0.4'),
"plProvidedAcls" => array(
"detailedView" => _("Detailed view and download"),
"id" => _("Fax ID"),
+ "uid" => _("The username"),
"queuingtime" => _("Date")." / "._("Time"),
"status" => _("Status"),
"senderid" => _("Sender ID"),