Merge branch 'master' of github.com:h5p/h5p-php-library

namespaces
Pål Jørgensen 2014-08-19 10:15:14 +02:00
commit e97fc0ae12
2 changed files with 6 additions and 2 deletions

View File

@ -1699,7 +1699,7 @@ class H5PCore {
* Returns FALSE only if string is not parsable in the normal library * Returns FALSE only if string is not parsable in the normal library
* string formats "Lib.Name-x.y" or "Lib.Name x.y" * string formats "Lib.Name-x.y" or "Lib.Name x.y"
*/ */
public function libraryFromString($libraryString) { public static function libraryFromString($libraryString) {
$re = '/^([\w0-9\-\.]{1,255})[\-\ ]([0-9]{1,5})\.([0-9]{1,5})$/i'; $re = '/^([\w0-9\-\.]{1,255})[\-\ ]([0-9]{1,5})\.([0-9]{1,5})$/i';
$matches = array(); $matches = array();
$res = preg_match($re, $libraryString, $matches); $res = preg_match($re, $libraryString, $matches);
@ -2192,7 +2192,7 @@ class H5PContentValidator {
} }
if (!isset($this->libraries[$value->library])) { if (!isset($this->libraries[$value->library])) {
$libspec = $this->h5pC->libraryFromString($value->library); $libspec = H5PCore::libraryFromString($value->library);
$library = $this->h5pC->loadLibrary($libspec['machineName'], $libspec['majorVersion'], $libspec['minorVersion']); $library = $this->h5pC->loadLibrary($libspec['machineName'], $libspec['majorVersion'], $libspec['minorVersion']);
$library['semantics'] = json_decode($library['semantics']); $library['semantics'] = json_decode($library['semantics']);
$this->libraries[$value->library] = $library; $this->libraries[$value->library] = $library;

View File

@ -189,6 +189,7 @@ div.h5p-fullscreen {
float: right; float: right;
margin-right: 0; margin-right: 0;
font-size: 2.0em; font-size: 2.0em;
line-height: 1;
overflow: hidden; overflow: hidden;
color: #999; color: #999;
text-decoration: none; text-decoration: none;
@ -198,6 +199,9 @@ div.h5p-fullscreen {
font-family: 'H5P'; font-family: 'H5P';
content: "\e88e"; content: "\e88e";
} }
.h5p-actions > li {
margin: 0;
}
.h5p-popup-dialog { .h5p-popup-dialog {
position: absolute; position: absolute;
top: 0; top: 0;