summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b3fcef)
raw | patch | inline | side by side (parent: 1b3fcef)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jul 2007 13:35:01 +0000 (13:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 19 Jul 2007 13:35:01 +0000 (13:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6924 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history |
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 0387abb0f9ef954b8655cafbe7b97c17549a4d6c..1693935245549a6bb16f4ec9973481e220742bc9 100644 (file)
$r_con = @mysql_pconnect($cur_cfg['SERVER'],$cur_cfg['LOGIN'],$cur_cfg['PASSWORD']);
if(!$r_con){
- print_red( sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
- $cur_cfg['SERVER'],$cur_cfg['LOGIN']));
+# print_red( sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."),
+# $cur_cfg['SERVER'],$cur_cfg['LOGIN']));
new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error());
}
$db = @mysql_select_db($cur_cfg['DB'],$r_con);
if(!$db){
- print_red(sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER']));
+# print_red(sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER']));
new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error());
}
ksort($this->hardware_list);
$this->a_old_telenums = $this->phoneNumbers;
- if($this->is_account){
- $this->is_modified = true;
- }
-
-
/* Get voicemail PIN from MySQL DB
* Because every user can change his PIN directly from the phone
* without any update to the ldap
{
$SkipWrite = (!isset($this->parent) || !$this->parent) && !isset($_SESSION['edit']);
if (isset($_POST["phoneTab"])){
+
plugin::save_object();
/* Save checkbox */
$this->macrostillavailable=true;
}
+ if(isset($_POST['macro']) && $_POST['macro'] != $this->macro){
+ $this->is_modified =true;
+ }
+
if(is_array($this->phoneNumbers)){
foreach($this->phoneNumbers as $telenumms) {
$nummsinorder[]=$telenumms;
/* get all Postvars */
if(isset($this->macroarray[$this->macro])){
+
if($this->acl_is_writeable("goFonMarco",$SkipWrite)){
foreach($this->macroarray[$this->macro] as $key => $paras){
+
+ $backup = $this->macroarray[$this->macro][$key];
+
if(isset($_POST[$paras['var']])){
$this->macroarray[$this->macro][$key]['choosen'] = $_POST[$paras['var']];
}
}
}
}
+ if(count(array_diff($this->macroarray[$this->macro][$key],$backup))){
+ $this->modified = TRUE;
+ }
}
}
}
}
}
- if(!$this->generate_mysql_entension_entries()){
- $message[] = $this->generate_error;
+ if ($this->initially_was_account != $this->is_account || $this->is_modified){
+ if(!$this->generate_mysql_entension_entries()){
+ $message[] = $this->generate_error;
+ }
}
/* We need at least one phone number */
$this->attrs['goFonForwarding']=array();
- $str = $this->generate_mysql_entension_entries(true);
- if(empty($str)){
- print_red($str);
+ if ($this->initially_was_account != $this->is_account || $this->is_modified){
+ $str = $this->generate_mysql_entension_entries(true);
+ if(empty($str)){
+ print_red($str);
+ }
}
if($this->attrs['goFonMacro']==""){