summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8532a9)
raw | patch | inline | side by side (parent: d8532a9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Apr 2006 07:45:45 +0000 (07:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Apr 2006 07:45:45 +0000 (07:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3079 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiHook.inc | patch | blob | history | |
plugins/admin/fai/class_faiScript.inc | patch | blob | history | |
plugins/admin/fai/class_faiTemplate.inc | patch | blob | history |
index 09b270d8390f736d3dac3df287c472fe229ad573..21433ac06bffa99c78860e0eba41d88b419474f8 100644 (file)
foreach($this->subAttributes as $attrs){
$this->SubObjects[$object['cn'][0]][$attrs]=addslashes($this->SubObjects[$object['cn'][0]][$attrs]);
}
- $this->SubObjects[$object['cn'][0]]['FAIscript'] = addslashes($this->readBinary("FAIscript",$object['dn']));
+ $this->SubObjects[$object['cn'][0]]['FAIscript'] = addslashes( $ldap->get_attribute($object['dn'], "FAIscript",$r_array=0));
}
}
}
show_ldap_error($ldap->get_error());
}
}
-
- function readBinary($attr,$dn){
- $Data ="";
- $ds= ldap_connect($this->config->current['SERVER']);
- ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- if (function_exists("ldap_set_rebind_proc") && isset($this->config->current['RECURSIVE']) && $this->config->current['RECURSIVE'] == "true") {
- ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
- ldap_set_rebind_proc($ds, array(&$this, "rebind"));
- }
-
- if(isset($this->config->current['TLS']) && $this->config->current['TLS'] == "true"){
- ldap_start_tls($ds);
- }
-
- $r = ldap_bind($ds);
- $sr = @ldap_read($ds, $dn, $attr."=*", array($attr));
-
- if ($sr) {
- $ei=ldap_first_entry($ds, $sr);
- if ($ei) {
- if ($info = ldap_get_values_len($ds, $ei, $attr)){
- $Data= $info[0];
- }
- }
- }
-
- /* close conncetion */
- ldap_unbind($ds);
- return($Data);
- }
-
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 6ba262020c0ce7a4ae87a14ed2de02a5dd9f9b62..9a6649f304ea4356610075a5839d421ab6777f26 100644 (file)
$this->SubObjects[$object['cn'][0]][$attrs]=addslashes($this->SubObjects[$object['cn'][0]][$attrs]);
}
- $this->SubObjects[$object['cn'][0]]['FAIscript'] = addslashes ($this->readBinary("FAIscript",$object['dn']));
+ $this->SubObjects[$object['cn'][0]]['FAIscript'] = addslashes ($ldap->get_attribute($object['dn'], "FAIscript",$r_array=0));
$this->SubObjects[$object['cn'][0]]['status'] = "edited";
$this->SubObjects[$object['cn'][0]]['dn'] = $object['dn'];
show_ldap_error($ldap->get_error());
}
}
-
-
- function readBinary($attr,$dn){
- $Data ="";
- $ds= ldap_connect($this->config->current['SERVER']);
- ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- if (function_exists("ldap_set_rebind_proc") && isset($this->config->current['RECURSIVE']) && $this->config->current['RECURSIVE'] == "true") {
- ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
- ldap_set_rebind_proc($ds, array(&$this, "rebind"));
- }
-
- if(isset($this->config->current['TLS']) && $this->config->current['TLS'] == "true"){
- ldap_start_tls($ds);
- }
-
- $r = ldap_bind($ds);
- $sr = @ldap_read($ds, $dn, $attr."=*", array($attr));
-
- if ($sr) {
- $ei=ldap_first_entry($ds, $sr);
- if ($ei) {
- if ($info = ldap_get_values_len($ds, $ei, $attr)){
- $Data= $info[0];
- }
- }
- }
-
- /* close conncetion */
- ldap_unbind($ds);
- return($Data);
- }
-
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 8d7d51fb2e37aff5d3f9eec017ef97c91b5da66b..befb92022d9f77cb8aaa8344476e3e5921692164 100644 (file)
$this->SubObjects[$object['cn'][0]][$codeIt]= base64_decode($this->SubObjects[$object['cn'][0]][$codeIt]);
}
- $this->SubObjects[$object['cn'][0]]['FAItemplateFile']= $this->readBinary("FAItemplateFile",$object['dn']);
-
+ $this->SubObjects[$object['cn'][0]]['FAItemplateFile']= $ldap->get_attribute($object['dn'], "FAItemplateFile",$r_array=0);
+
$this->SubObjects[$object['cn'][0]]['status']= "edited";
$this->SubObjects[$object['cn'][0]]['dn']= $object['dn'];
}
show_ldap_error($ldap->get_error());
}
}
-
- function readBinary($attr,$dn){
- $Data ="";
- $ds= ldap_connect($this->config->current['SERVER']);
- ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- if (function_exists("ldap_set_rebind_proc") && isset($this->config->current['RECURSIVE']) && $this->config->current['RECURSIVE'] == "true") {
- ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
- ldap_set_rebind_proc($ds, array(&$this, "rebind"));
- }
-
- if(isset($this->config->current['TLS']) && $this->config->current['TLS'] == "true"){
- ldap_start_tls($ds);
- }
-
- $r = ldap_bind($ds);
- $sr = @ldap_read($ds, $dn, $attr."=*", array($attr));
-
- if ($sr) {
- $ei=ldap_first_entry($ds, $sr);
- if ($ei) {
- if ($info = ldap_get_values_len($ds, $ei, $attr)){
- $Data= $info[0];
- }
- }
- }
-
- /* close conncetion */
- ldap_unbind($ds);
- return($Data);
- }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: