summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87d9d99)
raw | patch | inline | side by side (parent: 87d9d99)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 May 2006 10:03:39 +0000 (10:03 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 May 2006 10:03:39 +0000 (10:03 +0000) |
- fixed a set of fetch(cat) combinations
- layout fixes
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3266 594d385d-05f5-0310-b6e9-bd551577e9d8
- layout fixes
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3266 594d385d-05f5-0310-b6e9-bd551577e9d8
43 files changed:
index 4e09567845fe74eb793dcfca2d65fe6d285f5df8..3a7cfd1d22675480423a66309f5048bd604e5f90 100644 (file)
--- a/TODO
+++ b/TODO
Now:
* Add iframe progress for departments when handling tagging
-* What about unitTag's when moving objects?
- - ok for departments - everything is copied here anyway
- - single object moving has to be checked
-* Check several ldap->cat() for needed attributes
+* check class_plugin.inc and what effects a ldap->cat(..., $this->attributes)
+ will have to other plugins
* Enhance show_ldap_error() with an additional programmer supplied message
+* Change FAIstate when triggering actions
Target for 2.5:
diff --git a/html/getFAIscript.php b/html/getFAIscript.php
index e86bdcc78277a4f5bd777807aa3d7682eaf665a6..b22451a6798c965b3ed895b88a283276245d07e7 100644 (file)
--- a/html/getFAIscript.php
+++ b/html/getFAIscript.php
$ldap = $_SESSION['config']->get_ldap_link();
$ldap->cd($_SESSION['config']->current['BASE']);
- $sr= $ldap->cat($id);
+ $sr= $ldap->cat($id, array("FAItemplateFile", "FAIscript", "cn", "objectClass"));
$ei= ldap_first_entry($ldap->cid, $sr);
if(isset($_GET['is_template'])){
$tmp = ldap_get_values_len($ldap->cid, $ei,"FAItemplateFile");
diff --git a/html/index.php b/html/index.php
index e1baef37cb86bb383a54fbf4c56965ec1a72ae56..dd9cc28b93083f42e60d47178d1b551312cf901e 100644 (file)
--- a/html/index.php
+++ b/html/index.php
}
}
/* Check for locking area */
- $ldap->cat($config->current['CONFIG']);
+ $ldap->cat($config->current['CONFIG'], array("dn"));
$attrs= $ldap->fetch();
if (!count ($attrs)){
$ldap->cd($config->current['BASE']);
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index f8546bdf777bea71d35d447d2b44e66b2ec22d1a..94ae4c9244c550832c26e33ae3a45fb2dd118cd5 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
function fetch()
{
+ $att= array();
if($this->hascon){
if($this->hasres){
if ($this->start == 0)
index c0ffba2b673fa44bdf3889d204122204e05679cd..97571da7900f3e6d51f3190319cc0ba9508d6e64 100644 (file)
// read current password entry for $dn, to detect the encryption Method
$ldap = $config->get_ldap_link();
- $ldap->cat ($dn);
+ $ldap->cat ($dn, array("shadowLastChange", "userPassword"));
$attrs = $ldap->fetch ();
// Set encryption type to clear if required
index c769b8fc32a7a9e52ba2c2901928c293c50ad7de..bab07709a5bb257c505272a0d67e806e3fb93fb8 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* Try to use plain entry first */
$dn= "$attribute=".$this->$attribute.",$base";
- $ldap->cat ($dn);
+ $ldap->cat ($dn, array('dn'));
if (!$ldap->fetch()){
return ($dn);
}
}
$dn= "$attribute=".$this->$attribute."+$attr=".$this->$attr.",$base";
- $ldap->cat ($dn);
+ $ldap->cat ($dn, array('dn'));
if (!$ldap->fetch()){
return ($dn);
}
}
$ldap->cat($src_dn);
- $attrs= array();
$attrs= $ldap->fetch();
if (!count($attrs)){
trigger_error("Trying to move $src_dn, which does not seem to exist.",
$ldap= $this->config->get_ldap_link();
/* Check if destination exists - abort */
- $ldap->cat($dst_dn);
+ $ldap->cat($dst_dn, array('dn'));
if ($ldap->fetch()){
trigger_error("recursive_move $dst_dn already exists.",
E_USER_WARNING);
if ($tag != ""){
/* Set objectclass and attribute */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($dn);
+ $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
$attrs= $ldap->fetch();
if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
echo "DEBUG: $dn is already tagged<br>";
} else {
/* Remove objectclass and attribute */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($dn);
+ $ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
$attrs= $ldap->fetch();
if (!in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass'])){
echo "DEBUG: $dn is not tagged<br>";
index 79e9526793437484a4699054ac3248f1a205e749..5ac469a8434828c5e447cc63276c437259928507 100644 (file)
function userinfo($config, $userdn){
$this->config= $config;
$ldap= $this->config->get_ldap_link();
- $ldap->cat($userdn);
+ $ldap->cat($userdn,array('sn', 'givenName', 'uid', 'gidNumber', 'preferredLanguage'));
$attrs= $ldap->fetch();
if (isset($attrs['givenName'][0]) && isset($attrs['sn'][0])){
diff --git a/include/functions.inc b/include/functions.inc
index 94ec5b80d440f8a8fa7bc59938e4d06681c6c055..0bedbcee828d14132802645e0bcddf07024a8a0d 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
$_SESSION['dn']= $dn;
$ldap= $config->get_ldap_link();
- $ldap->cat ($user);
+ $ldap->cat ($user, array('uid', 'cn'));
$attrs= $ldap->fetch();
$uid= $attrs["uid"][0];
$cn= $attrs["cn"][0];
$remove= false;
- // print_a($_POST);
- // print_a($_GET);
-
if((isset($_SESSION['LOCK_VARS_TO_USE']))&&(count($_SESSION['LOCK_VARS_TO_USE']))){
$_SESSION['LOCK_VARS_USED'] =array();
foreach($_SESSION['LOCK_VARS_TO_USE'] as $name){
}
-function show_ldap_error($message)
+function show_ldap_error($message, $addon= "")
{
if (!preg_match("/Success/i", $message)){
- print_red (_("LDAP error:")." $message");
+ if ($addon == ""){
+ print_red (_("LDAP error:")." $message");
+ } else {
+ print_red ("$addon (LDAP error: $message)");
+ }
return TRUE;
} else {
return FALSE;
diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc
index 63415e90ecdc2bc1f8870dde112bcc9afca502e2..0f71b2eac18e89dbc61a36135e29eb30ba2bd506 100644 (file)
/* Get target */
$ldap= $this->config->get_ldap_link();
- $ldap->cat(base64_decode($_GET['target']));
+ $ldap->cat(base64_decode($_GET['target']), array('telephoneNumber', 'mobile', 'homePhone'));
$attrs= $ldap->fetch();
if (isset($attrs["$dialmode"])){
$target= $attrs[$dialmode][0];
/* Get source */
$ui= get_userinfo();
- $ldap->cat($ui->dn);
+ $ldap->cat($ui->dn, array('telephoneNumber'));
$attrs= $ldap->fetch();
if (isset($attrs["telephoneNumber"])){
$source= $attrs['telephoneNumber'][0];
/* Fill variables from LDAP */
if ($_SESSION['show_info'] != "ADD"){
- $ldap->cat($_SESSION['show_info']);
+ $ldap->cat($_SESSION['show_info'], $this->attributes);
$info= $ldap->fetch();
}
foreach ($this->attributes as $name){
/* Save data. Using 'modify' implies that the entry is already present, use 'add' for
new entries. So do a check first... */
$ldap= $this->config->get_ldap_link();
- $ldap->cat ($this->dn);
+ $ldap->cat ($this->dn,array('dn'));
if ($ldap->fetch()){
$mode= "modify";
} else {
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index da52cb304ad45e052debdf21e503bc5bcdbb950e..c50184cf9e41f351de38a9824c20a8ca43b372f2 100644 (file)
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
if (count($a)){
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 6d0343adee3c9f16bab1eb62c7ded13d378cdd8d..5086303fc72976bd9042fbe64c4708007b93c9b0 100644 (file)
/* Check for presence of this department */
$ldap= $this->config->get_ldap_link();
- $attrs= $ldap->cat ($this->dn);
+ $attrs= $ldap->cat ($this->dn, array('dn'));
if ($this->orig_dn == "new" && !($attrs === FALSE)){
$message[]= _("Department with that 'Name' already exists.");
} elseif ($this->orig_dn != $this->dn && !($attrs === FALSE)){
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
$ldap->cd($this->dn);
$ldap= $this->config->get_ldap_link();
/* Check if destination exists - abort */
- $ldap->cat($dst_dn);
+ $ldap->cat($dst_dn, array('dn'));
if ($ldap->fetch()){
trigger_error("Recursive_move $dst_dn already exists.",
E_USER_WARNING);
index 3f1be86de5082e1b58b6595dd2998633c43c290b..7bf6e75bd298d697f725a9cba71bf7e83cd22bc7 100644 (file)
/* Find out more about the object type */
$ldap = $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('objectClass'));
$attrs = $ldap->fetch();
$type = $this->get_type($attrs);
index 70d2096d4fbeb2e4abb5911e97fc7d9afdfbb176..43ca39a03b2f0a0bcdabaa2e4e59a24b75a7743c 100644 (file)
// $this->attrs["FAIinstallMethod"]= "aptitude";
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
$ldap->cd($this->dn);
index fbe589efd0eac078ad5af5d7389404f8947aebf1..c018ea8f36246b47d54a9132ac494a70374391e6 100644 (file)
if(isset($_GET['show'])){
$ldap = $this->config->get_ldap_link();
- $ldap->cat(base64_decode($_GET['id']));
+ $ldap->cat(base64_decode($_GET['id']), array('FAIscript', 'FAIhook', 'FAItemplate'));
$attrs = $ldap->fetch();
if($_GET['type'] == "FAIscript"){
$str = $attrs['FAIscript'][0];
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index b7e18d58a5de80ee2d0f2aa584c4af45b87510d3..c7f5b7b6de12759db76293dc0e9ba355d5fe77cf 100644 (file)
$found = $attrs['dn'];
}
}
- $ldap->cat($found);
+ $ldap->cat($found, array("gosaApplicationParameter"));
}else{
$ldap->cd($this->config->current['BASE']);
$ldap->search("(&(objectClass=gosaApplication)(cn=$appname))",array("gosaApplicationParameter"));
-
}
diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc
index 61a63131439c63402c0361fbb53458343999457d..5d32a551b7f14ccb78b1fe012eb926907bac5774 100644 (file)
/* Save data. Using 'modify' implies that the entry is already present, use 'add' for
new entries. So do a check first... */
- $ldap->cat ($this->dn);
+ $ldap->cat ($this->dn, array('dn'));
if ($ldap->fetch()){
/* Modify needs array() to remove values :-( */
if (!count ($this->memberUid)){
index 81afff4e310d2e66395062b99044d229b509355e..6e6004fbaf51f6a240371e37d87fed4e99615d53 100644 (file)
$ldap = $this->config->get_ldap_link();
if($this->dn != $new_dn){
- $ldap->cat ($new_dn);
+ $ldap->cat ($new_dn, array('dn'));
}
if($ldap->count() !=0){
/* Save data. Using 'modify' implies that the entry is already present, use 'add' for
new entries. So do a check first... */
- $ldap->cat ($this->dn);
+ $ldap->cat ($this->dn, array('dn'));
if ($ldap->fetch()){
/* Modify needs array() to remove values :-( */
if (!count ($this->member)){
index b33232e1ffb47d198e7a5045ae650e8fe8fa3233..7d68d846d7de22a1a49651a1de3a7d42905eedd2 100644 (file)
if(isset($this->attrs['member'])){
for ($i= 0; $i<$this->attrs['member']['count']; $i++){
$member= $this->attrs['member'][$i];
- $ldap->cat($member);
+ $ldap->cat($member, array('objectClass', 'macAddress', 'cn'));
if (preg_match("/success/i", $ldap->error)){
$attrs = $ldap->fetch();
if (in_array("gotoTerminal", $attrs['objectClass']) ||
diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc
index 0f8733c95fc264f5fb6b15c8577578215151bb5f..1ea5cab2ca06c1c369fd89da63aae805b7b730b0 100644 (file)
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",
Assign name ... to smarty, if set
*/
if(isset($users[$this->contact_num])){
- $tr = $ldap->fetch($ldap->cat($users[$this->contact_num]));
+ $ldap->cat($users[$this->contact_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]." "; }
Assign name ... to smarty, if set
*/
if(isset($users[$this->tech_num])){
- $tr = $ldap->fetch($ldap->cat($users[$this->tech_num]));
+ $tr = $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]." "; }
diff --git a/plugins/admin/systems/class_glpiPrinterAccount.inc b/plugins/admin/systems/class_glpiPrinterAccount.inc
index 4ee03e31ab7069c4b318b61ca5d43537205b99e1..ea5a02ef6dad8c7279181bdcf4351a09dda00e71 100644 (file)
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",
* Assign contact and technical responsible person
*/
if(isset($users[$this->contact_num])){
- $tr = $ldap->fetch($ldap->cat($users[$this->contact_num]));
+ $ldap->cat($users[$this->contact_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]." "; }
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]." "; }
diff --git a/plugins/admin/systems/class_glpiPrinterCartridgesEdit.inc b/plugins/admin/systems/class_glpiPrinterCartridgesEdit.inc
index c43a3f1124eaeda32136fd894571c1aea31613a9..7830396edc3ec3ed56ed6fcea95ad24d39ec950c 100644 (file)
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",
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]." "; }
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index cca13971748924c67cea1ece5cf1515d1b2505b2..d2ce0167e707102fd103d87301c557d459f7bd00 100644 (file)
/* set orig dn to new if object is new */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if(!$ldap->count()){
$this->orig_dn = "new";
}
/* Detect if this is a valid printer account;
*/
+ //FIXME: do we need to do this? we've already everything we need in $this->attrs...
$ldap = $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('objectClass'));
if($ldap->count()){
$attrs = $ldap->fetch();
/* Check if this dn points to a printer, to avoid deleting something else */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if(!$ldap->count()){
print_red("Trying to remove printer obejct which isn't a printer. Aborted to avoid data loss.");
return;
index a54546ec89bc798e29a714b57ec10689ffeeda6a..f2864d790c5eefa317cd4d84e10dc84313185b0d 100644 (file)
*/
foreach($tmp['add'] as $dn => $attrs){
$ldap->cd($dn);
- $ldap->cat($dn);
+ $ldap->cat($dn, array('dn'));
if(count($ldap->fetch())){
$ldap->cd($dn);
$ldap->modify ($attrs);
diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index bf510a9bb733fb48969aa1cc6dac53bd4fb7fa08..fc4d86ff83faa52fd81813ac7d8fd6face368420 100644 (file)
*/
foreach($tmp['add'] as $dn => $attrs){
$ldap->cd($dn);
- $ldap->cat($dn);
+ $ldap->cat($dn, array('dn'));
if(count($ldap->fetch())){
$ldap->cd($dn);
$ldap->modify ($attrs);
index ba733edf5a42eeda429aad425f1f01e52b0a1e5d..d8359c056f296763ad46f2b36351614e45cdaf54 100644 (file)
plugin::save();
/* Save or modify? */
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if (!$ldap->fetch()){
$mode= "add";
} else {
index 9e339ca318222004415ba31087a6535a91d02281..6066a4f775eeb4412d564b6ab7a55c0d01d5d12d 100644 (file)
}
}
$ldap = $this->config->get_ldap_link();
- $ldap->cat($mountdn);
+ $ldap->cat($mountdn, array('dn'));
$attrs = $ldap->fetch();
if (count($attrs) > 0) {
$smarty->assign("mount_checked", "checked");
diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc
index ddb27e1abc29e6e9ec0f5014ee579561e0d64179..c3247fb09fd249f1df40af8fabd263f169c56187 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if($ldap->count()){
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
}
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->config->current['BASE']);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if($ldap->count()){
$ldap->cd($this->dn);
diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc
index afc35e42b5e5d2e4c2db9be4209a05db3d7d15e6..15432a67467fc6245a471dfe3cb852973f896706 100644 (file)
# load data from mounts container
$ldap = $this->config->get_ldap_link();
- $ldap->cat($mountsdn);
+ $ldap->cat($mountsdn, array('dn'));
$attrs = $ldap->fetch();
# mounts container not present yet, so we create it
gosa_log("Mount container '$mountsdn' has been created");
}
- # remove deleted mounts from the container
- foreach ($this->mounts_to_remove as $entry) {
- $mount=$this->returnMountEntry($entry);
+ # remove deleted mounts from the container
+ foreach ($this->mounts_to_remove as $entry) {
+ $mount=$this->returnMountEntry($entry);
$mountdn = "cn=".$mount["cn"].","."$mountsdn";
-
- $ldap->cat($mountdn);
- $attrs = $ldap->fetch();
-
- if (count($attrs) != 0) {
- $ldap->rmdir($mountdn);
- show_ldap_error($ldap->get_error());
- gosa_log("Mount object '".$mountdn."' has been removed");
- }
- }
- # add new mounts to the container
- foreach ($this->mounts_to_add as $entry) {
-
+ $ldap->cat($mountdn, array('dn'));
+ $attrs = $ldap->fetch();
+
+ if (count($attrs) != 0) {
+ $ldap->rmdir($mountdn);
+ show_ldap_error($ldap->get_error());
+ gosa_log("Mount object '".$mountdn."' has been removed");
+ }
+ }
+
+ # add new mounts to the container
+ foreach ($this->mounts_to_add as $entry) {
+
$mount=$this->returnMountEntry($entry);
$mountdn = "cn=".$mount["cn"].","."$mountsdn";
- $ldap->cd($mountdn);
- $ldap->add($mount);
- show_ldap_error($ldap->get_error());
- gosa_log("Mount object '".$mountdn."' has been added");
- }
+ $ldap->cd($mountdn);
+ $ldap->add($mount);
+ show_ldap_error($ldap->get_error());
+ gosa_log("Mount object '".$mountdn."' has been added");
+ }
}
function get_share_type($share) {
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index f5b14ce3fcd1524cc234b70099652ac8dbc729da..5a6ba6fce7283e8106c3f0fe18ee79669b52acab 100644 (file)
/* Find out more about the object type */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('objectClass'));
$attrs= $ldap->fetch();
$type= $this->get_system_type($attrs['objectClass']);
/* Find out more about the object type */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('objectClass'));
$attrs= $ldap->fetch();
$type= $this->get_system_type($attrs['objectClass']);
$ldap = $this->config->get_ldap_link();
}
$ldap->cd ($this->dn);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if(count($ldap->fetch())){
$ldap->cd($this->dn);
$ldap->rmDir($this->dn);
index f7957f0259eede707d40d07fea5886ac701fd86b..d282fe08a0aab6e92258bd20643e4e252ca97b9a 100644 (file)
*/
foreach($tmp['add'] as $dn => $attrs){
$ldap->cd($dn);
- $ldap->cat($dn);
+ $ldap->cat($dn, array('dn'));
if(count($ldap->fetch())){
$ldap->cd($dn);
$ldap->modify ($attrs);
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index c3a227a3297eb0725f571e1540a3ffe1dfaad21a..ae91f5f28d947c19aa93ac9224631a8e9a62f66b 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if($ldap->count()){
$this->netConfigDNS->remove_from_parent();
$ldap->rmDir($this->dn);
diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index f893dd0f6133adf38363b82608952dfe525dfc1b..bb173ae29b01369a540489c7e037b37c0230b7a0 100644 (file)
$tmp= preg_replace ("/^[^,]+,/", "", $tmp);
$ldap->cat("cn=default,ou=terminals,ou=systems,$tmp".
- $this->config->current['BASE']);
+ $this->config->current['BASE'], array('gotoTerminalPath'));
$attrs= $ldap->fetch();
if (isset($attrs['gotoTerminalPath'])){
$this->gotoTerminalPath= $attrs['gotoTerminalPath'][0];
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index cd2ba4feb0a9cc5ceb0cabf7517a75b6ce0ae421..1cf3899b0a97ba9c5c67a0b894cfa7fb8bcb297d 100644 (file)
$tmp= preg_replace ("/^[^,]+,/", "", $tmp);
$ldap->cat("cn=default,ou=terminals,ou=systems,$tmp".
- $this->config->current['BASE']);
+ $this->config->current['BASE'], array('gotoTerminalPath'));
$attrs= $ldap->fetch();
if (isset($attrs['gotoTerminalPath'])){
$this->gotoTerminalPath= $attrs['gotoTerminalPath'][0];
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index 43360391a44ec0bcc51a3241eea914783ca53c31..828f5cf0dbb8e46e0db37a2f4c069e33e0be8819 100644 (file)
$config= $this->config;
$ldap_ui= $this->config->get_ldap_link();
if(isset($this->usertab->dn)){
- $user = ($ldap_ui->fetch($ldap_ui->cat($this->usertab->dn)));
+ $ldap_ui->cat($this->usertab->dn, array('uid'));
+ $user = $ldap_ui->fetch();
}else{
- $user = ($ldap_ui->fetch($ldap_ui->cat($this->dn)));
+ $ldap_ui->cat($this->dn, array('uid'));
+ $user = $ldap_ui->fetch();
}
if((is_array($user))&&(isset($user['uid']))){
$username= $user['uid'][0];
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index 0a713a327aa0d116f167c69c7a2465b78f0c9fa6..cae6f0d639823ed044f989169147c0a9be8cdcfb 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->base);
$ldap->search("cn=$this->cn",array("cn"));
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
if (count($a)){
diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index 7da0510bc4e21df634819ce0f384a68d3f1e512f..0cc2917090b2b4e9f780d8c528e0f83729954c42 100644 (file)
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
$ldap->cd($this->dn);
if (count($a)){
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events('modify');
} else {
diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc
index 4f481ff19351cafe8d75cc7b0c591e0afb911ef7..3dc7eb390c13b884f80a6b722fe24301d730a2de 100644 (file)
}
$ldap= $this->config->get_ldap_link();
- $ldap->cd ($conference['goFonConferenceOwner'][0]);
- $data = $ldap->fetch($ldap->cat($conference['goFonConferenceOwner'][0]));
+ $ldap->cat($conference['goFonConferenceOwner'][0], array('cn'));
+ $data = $ldap->fetch();
$cn = $data['cn'][0];
$a_field1 = array("string"=>sprintf($userimg,_("Conference")), "attach" => "style='text-align:center;width:20px;'");
index 0e0d556c81f3f47e335054b22cafaa9836db1795..1f316f50f376e1eadac7df780c32fedb317c8a6b 100755 (executable)
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
if(isset($this->orig_cn)){
diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index f5a762f940842f0be12b37fadabc8e066d0963c4..a167eacbc919fe9d773da07cc56cb0d0be634a7b 100755 (executable)
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
$a= $ldap->fetch();
if (count($a)){
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 14cf03c420f6e0219e150eca2b22184aa9172d05..6aa840bec5e5811f5c443f0417d38e2ba7580640 100644 (file)
* to the new configured printers.
*/
foreach($this->gotoPrinter as $printer) {
- $ldap->cd($printer['dn']);
$ldap->cat($printer['dn']);
$attrs= $ldap->fetch();
$attrs_used = array();
}
}
- $ldap->cat ($this->dn);
+ $ldap->cat ($this->dn, array('dn'));
if ($ldap->fetch()){
$mode= "modify";
} else {
index e7872c67f801757e6b5647242b75595ef37b5f53..e47078544a44f8fd8862f1af2fbdc18658323602 100644 (file)
/* Save data. Using 'modify' implies that the entry is already present, use 'add' for
new entries. So do a check first... */
- $ldap->cat ($this->dn);
+ $ldap->cat ($this->dn, array('dn'));
if ($ldap->fetch()){
$mode= "modify";
} else {
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 55c127eb7b01a3da91d93bd260cc7f19e8999c82..c61d6252f2bc300635d95d031edc7b39d9bb2e9e 100644 (file)
/* Walk through groups and add the descriptive entry if not exists */
foreach ($groups as $value){
if (!array_key_exists($value, $this->groupMembership)){
- $ldap->cat($value);
+ $ldap->cat($value, array('cn', 'description', 'dn'));
$attrs= $ldap->fetch();
error_reporting (0);
if (!isset($attrs['description'][0])){
$entry= $attrs["cn"][0]." [$dsc]";
}
error_reporting (E_ALL);
- $this->groupMembership[$ldap->getDN()]= $entry;
+ $this->groupMembership[$attrs['dn']]= $entry;
}
}
diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc
index 116cb40626a2a444305ec1c498118d03c628c246..e2335cca23675ddfdf9f231b88a120208d15ee63 100644 (file)
{
/* Load uid and gid of this 'dn' */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('uidNumber', 'gidNumber'));
$tmp= $ldap->fetch();
$this->uidNumber= $tmp['uidNumber'][0];
$this->gidNumber= $tmp['gidNumber'][0];