Merge branch 'master' into file-storage-interface

Conflicts:
	h5p.classes.php
pull/17/head
Frode Petterson 2016-03-16 10:01:13 +01:00
commit b8a3965c6e
1 changed files with 1 additions and 17 deletions

View File

@ -334,16 +334,6 @@ interface H5PFrameworkInterface {
*/ */
public function getLibraryUsage($libraryId); public function getLibraryUsage($libraryId);
/**
* Get a key value list of library version and count of content created
* using that library.
*
* @return array
* Array containing library, major and minor version - content count
* e.g. "H5P.CoursePresentation 1.6" => "14"
*/
public function getLibraryContentCount();
/** /**
* Loads a library * Loads a library
* *
@ -1723,8 +1713,6 @@ class H5PCore {
if ($development_mode & H5PDevelopment::MODE_LIBRARY) { if ($development_mode & H5PDevelopment::MODE_LIBRARY) {
$this->h5pD = new H5PDevelopment($this->h5pF, $path . '/', $language); $this->h5pD = new H5PDevelopment($this->h5pF, $path . '/', $language);
} }
$this->detectSiteType();
} }
/** /**
@ -2455,10 +2443,6 @@ class H5PCore {
$platformInfo = $this->h5pF->getPlatformInfo(); $platformInfo = $this->h5pF->getPlatformInfo();
$platformInfo['autoFetchingDisabled'] = $fetchingDisabled; $platformInfo['autoFetchingDisabled'] = $fetchingDisabled;
$platformInfo['uuid'] = $this->h5pF->getOption('site_uuid', ''); $platformInfo['uuid'] = $this->h5pF->getOption('site_uuid', '');
$platformInfo['siteType'] = $this->h5pF->getOption('site_type', 'local');
$platformInfo['libraryContentCount'] = $this->h5pF->getLibraryContentCount();
$platformInfo['librariesInstalled'] = $this->getLibrariesInstalled();
// Adding random string to GET to be sure nothing is cached // Adding random string to GET to be sure nothing is cached
$random = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5); $random = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 5);
$json = $this->h5pF->fetchExternalData('http://h5p.org/libraries-metadata.json?api=1&platform=' . urlencode(json_encode($platformInfo)) . '&x=' . urlencode($random)); $json = $this->h5pF->fetchExternalData('http://h5p.org/libraries-metadata.json?api=1&platform=' . urlencode(json_encode($platformInfo)) . '&x=' . urlencode($random));
@ -2596,7 +2580,7 @@ class H5PCore {
$response = array( $response = array(
'success' => TRUE 'success' => TRUE
); );
if ($message !== NULL) { if ($data !== NULL) {
$response['data'] = $data; $response['data'] = $data;
} }
self::printJson($response); self::printJson($response);