summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cbd765d)
raw | patch | inline | side by side (parent: cbd765d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 May 2006 12:02:59 +0000 (12:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 18 May 2006 12:02:59 +0000 (12:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3429 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_oxchangeAccount.inc | patch | blob | history | |
plugins/personal/connectivity/oxchange.tpl | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc
index 40119ac487f4284e5bb51987f3b9a0913145e0dd..6104d2574cda31fa7190842f65b4d056536d2da7 100644 (file)
//plugin::execute();
- /* Show tab dialog headers */
+ $display="";
+ /* Show tab dialog headers * /
$display="";
if ($this->parent != NULL){
if ($this->is_account){
}
}
}
-
+*/
/* Show main page */
$smarty= get_smarty();
$smarty->assign("tabbed", 0);
}
+ /* Trying to open a Postgresql Database Server */
+ if (function_exists("pg_connect")){
+ if(isset($this->oxconf["PGUSER"]) and isset($this->oxconf["PGHOST"]) and isset($this->oxconf["PGDBNAME"]) and isset($this->oxconf["PGPASSWD"])){
+ $pgcon = @pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
+ if (! $pgcon){
+ $smarty->assign("pg", false);
+ }
+ }else{
+ $smarty->assign("pg", false);
+ }
+ }else{
+ $smarty->assign("pg", false);
+ }
+
$display.= $smarty->fetch (get_template_path('oxchange.tpl', TRUE, dirname(__FILE__)));
return ($display);
}
/* Trying to open a Postgresql Database Server */
if (function_exists("pg_connect")){
- if(isset($this->oxconf["PGUSER"]) and isset($this->oxconf["PGHOST"]) and isset($this->oxconf["PGDBNAME"]) and isset($this->oxconf["PGPASSWD"])){
- $pgcon = pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
+ if(isset($this->oxconf["PGUSER"]) and
+ isset($this->oxconf["PGHOST"]) and
+ isset($this->oxconf["PGDBNAME"]) and
+ isset($this->oxconf["PGPASSWD"])){
+ $pgcon = @pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
if (! $pgcon){
print_red(_("Couldn't connect to postgresql database!"));
return;
/* Trying to open a Postgresql Database Server */
if (function_exists("pg_connect")){
if(isset($this->oxconf["PGUSER"]) and isset($this->oxconf["PGHOST"]) and isset($this->oxconf["PGDBNAME"]) and isset($this->oxconf["PGPASSWD"])){
- $pgcon = pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
+ $pgcon = @pg_connect("host=".$this->oxconf["PGHOST"]." user=".$this->oxconf["PGUSER"]." password=".$this->oxconf["PGPASSWD"]." dbname=".$this->oxconf["PGDBNAME"]);
if (! $pgcon){
print_red(_("Couldn't connect to postgresql database!"));
return;
diff --git a/plugins/personal/connectivity/oxchange.tpl b/plugins/personal/connectivity/oxchange.tpl
index 75a04af19c503cf4da35a27da4f5bace85db07f4..653f0e33c672befd043a8900ed1e05ef32cc776d 100644 (file)
-{ if !$pg }
-<h2>{t}Open-Xchange Account{/t} - {t}disabled, no Postgresql support detected{/t}</h2>
+{if !$pg}
+<h2>{t}Open-Xchange Account{/t} - {t}disabled, no Postgresql support detected. Or the specified database can't be reached{/t}</h2>
{else}
-<h2>{if $tabbed eq 1}<input type="checkbox" name="oxchange" value="B" {$oxchangeState} {$oxchangeAccountACL} onCLick="changeState('OXAppointmentDays');changeState('OXTaskDays');changeState('OXTimeZone');" >{/if}{t}Open-Xchange account{/t}</h2>
+
+<input type="checkbox" name="oxchange" value="B"
+ {$oxchangeState} {$oxchangeAccountACL}
+ onCLick=" changeState('OXAppointmentDays');
+ changeState('OXTaskDays');
+ changeState('OXTimeZone');" >
+<h2>{t}Open-Xchange account{/t}</h2>
+
+
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
<!-- Headline container -->