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
d72a5be9
Commit
d72a5be9
authored
Aug 27, 2015
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-677 Expose ResyncFolder to webservice. Released under the Affero GNU
General Public License (AGPL) version 3.
parent
35763ff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
webservicedevice.php
src/lib/webservice/webservicedevice.php
+25
-1
No files found.
src/lib/webservice/webservicedevice.php
View file @
d72a5be9
...
@@ -111,7 +111,7 @@ class WebserviceDevice {
...
@@ -111,7 +111,7 @@ class WebserviceDevice {
}
}
/**
/**
* Marks a
a device of the Request::GetGETUser() for resynchronization
* Marks a
device of the Request::GetGETUser() for resynchronization.
*
*
* @param string $deviceId the device id
* @param string $deviceId the device id
*
*
...
@@ -131,5 +131,29 @@ class WebserviceDevice {
...
@@ -131,5 +131,29 @@ class WebserviceDevice {
ZPush
::
GetTopCollector
()
->
AnnounceInformation
(
sprintf
(
"Resync requested - device id '%s'"
,
$deviceId
),
true
);
ZPush
::
GetTopCollector
()
->
AnnounceInformation
(
sprintf
(
"Resync requested - device id '%s'"
,
$deviceId
),
true
);
return
true
;
return
true
;
}
}
/**
* Marks a folder of a device of the Request::GetGETUser() for resynchronization.
*
* @param string $deviceId the device id
* @param string $folderId the folder id
*
* @access public
* @return boolean
* @throws SoapFault
*/
public
function
ResyncFolder
(
$deviceId
,
$folderId
)
{
$deviceId
=
preg_replace
(
"/[^A-Za-z0-9]/"
,
""
,
$deviceId
);
$folderId
=
preg_replace
(
"/[^A-Za-z0-9]/"
,
""
,
$folderId
);
ZLog
::
Write
(
LOGLEVEL_INFO
,
sprintf
(
"WebserviceDevice::ResyncFolder('%s','%s'): mark folder of a device of user '%s' for resynchronization"
,
$deviceId
,
$folderId
,
Request
::
GetGETUser
()));
if
(
!
ZPushAdmin
::
ResyncFolder
(
Request
::
GetGETUser
(),
$deviceId
,
$folderId
))
{
ZPush
::
GetTopCollector
()
->
AnnounceInformation
(
ZLog
::
GetLastMessage
(
LOGLEVEL_ERROR
),
true
);
throw
new
SoapFault
(
"ERROR"
,
ZLog
::
GetLastMessage
(
LOGLEVEL_ERROR
));
}
ZPush
::
GetTopCollector
()
->
AnnounceInformation
(
sprintf
(
"Folder resync requested - device id '%s', folder id '%s"
,
$deviceId
,
$folderId
),
true
);
return
true
;
}
}
}
?>
?>
\ No newline at end of file
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