Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
cf877ef6
Commit
cf877ef6
authored
May 28, 2016
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-939 Now with file.
Released under the Affero GNU General Public License (AGPL) version 3.
parent
4ef1cf1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
z-push-admin.php
src/z-push-admin.php
+12
-4
No files found.
src/z-push-admin.php
View file @
cf877ef6
...
...
@@ -772,10 +772,16 @@ class ZPushAdminCLI {
if
(
$device
->
GetFolderUUID
(
$folderid
))
{
$synchedFolders
++
;
$type
=
$device
->
GetFolderType
(
$folderid
);
$name
=
$device
->
GetHierarchyCache
()
->
GetFolder
(
$folderid
)
->
displayname
;
switch
(
$type
)
{
case
SYNC_FOLDER_TYPE_APPOINTMENT
:
case
SYNC_FOLDER_TYPE_USER_APPOINTMENT
:
if
(
KOE_GAB_NAME
!=
""
&&
$name
==
KOE_GAB_NAME
)
{
$gentype
=
"GAB"
;
}
else
{
$gentype
=
"Calendars"
;
}
break
;
case
SYNC_FOLDER_TYPE_CONTACT
:
case
SYNC_FOLDER_TYPE_USER_CONTACT
:
...
...
@@ -800,8 +806,7 @@ class ZPushAdminCLI {
// set the folder name for all folders which are not fully synchronized yet
$fstatus
=
$device
->
GetFolderSyncStatus
(
$folderid
);
if
(
$fstatus
!==
false
&&
is_array
(
$fstatus
))
{
// TODO would be nice if we could see the real name of the folder, right now we use the folder type as name
$fstatus
[
'name'
]
=
$gentype
;
$fstatus
[
'name'
]
=
$name
?
$name
:
$gentype
;
$device
->
SetFolderSyncStatus
(
$folderid
,
$fstatus
);
$syncedFoldersInProgress
++
;
}
...
...
@@ -859,7 +864,10 @@ class ZPushAdminCLI {
$percent
=
round
(
$d
[
'done'
]
*
100
/
$d
[
'total'
]);
$status
=
sprintf
(
"Status: %s%d%% (%d/%d)"
,
(
$percent
<
10
)
?
" "
:
""
,
$percent
,
$d
[
'done'
],
$d
[
'total'
]);
}
printf
(
"
\t
Folder: %s%s Sync: %s %s
\n
"
,
$d
[
'name'
],
str_repeat
(
" "
,
12
-
strlen
(
$d
[
'name'
])),
$d
[
'status'
],
$status
);
if
(
strlen
(
$d
[
'name'
])
>
20
)
{
$d
[
'name'
]
=
substr
(
$d
[
'name'
],
0
,
18
)
.
".."
;
}
printf
(
"
\t
Folder: %s Sync: %s %s
\n
"
,
str_pad
(
$d
[
'name'
],
20
),
str_pad
(
$d
[
'status'
],
13
),
$status
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment