Revert "Tried to make H5P work again.."

This reverts commit afcf767628591dbcc4f2a48868d994edfb39209d.
namespaces
Svein-Tore Griff With 2013-03-08 18:30:38 +01:00
parent 98c06da4e6
commit ec3b36037c
1 changed files with 6 additions and 9 deletions

View File

@ -102,7 +102,7 @@ interface H5PFrameworkInterface {
* @param int $contentMainId
* Any contentMainId defined by the framework, for instance to support revisioning
*/
public function saveContentData($contentId, $contentJson, $mainJsonData, $libraryId, $contentMainId = NULL);
public function saveContentData($contentId, $contentJson, $mainJsonData, $mainLibraryId, $contentMainId = NULL);
/**
* Copies library usage
@ -605,9 +605,6 @@ class H5PValidator {
$valid = $this->isValidRequirement($h5pData[$required], $requirement, $library_name, $required) && $valid;
}
else {
var_dump($h5pData);
var_dump($required);
exit;
$this->h5pF->setErrorMessage($this->h5pF->t('The required property %property is missing from %library', array('%property' => $required, '%library' => $library_name)));
$valid = FALSE;
}
@ -673,13 +670,13 @@ class H5PStorage {
public function savePackage($contentId, $contentMainId = NULL) {
foreach ($this->h5pC->librariesJsonData as $key => &$library) {
$libraryId = $this->h5pF->getLibraryId($key, $library['majorVersion'], $library['minorVersion']);
if (!$libraryId) {
$library_id = $this->h5pF->getLibraryId($key, $library['majorVersion'], $library['minorVersion']);
if (!$library_id) {
$new = TRUE;
}
elseif ($this->h5pF->isPatchedLibrary($library)) {
$new = FALSE;
$library['id'] = $libraryId;
$library['id'] = $library_id;
}
else {
// We already have the same or a newer version of this library
@ -714,8 +711,8 @@ class H5PStorage {
$this->h5pC->delTree($this->h5pF->getUploadedH5pFolderPath());
$contentJson = file_get_contents($destination_path . DIRECTORY_SEPARATOR . 'content.json');
$libraryId = $librariesInUse[$this->h5pC->mainJsonData['library_name']]['library']['id'];
$this->h5pF->saveContentData($contentId, $contentJson, $this->h5pC->mainJsonData, $libraryId, $contentMainId);
$library_id = $librariesInUse[$this->h5pC->mainJsonData['mainLibrary']]['library']['id'];
$this->h5pF->saveContentData($contentId, $contentJson, $this->h5pC->mainJsonData, $library_id, $contentMainId);
}
public function deletePackage($contentId) {