|
|
|
@ -84,7 +84,7 @@ Class DirScanner {
@@ -84,7 +84,7 @@ Class DirScanner {
|
|
|
|
|
if (in_array($field, ['title', 'snapshot'])) { |
|
|
|
|
$content = preg_replace('/\s/', '', $content); |
|
|
|
|
if ($field == 'snapshot') { |
|
|
|
|
$img_realpath = "{$pathinfo['dirname']}/{$content}"; |
|
|
|
|
$img_realpath = realpath("{$pathinfo['dirname']}/{$content}"); |
|
|
|
|
if (file_exists($img_realpath)) { |
|
|
|
|
$id = $this->getId($img_realpath); |
|
|
|
|
$fp = fopen($img_realpath, 'r'); |
|
|
|
@ -602,8 +602,7 @@ Class DirScanner {
@@ -602,8 +602,7 @@ Class DirScanner {
|
|
|
|
|
foreach ($matches as $url) { |
|
|
|
|
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)) { |
|
|
|
|
$id = $this->getId($src_realpath); |
|
|
|
|
$fp = fopen($src_realpath, 'r'); |
|
|
|
|