support ORIG. for pre/postModify

This commit is contained in:
Roland Gruber 2012-07-25 19:17:37 +00:00
parent 0442c9fac5
commit 27dfbab5db
2 changed files with 13 additions and 1 deletions

View File

@ -3528,6 +3528,12 @@ Run slapindex to rebuild the index.
new value of a modified attribute (e.g. $MOD.telephoneNumber$) for
modified accounts</para>
</listitem>
<listitem>
<para><emphasis role="bold">$ORIG.&lt;attribute&gt;$:</emphasis> the
original value of an attribute (e.g. $ORIG.telephoneNumber$) for
modified accounts</para>
</listitem>
</itemizedlist>
<para><emphasis role="bold">Output may contain HTML:</emphasis> If your

View File

@ -1691,9 +1691,15 @@ class accountContainer {
}
}
}
if (!$this->isNewAccount) {
foreach ($this->attributes_orig as $key => $value) {
$prePostModifyAttributes['ORIG.' . $key] = $value;
}
$prePostModifyAttributes['ORIG.dn'][0] = $this->dn_orig;
}
$prePostModifyAttributes['dn'][0] = $this->finalDN;
if (!$this->isNewAccount && ($this->finalDN != $this->dn_orig)) {
$prePostModifyAttributes['MOD.dn'] = $this->finalDN;
$prePostModifyAttributes['MOD.dn'][0] = $this->finalDN;
}
logNewMessage(LOG_DEBUG, 'Edit page pre/postModify attributes: ' . print_r($prePostModifyAttributes, true));
$preModifyOk = true;