diff --git a/plugins/admin/systems/class_glpiPrinterCartridgesEdit.inc b/plugins/admin/systems/class_glpiPrinterCartridgesEdit.inc
index ff8d42751a43bb6f07cf7074028394c1686c49e3..eff3a80f6139caed4b2428759440af7f3627c565 100644 (file)
class glpiPrinterCartridgesEdit extends plugin
{
class glpiPrinterCartridgesEdit extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array("ID","name","ref","location","type","FK_glpi_enterprise","tech_num","deleted","comments","alarm");
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array("ID","name","ref","location","type","FK_glpi_enterprise","tech_num","deleted","comments","alarm");
if(!in_array($id,$users)){
/* If this user doesn't exists in glpi db, we must create him */
if(!in_array($id,$users)){
/* If this user doesn't exists in glpi db, we must create him */
- $atr = $ldap->fetch($ldap->cat($id));
+ $ldap->cat($id, array('cn', 'mail', 'telephoneNumber'));
+ $atr = $ldap->fetch();
$tmp = array();
$use = array( "cn" =>"name",
"mail" =>"email",
$tmp = array();
$use = array( "cn" =>"name",
"mail" =>"email",
Assign name ... to smarty, if set
*/
if(isset($users[$this->tech_num])){
Assign name ... to smarty, if set
*/
if(isset($users[$this->tech_num])){
- $tr = $ldap->fetch($ldap->cat($users[$this->tech_num]));
+ $ldap->cat($users[$this->tech_num], array('givenName', 'sn', 'uid'));
+ $tr = $ldap->fetch();
$str = "";
if(isset($tr['givenName'][0])){ $str .= $tr['givenName'][0]." "; }
if(isset($tr['sn'][0])) { $str .= $tr['sn'][0]." "; }
$str = "";
if(isset($tr['givenName'][0])){ $str .= $tr['givenName'][0]." "; }
if(isset($tr['sn'][0])) { $str .= $tr['sn'][0]." "; }
/* Check given values */
function check(){
/* Check given values */
function check(){
- $message=array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
/* Avoid choosing an already used name */
$types = $this->parent->handle->getCartridgeTypeInformations();
/* Avoid choosing an already used name */
$types = $this->parent->handle->getCartridgeTypeInformations();