diff --git a/gosa-plugins/goto/addons/goto/class_gotoLogView.inc b/gosa-plugins/goto/addons/goto/class_gotoLogView.inc
index 4193a586c6f686979cd5a03ac5babc4ebede683b..12937512cab55acd559ab13410dc3a005e42788a 100644 (file)
<?php
-class goto_log_view extends plugin
+class gotoLogView extends plugin
{
var $mac;
/* Query for log files
*/
$res = $this->o_queue->get_log_info_for_mac($this->mac);
- if($this->o_queue->is_error()){
+ if($this->o_queue->is_configured() && $this->o_queue->is_error()){
msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG);
}
$this->selected_date = key($res[$this->mac]);
$this->logs = $res;
}
+
}
function execute()
{
+ plugin::execute();
+
$smarty = get_smarty();
$smarty->assign("logs",$this->logs);
$smarty->assign("logs_available", isset($this->logs[$this->mac]));
$divlist->AddEntry($entry);
}
+ $smarty->assign("ACL",preg_match("/r/",$this->getacl("")));
$smarty->assign("divlist",$divlist->DrawList());
return($smarty->fetch(get_template_path('log_view.tpl', TRUE,dirname(__FILE__))));
}
function get_log($mac,$date,$file)
{
$res = $this->o_queue->get_log_file($mac,$date,$file);
- if($this->o_queue->is_error()){
+ if($this->o_queue->is_configured() && $this->o_queue->is_error()){
msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG);
}
$res = nl2br(htmlentities($res));
$this->sort_by = $_GET['sort_by'];
}
}
+
+
+ /* Return plugin informations for acl handling */
+ static function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Log view"),
+ "plDescription" => _("GOto log view"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 30,
+ "plSection" => array("administration"),
+ "plCategory" => array("workstation","server"),
+
+ "plProvidedAcls"=> array()
+ ));
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>