[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sync/inc/class.ui_sync.inc.php, 1.24
From: |
nomail |
Subject: |
[Phpgroupware-cvs] sync/inc/class.ui_sync.inc.php, 1.24 |
Date: |
Wed, 26 May 2004 15:01:11 +0200 |
Update of /sync/inc
Modified Files:
Branch:
class.ui_sync.inc.php
date: 2004/05/26 13:01:11; author: mleonhardt; state: Exp; lines: +27 -7
Log Message:
- zendanalyzerwarningpatch
- Apptitles instead of Appnames
=====================================================================
Index: sync/inc/class.ui_sync.inc.php
diff -u sync/inc/class.ui_sync.inc.php:1.23 sync/inc/class.ui_sync.inc.php:1.24
--- sync/inc/class.ui_sync.inc.php:1.23 Wed May 26 09:55:20 2004
+++ sync/inc/class.ui_sync.inc.php Wed May 26 13:01:11 2004
@@ -200,7 +200,11 @@
}
$this->template->set_var('lastsync_lastsync', $lastsync);
$this->template->set_var('deviceid', $deviceid);
- $this->template->set_var('lastsync_source', $source);
+ $appname = $this->so->GetSourceModule($source);
+ $this->template->set_var('lastsync_source', $appname);
+ $this->template->set_var('lastsync_source_title',
+ // arrays are for everone ;-)
+ $GLOBALS['phpgw_info']['user']['apps'][$appname]["title"]);
$this->template->set_var('lastsync_fullsync',
lang('lastsync_fullsync'));
$lastsynctable .=
$this->template->fp('sync_template','lastsync_list');
}
@@ -557,8 +561,12 @@
// parse status
$this->template->set_var('last_operation_status',
$this->last_operation_status);
$body .= $this->template->fp('sync_template','status');
-
- $body .= $this->insert_conflicthandling();
+
+ // if there are no synchronized sources we return a default string
+ $conflicthandling = $this->insert_conflicthandling();
+ $conflicthandling = $conflicthandling == '' ?
lang('status_noconflictsources') : $conflicthandling;
+ $body .= $conflicthandling;
+
// footer
$this->template->set_var('syncmoduleLink',
@@ -593,7 +601,10 @@
//parse
$conflicthandlingtable .=
$this->template->fp('sync_template','table_header');
- $conflicthandlingtable .= $this->insert_conflicthandling_list();
+ $conflicthandlinglist = $this->insert_conflicthandling_list();
+ //if we have no sources we will return nothing - so the conflictlist is
not shown
+ if ($conflicthandlinglist == '') return '';
+ $conflicthandlingtable .= $conflicthandlinglist;
$conflicthandlingtable .=
$this->template->fp('sync_template','table_footer');
return $conflicthandlingtable;
}
@@ -609,6 +620,7 @@
// get actual user ID
$phpgw_userid = $GLOBALS['phpgw_info']['user']['account_id'];
$tr_color = '';
+ $sourcecount = 0;
// all devices of user $phpgw_userlid
$devicelist = array();
@@ -624,9 +636,14 @@
$sources = $this->so->getUsedSources($deviceid);
foreach($sources as $source) {
+ $sourcecount++;
$tr_color = $this->nextmatchs->alternate_row_color($tr_color);
$this->template->set_var('tr_color', $tr_color);
- $this->template->set_var('source',
$this->so->GetSourceModule($source));
+ $appname = $this->so->GetSourceModule($source);
+ $this->template->set_var('source', $appname);
+ $this->template->set_var('source_title',
+ // arrays are for everone ;-)
+ $GLOBALS['phpgw_info']['user']['apps'][$appname]["title"]);
$this->template->set_var('sourceidentifier',
"conflict_$deviceid_$source");
$selectedid = $this->so->GetConflictHandleSetting($deviceid,
$source);
// in case of readerror we use the default (3 = duplicate)
@@ -646,7 +663,10 @@
}
}
}
- return $conflicthandlinglist;
+ if ($sourcecount > 0)
+ return $conflicthandlinglist;
+ else
+ return '';
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sync/inc/class.ui_sync.inc.php, 1.24,
nomail <=