HFJ-59: Renamed coreVersion to coreApi.
Removes annoying double naming (coreVersion.majorVersion become coreApi.majorVersion) Explicitly states that the versioning is one the API. Explicitly states that this is the core version. (apiVersion could mean API of the library)namespaces
parent
6bb9c9a9b6
commit
b7f14a4c44
|
@ -325,7 +325,7 @@ class H5PValidator {
|
|||
'h' => '/^[0-9]{1,4}$/',
|
||||
'embedTypes' => array('iframe', 'div'),
|
||||
'fullscreen' => '/^(0|1)$/',
|
||||
'coreVersion' => array(
|
||||
'coreApi' => array(
|
||||
'majorVersion' => '/^[0-9]{1,5}$/',
|
||||
'minorVersion' => '/^[0-9]{1,5}$/',
|
||||
),
|
||||
|
@ -656,17 +656,17 @@ class H5PValidator {
|
|||
// Test library core version requirement. If no requirement is set,
|
||||
// this implicitly means 1.0, which shall work on newer versions
|
||||
// too.
|
||||
if (isset($h5pData['coreVersion']) && !empty($h5pData['coreVersion'])) {
|
||||
if (($h5pData['coreVersion']['majorVersion'] > H5PCore::$coreVersion['majorVersion']) ||
|
||||
(($h5pData['coreVersion']['majorVersion'] == H5PCore::$coreVersion['majorVersion']) &&
|
||||
($h5pData['coreVersion']['minorVersion'] > H5PCore::$coreVersion['minorVersion'])))
|
||||
if (isset($h5pData['coreApi']) && !empty($h5pData['coreApi'])) {
|
||||
if (($h5pData['coreApi']['majorVersion'] > H5PCore::$coreApi['majorVersion']) ||
|
||||
(($h5pData['coreApi']['majorVersion'] == H5PCore::$coreApi['majorVersion']) &&
|
||||
($h5pData['coreApi']['minorVersion'] > H5PCore::$coreApi['minorVersion'])))
|
||||
{
|
||||
$this->h5pF->setErrorMessage(
|
||||
$this->h5pF->t('The library "%library_name" requires H5P %requiredVersion, but only H5P %coreVersion is installed.',
|
||||
$this->h5pF->t('The library "%library_name" requires H5P %requiredVersion, but only H5P %coreApi is installed.',
|
||||
array(
|
||||
'%library_name' => $library_name,
|
||||
'%requiredVersion' => $h5pData['coreVersion']['majorVersion'] . '.' . $h5pData['coreVersion']['minorVersion'],
|
||||
'%coreVersion' => H5PCore::$coreVersion['majorVersion'] . '.' . H5PCore::$coreVersion['minorVersion']
|
||||
'%requiredVersion' => $h5pData['coreApi']['majorVersion'] . '.' . $h5pData['coreApi']['minorVersion'],
|
||||
'%coreApi' => H5PCore::$coreApi['majorVersion'] . '.' . H5PCore::$coreApi['minorVersion']
|
||||
)));
|
||||
$valid = false;
|
||||
}
|
||||
|
@ -1224,7 +1224,7 @@ Class H5PExport {
|
|||
* Functions and storage shared by the other H5P classes
|
||||
*/
|
||||
class H5PCore {
|
||||
public static $coreVersion = array(
|
||||
public static $coreApi = array(
|
||||
'majorVersion' => 1,
|
||||
'minorVersion' => 0
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue