summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0eff891)
raw | patch | inline | side by side (parent: 0eff891)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Oct 2005 08:18:39 +0000 (08:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Oct 2005 08:18:39 +0000 (08:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1633 594d385d-05f5-0310-b6e9-bd551577e9d8
index d2e74c469157d5d3883ae8c8c546c3985ae782e4..7d4f8fb628740b5a4f174f1ed1ff43c9430c3713 100644 (file)
*/
function save_object()
{
- plugin::save_object();
- foreach($this->attributes as $attrs){
- if(isset($_POST[$attrs])){
- $this->$attrs = $_POST[$attrs];
+ if(isset($_POST['FAIvariable_posted'])){
+ plugin::save_object();
+ foreach($this->attributes as $attrs){
+ if(isset($_POST[$attrs])){
+ $this->$attrs = $_POST[$attrs];
+ }
}
}
}
diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc
index fa4bd2e5b7783c27ca78fcff5f9c84428fb96de3..ac2317065ab75ad0efc6f7056aa4ff228c65a00d 100644 (file)
/* attribute list for save action */
var $ignore_account= TRUE;
- var $attributes = array("Object_cn","Object_description","Object_FAIvariableContent");
+ var $attributes = array("cn","description","FAIvariableContent");
var $objectclasses= array();
var $orig_cn = "";
- var $Object_dn = "";
- var $Object_cn = "";
- var $Object_FAIvariableContent = "";
- var $Object_description = "";
- var $Object_status = "new";
+ var $dn = "";
+ var $cn = "";
+ var $FAIvariableContent = "";
+ var $description = "";
+ var $status = "new";
function faiVariableEntry ($config, $dn= NULL,$object=false)
{
$this->orig_cn= $object['cn'];
$this->dn=$object['dn'];
foreach($object as $name=>$value){
- $oname = "Object_".$name;
+ $oname = $name;
$this->$oname=addslashes($value);
}
}else{
- $this->Object_status = "new";
+ $this->status = "new";
$this->orig_cn = false;
}
}
{
$message= array();
- if(empty($this->Object_FAIvariableContent)) {
+ if(empty($this->FAIvariableContent)) {
$message[]=_("Please specify a value for the attribute 'content'.");
}
- if(empty($this->Object_cn)){
+ if(empty($this->cn)){
$message[] = _("Please enter a name.");
}
- if(preg_match("/[^0-9a-z_]/i",$this->Object_cn)){
+ if(preg_match("/[^0-9a-z_]/i",$this->cn)){
$message[] = _("Please enter a valid name. Only a-Z 0-9 are allowed.");
}
{
$tmp=array();
foreach($this->attributes as $attrs){
- $attr = preg_replace("/^Object_/","",$attrs);
- $tmp[$attr] = stripslashes( $this->$attrs);
+ $tmp[$attrs] = stripslashes( $this->$attrs);
}
if(($this->orig_cn)&&($tmp['cn']!=$this->orig_cn)){
}
$tmp['dn'] = $this->dn;
- $tmp['status'] = $this->Object_status;
+ $tmp['status'] = $this->status;
return($tmp);
}
}
index 066e2e897e7bc06041dd1d5003ab53cf06fd39cb..54b1effb87a4f1bae54603557762febee67105ef 100644 (file)
</td>
</tr>
</table>
+<input type="hidden" value="1" name="FAIvariable_posted">
index e1373771e5ac86f3806d7a14e1aad21f9fe8806f..d7d41e1c13c7d0fa0dc2711c48780c599857a414 100644 (file)
{t}Name{/t}{$must}
</td>
<td>
- <input value="{$Object_cn}" name="Object_cn">
+ <input value="{$cn}" name="cn">
</td>
</tr>
<tr>
{t}Description{/t}
</td>
<td>
- <input size=40 value="{$Object_description}" name="Object_description">
+ <input size=40 value="{$description}" name="description">
</td>
</tr>
</table>
</LABEL>
</td>
<td>
- <input type="text" name="Object_FAIvariableContent" value="{$Object_FAIvariableContent}" id="Content" style="width:250px;">
+ <input type="text" name="FAIvariableContent" value="{$FAIvariableContent}" id="Content" style="width:250px;">
</td>
</tr>
</table>