mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:35:12 +00:00
task sync
This commit is contained in:
parent
e3c2e39b7a
commit
60e73c01ac
2 changed files with 7 additions and 2 deletions
|
@ -33,7 +33,7 @@ class Libsync
|
|||
public static function build_sync_packet($uid = 0, $packet = null, $groups_changed = false)
|
||||
{
|
||||
|
||||
//logger('build_sync_packet');
|
||||
// logger('build_sync_packet');
|
||||
|
||||
$keychange = (($packet && array_key_exists('keychange', $packet)) ? true : false);
|
||||
if ($keychange) {
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Code\Module;
|
|||
|
||||
use App;
|
||||
use Code\Web\Controller;
|
||||
use Code\Lib\Libsync;
|
||||
use Code\Lib\Apps;
|
||||
use Code\Widget\Tasklist;
|
||||
|
||||
|
@ -70,6 +71,7 @@ class Tasks extends Controller
|
|||
}
|
||||
$x = event_store_event($event);
|
||||
if ($x) {
|
||||
Libsync::build_sync_packet($channel['channel_id'], ['event' => [$x]]);
|
||||
$ret['success'] = true;
|
||||
}
|
||||
}
|
||||
|
@ -93,10 +95,13 @@ class Tasks extends Controller
|
|||
$event['summary'] = escape_tags($_REQUEST['summary']);
|
||||
$x = event_store_event($event);
|
||||
if ($x) {
|
||||
Libsync::build_sync_packet($channel['channel_id'], ['event' => [$x]]);
|
||||
$x['success'] = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$x = ['success' => false];
|
||||
}
|
||||
|
||||
json_return_and_die($x);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue