diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/class_exportxls.inc
index e9464a3d4e188b9c0eb586930ba5c5006b32d94a..1a6a33691cbe7ef9fef60215a23d8cf99376589a 100644 (file)
/* Check permissions for export */
// fill in old vars in the Export form
if((isset($_POST['single']))&&(isset($_POST['sfrmgetsingle']))){
/* Check permissions for export */
// fill in old vars in the Export form
if((isset($_POST['single']))&&(isset($_POST['sfrmgetsingle']))){
- $smarty->assign("single",$_POST['single']);
- $smarty->assign("type","single");
- $a=$_POST['single'];
- $b=$_POST['selfull'];
+ $smarty->assign("single",set_post(get_post('single')));
+ $smarty->assign("type",set_post("single"));
+ $a=get_post('single');
+ $b=get_post('selfull');
}
if((isset($_POST['selfull']))&&(isset($_POST['sfrmgetfull']))){
}
if((isset($_POST['selfull']))&&(isset($_POST['sfrmgetfull']))){
- $smarty->assign("depselectfull",$_POST['selfull']);
+ $smarty->assign("depselectfull",set_post(get_post('selfull')));
$smarty->assign("type","full");
$smarty->assign("type","full");
- $dn = $_POST['selfull'];
+ $dn = get_post('selfull');
} else {
$smarty->assign("depselectfull", "");
}
if((isset($_POST['selivbb']))&&(isset($_POST['sfrmgetivbb']))){
} else {
$smarty->assign("depselectfull", "");
}
if((isset($_POST['selivbb']))&&(isset($_POST['sfrmgetivbb']))){
- $smarty->assign("depselectivbb",$_POST['selivbb']);
+ $smarty->assign("depselectivbb",set_post(get_post('selivbb')));
$smarty->assign("type","ivbb");
$smarty->assign("type","ivbb");
- $dn = $_POST['selivbb'];
+ $dn = get_post('selivbb');
} else {
$smarty->assign("depselectivbb", "");
}
// Set values for optionlist in form
$bases = array();
} else {
$smarty->assign("depselectivbb", "");
}
// Set values for optionlist in form
$bases = array();
- $acl_bases = $this->ui->get_module_departments("all");
+ $acl_bases = $this->ui->get_module_departments("ldapmanager");
foreach($this->config->idepartments as $base_dn => $name){
if(in_array_ics($base_dn,$acl_bases)){
$bases[$base_dn] = $name;
}
}
$smarty->assign("deplist", $bases);
foreach($this->config->idepartments as $base_dn => $name){
if(in_array_ics($base_dn,$acl_bases)){
$bases[$base_dn] = $name;
}
}
$smarty->assign("deplist", $bases);
- $smarty->assign("choicelist",array( get_people_ou() =>"users" ,
+ $smarty->assign("choicelist",set_post(array( get_people_ou() =>"users" ,
get_groups_ou() =>"groups" ,
get_groups_ou() =>"groups" ,
- get_ou('systemsou') =>"computers",
- get_ou('serverou') =>"servers",
- "dc=addressbook," =>"addressbook"));
+ get_ou("systemManagement", "systemRDN") =>"computers",
+ get_ou("servgeneric", "serverRDN") =>"servers",
+ "dc=addressbook," =>"addressbook")));
// Get the LDAP link, to generate the Export
$ldap = $this->config->get_ldap_link();
// Get the LDAP link, to generate the Export
$ldap = $this->config->get_ldap_link();
- $smarty->assign ("govmode", $this->config->get_cfg_value("governmentmode"));
+ $smarty->assign ("govmode", $this->config->get_cfg_value("core","honourIvbbAttributes"));
$smarty->assign("LDIFError",FALSE);
if(isset($dn))
$smarty->assign("LDIFError",FALSE);
if(isset($dn))
/* check alcs for given dn */
$acls ="";
if(isset($dn)){
/* check alcs for given dn */
$acls ="";
if(isset($dn)){
- $acls = $this->ui->get_permissions($dn,"all/all");
+ $acls = $this->ui->get_permissions($dn,"ldapmanager/ldif");
}
if(!preg_match("/r/",$acls) && (isset($_POST['sfrmgetsingle']) || isset($_POST['sfrmgetfull']) || isset($_POST['sfrmgetivbb']))){
/* Show error msg */
}
if(!preg_match("/r/",$acls) && (isset($_POST['sfrmgetsingle']) || isset($_POST['sfrmgetfull']) || isset($_POST['sfrmgetivbb']))){
/* Show error msg */
- msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),@LDAP::fix($dn)), ERROR_DIALOG);
+ msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export %s!"), bold(LDAP::fix($dn))), ERROR_DIALOG);
/* Show main page */
$smarty->assign("LDIFError",TRUE);
/* Show main page */
$smarty->assign("LDIFError",TRUE);
// Export a single LDAP entry
if(isset($_POST['sfrmgetsingle']))
{
// Export a single LDAP entry
if(isset($_POST['sfrmgetsingle']))
{
- $smarty->assign("para","?ivbb=2&d=".base64_encode($_POST['single'])."&n=".base64_encode($_POST['selfull']));
+ $smarty->assign("para","?ivbb=2&d=".base64_encode(get_post('single'))."&n=".base64_encode(get_post('selfull')));
}
elseif(isset($_POST['sfrmgetfull']))
{
}
elseif(isset($_POST['sfrmgetfull']))
{
- $smarty->assign("para","?ivbb=3&dn=".base64_encode($_POST['selfull']));
+ $smarty->assign("para","?ivbb=3&dn=".base64_encode(get_post('selfull')));
}
elseif(isset($_POST['sfrmgetivbb']))
{
}
elseif(isset($_POST['sfrmgetivbb']))
{
- $smarty->assign("para","?ivbb=4&dn=".base64_encode($_POST['selivbb']));
+ $smarty->assign("para","?ivbb=4&dn=".base64_encode(get_post('selivbb')));
}
}
}
}