summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ee258b)
raw | patch | inline | side by side (parent: 8ee258b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2005 05:44:10 +0000 (05:44 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2005 05:44:10 +0000 (05:44 +0000) |
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history | |
plugins/gofon/macro/tabs_macros.inc | patch | blob | history |
index 5aa085b119a944996b358e0af0ebd20351ba9f11..ee480dd6cc58bae20b1d1139676b7537f22b9553 100755 (executable)
/* This is always an account */
$this->is_account= TRUE;
+
/* Edit or new one ?*/
if ($this->dn == "new"){
$ui= get_userinfo();
{
$message = array();
+ if($this->dn=="new"){
+ $ldap = $this->config->get_ldap_link();
+ $ldap->search("(&(objectClass=goFonMacro)(cn=".$this->cn."))",array("cn"));
+ if($ldap->count()>0){
+ $message[]=sprintf(_("The given cn '%s' already exists."),$this->cn);
+ }
+ }
+
if(empty($this->displayName)){
$message[] = _("You must specify the 'Display Name' in order to save this macro");
}
$this->execute();
plugin::save();
-
unset($this->attrs['base']);
/* Write back to ldap */
index 6cf8a22711ac418e3721a6af1b41f65be688c7af..27047c7bcbb961ee9a3be04d8953f01477b61227 100755 (executable)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= "cn=".$baseobject->cn.",".$baseobject->base;
+ $new_dn= "cn=".$baseobject->cn.",ou=macros,ou=asterisk,ou=config,".$baseobject->base;
/* Move group? */
if ($this->dn != $new_dn){