index 12f21d978da0f4794bcc24ea28aeb8ae917ad3e6..fa81784ca939f47f4a092eb89600a363000befab 100644 (file)
$this->SubObjects[$object['cn'][0]]['status'] = "edited";
$this->SubObjects[$object['cn'][0]]['dn'] = $object['dn'];
}
+
+ @log::log("view","fai/".get_class($this),$this->dn);
}
$this->ui = get_userinfo();
}
$ret = $this->getList();
$tmp = array();
foreach($this->SubObjects as $key => $obj){
-
$acl = $ui->get_permissions($obj['dn'],"fai/faiVariableEntry");
-
- if(preg_match("/r/",$acl)){
+ if(preg_match("/r/",$acl) || $obj['dn'] == "new"){
$tmp[$key] = $ret[$key];
}
-
- $smarty->assign("SubObjects",$tmp);
}
+ $smarty->assign("SubObjects",$tmp);
- /* Magic quotes GPC, escapes every ' " \, to solve some security risks
+ /* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
*/
-
foreach($this->attributes as $attrs){
if(get_magic_quotes_gpc()){
$smarty->assign($attrs,htmlentities (stripslashes(utf8_decode($this->$attrs))));
if($_SESSION['faifilter']['branch'] == "main"){
$use_dn = $this->dn;
}
-
+
prepare_to_save_FAI_object($use_dn,array(),true);
+ @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
foreach($this->SubObjects as $name => $obj){
$use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']);
$ldap = $this->config->get_ldap_link();
prepare_to_save_FAI_object($this->dn,$this->attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/variable with dn '%s' failed."),$this->dn));
+
+ if($this->initially_was_account){
+ @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+ }else{
+ @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+ }
/* Do object tagging */
$this->handle_object_tagging();