diff --git a/plugins/admin/systems/class_servRepositorySetup.inc b/plugins/admin/systems/class_servRepositorySetup.inc
index a1c62e7baad9a62b52d3681d66f81a5dc41eb0ad..40f37b0628acca88f431cc89042a7e16b31cdcf2 100644 (file)
var $ParentServers = "";
var $initialy_was = false;
var $cn = "";
+ var $parent = "";
- function servRepositorySetup ($config, $dn= NULL,$data = false)
+ function servRepositorySetup (&$config, $dn= NULL,$data = false)
{
plugin::plugin ($config, $dn);
if($data != false){
$smarty->assign("Sections",$divlist->DrawList());
+ /* Get && assign acls */
+ $tmp = $this->parent->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translated){
+ $smarty->assign($name."ACL",$this->parent->getacl($name));
+ }
+
+ /* Assign values */
foreach($this->attributes as $attr){
$smarty->assign($attr ,$this->$attr);
- $smarty->assign($attr."ACL" ,chkacl($this->acl,$attr));
}
$tmp = $this->getParentServers();
/* Save data to object */
function save_object()
{
- plugin::save_object();
+ if(isset($_POST['servRepositorySetup_Posted'])) {
+
+ foreach($this->attributes as $attr){
+ if(($this->parent->acl_is_writeable($attr)) && (isset($_POST[$attr]))){
+ $this->$attr = $_POST[$attr];
+ }
+ }
+ }
}
function GetHookElements()
{
$ret = array();
- $cmd= search_config($this->config->data['TABS'], "servrepository", "REPOSITORY_HOOK");
+ $cmd = $this->config->search("servrepository", "REPOSITORY_HOOK",array('tabs'));
if(!empty($cmd)){
$res = shell_exec($cmd);
$res2 = trim($res);