Formatting code + adding comments.
pull/50/head
Thomas Horn Sivertsen 2018-01-19 14:56:07 +01:00
parent 1b079d36f1
commit 04edd73855
2 changed files with 21 additions and 16 deletions

View File

@ -451,6 +451,12 @@ class H5PDefaultStorage implements \H5PFileStorage {
return self::dirReady($this->path); return self::dirReady($this->path);
} }
/**
* Check if the file presave.js exists in the root of the library
*
* @param string $name
* @return bool
*/
public function hasPresave($name) { public function hasPresave($name) {
$filePath = implode(DIRECTORY_SEPARATOR, [ $filePath = implode(DIRECTORY_SEPARATOR, [
$this->path, $this->path,
@ -458,7 +464,6 @@ class H5PDefaultStorage implements \H5PFileStorage {
$name, $name,
'presave.js', 'presave.js',
]); ]);
return file_exists($filePath); return file_exists($filePath);
} }