summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc35b36)
raw | patch | inline | side by side (parent: fc35b36)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Jan 2008 07:57:01 +0000 (07:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Jan 2008 07:57:01 +0000 (07:57 +0000) |
- Only try to encrypt if encryption is enabled.
Removed some echos
-From plugin.inc
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8612 594d385d-05f5-0310-b6e9-bd551577e9d8
Removed some echos
-From plugin.inc
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8612 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history | |
gosa-core/include/class_socketClient.inc | patch | blob | history |
index 8eec579c440ece59c05ab39906138cf558687d76..06336cd2e231b19302ff5051666c03444a612edc 100644 (file)
$data = "";
}
$this->$val= $data;
- //echo "<font color='blue'>".$val."</font><br>";
- }else{
- //echo "<font color='red'>".$val."</font><br>";
}
}
}
$tmp = $source[$var][$i];
}
$this->$var = $tmp;
-# echo $var."=".$tmp."<br>";
}else{
$this->$var = $source[$var][0];
-# echo $var."=".$source[$var][0]."<br>";
}
}else{
$this->$var= $source[$var];
-# echo $var."=".$source[$var]."<br>";
}
}
}
if(isset($this->base) && isset($this->config->idepartments[$this->base])){
$deps[$this->base] = $this->config->idepartments[$this->base];
}else{
- echo "No default base found. ".$this->base."<br> ";
+ trigger_error("No default base found in class ".get_class($this).". ".$this->base);
}
-
return($deps);
}
+
/* This function modifies object acls too, if an object is moved.
* $old_dn specifies the actually used dn
* $new_dn specifies the destiantion dn
/* Acls for this object must be adjusted */
if($found){
- if($output_changes){
- echo "<font color='green'>".
- _("Changing ACL dn")." : <br> -"._("from")." <b> ".
- $old_dn.
- "</b><br> -"._("to")." <b>".
- $new_dn.
- "</b></font><br>";
- }
+ $debug_info= _("Changing ACL dn")." : <br> -"._("from")." <b> ".
+ $old_dn."</b><br> -"._("to")." <b>".$new_dn."</b><br>";
+ @DEBUG (DEBUG_ACL, __LINE__, __FUNCTION__, __FILE__,$debug_info,"ACL");
+
$update[$attrs['dn']] =array();
foreach($acls as $acl){
$update[$attrs['dn']]['gosaAclEntry'][] = $acl;
index fd71b01f09fb8bd2efc3c6b8cd52b32972074fb7..2812e26880eab4dd50b5455bc3d2eb204d4b7348 100644 (file)
private $handle = NULL;
private $bytes_read = 0;
private $error = "";
+ private $b_encrypt = FALSE;
/* Crypto information */
private $td= NULL;
if(!function_exists("mcrypt_get_iv_size")){
$this->error = _("The mcrypt module was not found. Please install php5-mcrypt.");
$this->ckey = "";
- return FALSE ;
+ $this->b_encrypt = FALSE;
}
if ($this->connected()){
$this->ckey = substr(md5($key), 0, $this->ks);
- return TRUE;
+ $this->b_encrypt = TRUE;
}
- return FALSE;
+ return($this->b_encrypt);
}
private function encrypt($data)
{
- mcrypt_generic_init($this->td, $this->ckey, $this->iv);
- return base64_encode(mcrypt_generic($this->td, $data));
+ if($this->b_encrypt){
+ mcrypt_generic_init($this->td, $this->ckey, $this->iv);
+ $data = base64_encode(mcrypt_generic($this->td, $data));
+ }
+ return($data);
}
private function decrypt($data)
{
/* decrypt data */
- $data = base64_decode($data);
- mcrypt_generic_init($this->td, $this->ckey, $this->iv);
- return mdecrypt_generic($this->td, $data);
+ if($this->b_encrypt){
+ $data = base64_decode($data);
+ mcrypt_generic_init($this->td, $this->ckey, $this->iv);
+ $data = mdecrypt_generic($this->td, $data);
+ }
+ return($data);
}