|
|
@ -84,7 +84,7 @@ Class DirScanner { |
|
|
|
if (in_array($field, ['title', 'snapshot'])) { |
|
|
|
if (in_array($field, ['title', 'snapshot'])) { |
|
|
|
$content = preg_replace('/\s/', '', $content); |
|
|
|
$content = preg_replace('/\s/', '', $content); |
|
|
|
if ($field == 'snapshot') { |
|
|
|
if ($field == 'snapshot') { |
|
|
|
$img_realpath = "{$pathinfo['dirname']}/{$content}"; |
|
|
|
$img_realpath = realpath("{$pathinfo['dirname']}/{$content}"); |
|
|
|
if (file_exists($img_realpath)) { |
|
|
|
if (file_exists($img_realpath)) { |
|
|
|
$id = $this->getId($img_realpath); |
|
|
|
$id = $this->getId($img_realpath); |
|
|
|
$fp = fopen($img_realpath, 'r'); |
|
|
|
$fp = fopen($img_realpath, 'r'); |
|
|
@ -602,8 +602,7 @@ Class DirScanner { |
|
|
|
foreach ($matches as $url) { |
|
|
|
foreach ($matches as $url) { |
|
|
|
if (preg_match('/^http(s)?:\/\//i', $url) || preg_match('/^\//i', $url)) {continue;} |
|
|
|
if (preg_match('/^http(s)?:\/\//i', $url) || preg_match('/^\//i', $url)) {continue;} |
|
|
|
|
|
|
|
|
|
|
|
$src_realpath = !preg_match('/^\.\//', $url) ? "{$pathinfo['dirname']}/{$url}" : "{$pathinfo['dirname']}/" . preg_replace('/^\.\//', '', $url); |
|
|
|
$src_realpath = realpath("{$pathinfo['dirname']}/{$url}"); |
|
|
|
|
|
|
|
|
|
|
|
if (file_exists($src_realpath)) { |
|
|
|
if (file_exists($src_realpath)) { |
|
|
|
$id = $this->getId($src_realpath); |
|
|
|
$id = $this->getId($src_realpath); |
|
|
|
$fp = fopen($src_realpath, 'r'); |
|
|
|
$fp = fopen($src_realpath, 'r'); |
|
|
|