Browse Source

fix: conflict between files with same basenames (e.g. ex.md ex.jpg)

master
Dom SP 3 years ago
parent
commit
e62627d9f9
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      app/modules/filesinfolders.php

+ 5
- 5
app/modules/filesinfolders.php View File

$str = self::content_element_dispatcher($str); $str = self::content_element_dispatcher($str);
$str = $md->text($str); $str = $md->text($str);
//$str = sprintf("%s", $str); //$str = sprintf("%s", $str);
$this->content[$domain][$key] = sprintf(
$this->content[$domain][$key."30text"] = sprintf(
"<div class=\"item %s %s\">%s</div>", "<div class=\"item %s %s\">%s</div>",
$page, $page,
$key, $key,
$str = file_get_contents($file); $str = file_get_contents($file);
$str = \Template::instance()->render($file); $str = \Template::instance()->render($file);
$str = self::linkify($str); $str = self::linkify($str);
$this->content[$domain][$key] = sprintf(
$this->content[$domain][$key."00tpl"] = sprintf(
"<div class=\"item %s %s\">%s</div>", "<div class=\"item %s %s\">%s</div>",
$page, $page,
$key, $key,
; ;
if ($bulkIncludePic) { if ($bulkIncludePic) {
foreach($this->structs[$domain_key]['pic'] as $key=>$file) { foreach($this->structs[$domain_key]['pic'] as $key=>$file) {
$this->content[$domain][$key] = sprintf(
$this->content[$domain][$key."10image"] = sprintf(
"<img class=\"bulkImportedImage $bulkIncludePic\" src=\"/$file\" />" "<img class=\"bulkImportedImage $bulkIncludePic\" src=\"/$file\" />"
); );
} }
; ;
if ($bulkIncludeAudio) { if ($bulkIncludeAudio) {
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) { foreach ($this->structs[$domain_key]['audio'] as $key=>$file) {
$this->content[$domain][$key] = sprintf(
$this->content[$domain][$key."20audio"] = sprintf(
'<a href="%s" class="audio">%s</a><br>', '<a href="%s" class="audio">%s</a><br>',
$file, $key $file, $key
); );
$str .= sprintf("<tr>%s</tr>",$tmp); $str .= sprintf("<tr>%s</tr>",$tmp);
} }
$str.="</table>"; $str.="</table>";
$this->content[$domain][$key] = $str;
$this->content[$domain][$key."30csv"] = $str;
} }
} }
} }

Loading…
Cancel
Save