summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 05a7011)
raw | patch | inline | side by side (parent: 05a7011)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Aug 2005 07:24:19 +0000 (07:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 2 Aug 2005 07:24:19 +0000 (07:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1041 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 8ef8bb24e0d53f0d4e88025103fb85007ea8a96f..351d6e458cb1234aa8183e055ddd26173d6a8903 100644 (file)
$this->is_account= TRUE;
if ($this->dn == "new"){
- $ui= get_userinfo();
- $this->base= dn2base($ui->dn);
+ if(isset($_SESSION['appfilter']['depselect'])){
+ $this->base=$_SESSION['appfilter']['depselect'];
+ }else{
+ $ui= get_userinfo();
+ $this->base= dn2base($ui->dn);
+ }
} else {
$this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
}
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 243d1e921c3c7ee8845a759f27388bead2f8ce86..d7f709f807c0bba378e15205cedf535a838916bd 100644 (file)
$this->config= $config;
/* Set base */
- if ($this->dn == "new"){
+ if ($this->dn == "new"){
$ui= get_userinfo();
if(isset($_SESSION['depfilter']['depselect'])){
$this->base = $_SESSION['depfilter']['depselect'];
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index bc42936f2e5eb81f2c1a6ed9c811c2741e05760c..bd8f9a7a8359d645b0c869fb206a45e298fbb17c 100644 (file)
/* Get global filter config */
if (!is_global("blockfilter")){
- $ui= get_userinfo();
+ print_a($_SESSION['blocklist']);
+ $uii= get_userinfo();
$base= get_base_from_people($ui->dn);
$blockfilter= array("sendlists" => "checked",
"receivelists" => "checked",
"depselect" => $base,
"regex" => "*");
register_global("blockfilter", $blockfilter);
+ }else{
+ $blockfilter = $_SESSION["blockfilter"];
+ $this->base = $blockfilter['depselect'];
}
-
}
function execute()
/* Fill templating stuff */
$smarty->assign("bases", $this->config->idepartments);
- $smarty->assign("base_select", $this->base);
+ $smarty->assign("base_select", $_SESSION['blockfilter']['depselect']);//$this->base);
$smarty->assign("types", array(0 => _("send"), 1 => _("receive")));
if ($this->dn == "new" || preg_match ("/,ou=incoming,/", $this->dn)){
$smarty->assign("selectmode", "");
index 0db4da659d311fea3a417e217f69144c7f9e673d..7be9c1a28ece66aab2b5397810030c1eb455aad3 100755 (executable)
var $attributes = array("cn","base", "description","displayName","goFonMacroContent","goFonMacroVisible");
var $is_new=false;
-
+ var $orig_cn = "";
/*! Objectclasses that this calls handles */
var $objectclasses = array("top", "goFonMacro");
/* Edit or new one ?*/
if ($this->dn == "new"){
- $this->is_new = true;
- $ui= get_userinfo();
- $this->base= dn2base($ui->dn);
+ if(isset($_SESSION['macrofilter']['depselect'])){
+ $this->base = $_SESSION['macrofilter']['depselect'];
+ $this->is_new = true;
+ }else{
+ $this->is_new = true;
+ $ui= get_userinfo();
+ $this->base= dn2base($ui->dn);
+ }
} else {
$this->is_new = false;
$this->orig_cn=$this->cn;
$smarty->assign("cn",$this->orig_cn);
}else{
$smarty->assign("disable_cn"," ");
- $smarty->assign("cn","");
+ $smarty->assign("cn",$this->cn);
}
$this->generate_mysql_entension_entries();
/* Show main page */
$context = "macro-".$this->cn;
// Parse Content if we connected correctly
- if($db && $r_con && $save){
+ if($db && $r_con ){
// Split Content into lines
$a_contentLines = split ("\n",$this->goFonMacroContent);
$tmp = split(",", preg_replace("/\(.*$/","",$linecontents));
if(!isset($tmp[2])){
- print_red(sprintf(_("Unable to parse macro contents on line: %s"),$i_linenum));
+ $this->generate_error = sprintf(_("Unable to parse macro contents on line: %s"),$i_linenum);
+ return false;
}
-
- $exten = $tmp[0];
- $prio = $tmp[1];
- $app = $tmp[2];
- $para = $linecontents;
- $para = preg_replace("/^.*\(/","",$para);
- $para = preg_replace("/\)$/","",$para);
-
- // Append SQL syntax
- $SQL[$i_linenum].="'".$context."','".$exten."','".$prio."','".$app."','".$para."');";
+ $exten = $tmp[0];
+ $prio = $tmp[1];
+ $app = $tmp[2];
+ $para = $linecontents;
+ $para = preg_replace("/^.*\(/","",$para);
+ $para = preg_replace("/\)$/","",$para);
+
+ // Append SQL syntax
+ $SQL[$i_linenum].="'".$context."','".$exten."','".$prio."','".$app."','".$para."');";
}
- }
+ }
if(($save)||($delete_only)){
$res = mysql_query("SELECT count(*) FROM ".$a_SETUP['EXT_TABLE']." WHERE context= '".$context."'");
}
// We want to save this
- if($save){
+ if(($save)&&(isset($SQL))){
foreach($SQL as $entry){
if(!mysql_query($entry)){
$this->generate_error = sprintf(_("Can't perform INSERT query in DB '%s'"),$a_SETUP['DB']);