summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d73cf53)
raw | patch | inline | side by side (parent: d73cf53)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 May 2011 12:27:31 +0000 (12:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 9 May 2011 12:27:31 +0000 (12:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20791 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index d4f646b5646a0af97595a092a47d841f971606c7..dabdfb595fc53e3d9e8beead07997ac795128520 100644 (file)
var $currentObject = NULL;
var $itemsPerMethod = NULL;
-
var $initFailed = TRUE;
var $initialized = FALSE;
var $errorMessage = "";
+
/*! \brief Initialize the plugin and finally update the data model.
*/
function __construct($config, $dn)
function editEntry($ids)
{
$item = $this->dataModel->getItemById($ids[0]);
- $release = preg_replace("/^.*\//","", $this->getReleasePath($item['path']));
+ $release = $this->getReleasePart($item['path']);
$path = $this->getItemPath($item['path']);
$method = $this->cfgItemMap[$item['type']];
if($this->cfgItemMap[$item['type']] != 'root'){
if($item['status'] == '-'){
$rpc = $this->config->getRpcHandle();
- $item['values'] = $rpc->getConfigItem($release, $path);
- $this->dataModel->setItemStatus($item['path'], 'fetched');
- $this->dataModel->setItemValues($item['path'], $item['values']);
+ echo $release;
+ $res = $rpc->getConfigItem($release, $path);
+ if(!$rpc->success()){
+ msg_dialog::display(_("Error"), sprintf(_("Failed to load config item details: %s"), $rpc->get_error()),ERROR_DIALOG);
+ return;
+ }else{
+ $item['values'] = $res;
+ $this->dataModel->setItemStatus($item['path'], 'fetched');
+ $this->dataModel->setItemValues($item['path'], $item['values']);
+ }
}
}
}
if(in_array($values['name'],$usedNames)){
$msgs[] = msgPool::duplicated(_("Name"));
- }elseif(preg_match("/[^a-z0-9]/i",$values['name'])){
- $msgs[] = msgPool::invalid(_("Name"), $values['name'], '/[a-z0-9]/');
+ }elseif(preg_match("/[^a-z0-9\.]/i",$values['name'])){
+ $msgs[] = msgPool::invalid(_("Name"), $values['name'], '/[a-z0-9\.]/');
}
}