Skip to content

Commit d40a22a

Browse files
committed
change return of save_changes
1 parent 4693a96 commit d40a22a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/editor/tiny/plugins/collaborative/classes/external/save_changes.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ public static function execute(
8181
// May have been called by a non-logged in user.
8282
if (isloggedin() && !isguestuser()) {
8383
$manager = new \tiny_collaborative\change_manager($contextid, $elementid, $oldcontenthash);
84-
$manager->add_collaborative_record($oldid, $newcontenthash, $changes);
84+
$id = $manager->add_collaborative_record($oldid, $newcontenthash, $changes);
8585
}
8686

87-
return [];
87+
return $id;
8888
}
8989

9090
/**
9191
* Describe the return structure of the external service.
9292
*
9393
* @return external_single_structure
9494
*/
95-
public static function execute_returns(): external_single_structure {
96-
return new external_single_structure([]);
95+
public static function execute_returns(): external_value {
96+
return new external_value(PARAM_INT, 'The new id of your entry');
9797
}
9898
}

0 commit comments

Comments
 (0)