mainVersion -> majorVersion

namespaces
falcon 2012-12-04 20:56:16 +01:00
parent af6475609e
commit c595c1147a
1 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ class h5pValidator {
// Schemas used to validate the h5p files // Schemas used to validate the h5p files
private $h5pRequired = array( private $h5pRequired = array(
'title' => '/^.{1,255}$/', 'title' => '/^.{1,255}$/',
'mainVersion' => '/^[0-9]{1,5}$/', 'majorVersion' => '/^[0-9]{1,5}$/',
'language' => '/^[a-z]{1,5}$/', 'language' => '/^[a-z]{1,5}$/',
'preloadedDependencies' => array( 'preloadedDependencies' => array(
'machineName' => '/^[a-z0-9\-]{1,255}$/i', 'machineName' => '/^[a-z0-9\-]{1,255}$/i',
@ -49,7 +49,7 @@ class h5pValidator {
private $libraryRequired = array( private $libraryRequired = array(
'title' => '/^.{1,255}$/', 'title' => '/^.{1,255}$/',
'mainVersion' => '/^[0-9]{1,5}$/', 'majorVersion' => '/^[0-9]{1,5}$/',
'machineName' => '/^[a-z0-9\-]{1,255}$/i', 'machineName' => '/^[a-z0-9\-]{1,255}$/i',
); );
@ -187,7 +187,7 @@ class h5pValidator {
$validLibrary = $this->isExcistingFiles($h5pData['preloadedCss'], $tmp_dir, $file) && $validLibrary; $validLibrary = $this->isExcistingFiles($h5pData['preloadedCss'], $tmp_dir, $file) && $validLibrary;
} }
if ($validLibrary) { if ($validLibrary) {
$libraries[$file][$h5pData['mainVersion']] = $h5pData; $libraries[$file][$h5pData['majorVersion']] = $h5pData;
} }
$valid = $validLibrary && $valid; $valid = $validLibrary && $valid;
} }
@ -224,7 +224,7 @@ class h5pValidator {
* Use the dependency declarations to find any missing libraries * Use the dependency declarations to find any missing libraries
* *
* @param array $libraries * @param array $libraries
* A multidimensional array of libraries keyed with machineName first and mainVersion second * A multidimensional array of libraries keyed with machineName first and majorVersion second
* @return array * @return array
* A list of libraries that are missing keyed with machineName and holds objects with * A list of libraries that are missing keyed with machineName and holds objects with
* machineName and minimumVersion properties * machineName and minimumVersion properties
@ -250,7 +250,7 @@ class h5pValidator {
* @param array $dependencies * @param array $dependencies
* A list of objects with machineName and minimumVersion properties * A list of objects with machineName and minimumVersion properties
* @param array $libraries * @param array $libraries
* A multidimensional array of libraries keyed with machineName first and mainVersion second * A multidimensional array of libraries keyed with machineName first and majorVersion second
* @return * @return
* A list of libraries that are missing keyed with machineName and holds objects with * A list of libraries that are missing keyed with machineName and holds objects with
* machineName and minimumVersion properties * machineName and minimumVersion properties