From 754346992bfe0dd854cb9cc4ade8806bc0f4b64d Mon Sep 17 00:00:00 2001 From: thomasmars Date: Tue, 14 Mar 2017 14:21:36 +0100 Subject: [PATCH] Minor documentation details --- h5p-default-storage.class.php | 2 ++ h5p-file-storage.interface.php | 17 ++++++++++++++--- h5p.classes.php | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/h5p-default-storage.class.php b/h5p-default-storage.class.php index c9dc99d..2f8fbbc 100644 --- a/h5p-default-storage.class.php +++ b/h5p-default-storage.class.php @@ -364,6 +364,8 @@ class H5PDefaultStorage implements \H5PFileStorage { * * @param string $source path to source directory * @param string $target path of target directory. Defaults to editor path + * + * @return object Object containing h5p json and content json data */ public function moveContentDirectory($source, $target = NULL) { if ($source === NULL) { diff --git a/h5p-file-storage.interface.php b/h5p-file-storage.interface.php index 93ca771..fadee65 100644 --- a/h5p-file-storage.interface.php +++ b/h5p-file-storage.interface.php @@ -139,7 +139,7 @@ interface H5PFileStorage { * The files must be marked as temporary until the content form is saved. * * @param \H5peditorFile $file - * @param int $contentid + * @param int $contentId */ public function saveFile($file, $contentId); @@ -148,11 +148,22 @@ interface H5PFileStorage { * Used when copy pasting content in H5P. * * @param string $file path + name - * @param string|int $fromid Content ID or 'editor' string - * @param int $toid Target Content ID + * @param string|int $fromId Content ID or 'editor' string + * @param int $toId Target Content ID */ public function cloneContentFile($file, $fromId, $toId); + /** + * Copy a content from one directory to another. Defaults to cloning + * content from the current temporary upload folder to the editor path. + * + * @param string $source path to source directory + * @param string $target path of target directory. Defaults to editor path + * + * @return object Object containing h5p json and content json data + */ + public function moveContentDirectory($source, $target = NULL); + /** * Checks to see if content has the given file. * Used when saving content. diff --git a/h5p.classes.php b/h5p.classes.php index 819ceb8..0587bf7 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2795,8 +2795,9 @@ class H5PCore { // Set uuid if (!$postData) { + $siteKey = $this->h5pF->getOption('site_key', ''); $postData = array( - 'uuid' => $this->h5pF->getOption('site_uuid', '') + 'uuid' => $siteKey ? $siteKey : $this->h5pF->getOption('site_uuid', '') ); }