Fixed so that filtered params can be stored in the contents table.
parent
1da58ef039
commit
be44d1fac9
|
@ -1340,7 +1340,10 @@ class H5PCore {
|
||||||
$content['id'] = $this->h5pF->insertContent($content, $contentMainId);
|
$content['id'] = $this->h5pF->insertContent($content, $contentMainId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($content['filtered'])) {
|
||||||
|
// TODO: Add filtered to all impl. and remove
|
||||||
$this->h5pF->cacheDel('parameters', $content['id']);
|
$this->h5pF->cacheDel('parameters', $content['id']);
|
||||||
|
}
|
||||||
|
|
||||||
return $content['id'];
|
return $content['id'];
|
||||||
}
|
}
|
||||||
|
@ -1389,7 +1392,14 @@ class H5PCore {
|
||||||
* @return Object NULL on failure.
|
* @return Object NULL on failure.
|
||||||
*/
|
*/
|
||||||
public function filterParameters($content) {
|
public function filterParameters($content) {
|
||||||
|
if (isset($content['filtered'])) {
|
||||||
|
$params = ($content['filtered'] === '' ? NULL : $content['filtered']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// TODO: Add filtered to all impl. and remove
|
||||||
$params = $this->h5pF->cacheGet('parameters', $content['id']);
|
$params = $this->h5pF->cacheGet('parameters', $content['id']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($params !== NULL) {
|
if ($params !== NULL) {
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue