clean code
This commit is contained in:
parent
6144b6e99d
commit
daba310395
@ -30,10 +30,24 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
|
|||||||
*/
|
*/
|
||||||
class box_last_knowledgerecord extends ModeleBoxes
|
class box_last_knowledgerecord extends ModeleBoxes
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string boxcode
|
||||||
|
*/
|
||||||
public $boxcode = "box_last_knowledgerecord";
|
public $boxcode = "box_last_knowledgerecord";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string box img
|
||||||
|
*/
|
||||||
public $boximg = "knowledgemanagement";
|
public $boximg = "knowledgemanagement";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string boc label
|
||||||
|
*/
|
||||||
public $boxlabel;
|
public $boxlabel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box dependancies
|
||||||
|
*/
|
||||||
public $depends = array("knowledgemanagement");
|
public $depends = array("knowledgemanagement");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,8 +55,19 @@ class box_last_knowledgerecord extends ModeleBoxes
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string param
|
||||||
|
*/
|
||||||
public $param;
|
public $param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box info heads
|
||||||
|
*/
|
||||||
public $info_box_head = array();
|
public $info_box_head = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box info content
|
||||||
|
*/
|
||||||
public $info_box_contents = array();
|
public $info_box_contents = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +92,7 @@ class box_last_knowledgerecord extends ModeleBoxes
|
|||||||
*/
|
*/
|
||||||
public function loadBox($max = 5)
|
public function loadBox($max = 5)
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $user, $langs;
|
||||||
|
|
||||||
$this->max = $max;
|
$this->max = $max;
|
||||||
|
|
||||||
@ -161,14 +186,19 @@ class box_last_knowledgerecord extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num == 0) {
|
if ($num == 0) {
|
||||||
$this->info_box_contents[$i][0] = array('td' => '', 'text' => '<span class="opacitymedium">'.$langs->trans("BoxLastTicketNoRecordedTickets").'</span>');
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => '',
|
||||||
|
'text' => '<span class="opacitymedium">'.$langs->trans("BoxLastTicketNoRecordedTickets").'</span>',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[0][0] = array('td' => '',
|
$this->info_box_contents[0][0] = array(
|
||||||
'text' => '<span class="opacitymedium">'.$langs->trans("ReadPermissionNotAllowed").'</span>');
|
'td' => '',
|
||||||
|
'text' => '<span class="opacitymedium">'.$langs->trans("ReadPermissionNotAllowed").'</span>',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,24 @@ require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php";
|
|||||||
*/
|
*/
|
||||||
class box_last_modified_knowledgerecord extends ModeleBoxes
|
class box_last_modified_knowledgerecord extends ModeleBoxes
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string boxcode
|
||||||
|
*/
|
||||||
public $boxcode = "box_last_modified_knowledgerecord";
|
public $boxcode = "box_last_modified_knowledgerecord";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string box img
|
||||||
|
*/
|
||||||
public $boximg = "knowledgemanagement";
|
public $boximg = "knowledgemanagement";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string boc label
|
||||||
|
*/
|
||||||
public $boxlabel;
|
public $boxlabel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box dependancies
|
||||||
|
*/
|
||||||
public $depends = array("knowledgemanagement");
|
public $depends = array("knowledgemanagement");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,8 +55,19 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string param
|
||||||
|
*/
|
||||||
public $param;
|
public $param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box info heads
|
||||||
|
*/
|
||||||
public $info_box_head = array();
|
public $info_box_head = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array box info content
|
||||||
|
*/
|
||||||
public $info_box_contents = array();
|
public $info_box_contents = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +92,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
|
|||||||
*/
|
*/
|
||||||
public function loadBox($max = 5)
|
public function loadBox($max = 5)
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $user, $langs;
|
||||||
|
|
||||||
$this->max = $max;
|
$this->max = $max;
|
||||||
|
|
||||||
@ -161,14 +186,19 @@ class box_last_modified_knowledgerecord extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num == 0) {
|
if ($num == 0) {
|
||||||
$this->info_box_contents[$i][0] = array('td' => '', 'text' => '<span class="opacitymedium">'.$langs->trans("BoxLastTicketNoRecordedTickets").'</span>');
|
$this->info_box_contents[$i][0] = array(
|
||||||
|
'td' => '',
|
||||||
|
'text' => '<span class="opacitymedium">'.$langs->trans("BoxLastTicketNoRecordedTickets").'</span>',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[0][0] = array('td' => '',
|
$this->info_box_contents[0][0] = array(
|
||||||
'text' => '<span class="opacitymedium">'.$langs->trans("ReadPermissionNotAllowed").'</span>');
|
'td' => '',
|
||||||
|
'text' => '<span class="opacitymedium">'.$langs->trans("ReadPermissionNotAllowed").'</span>',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user