{
// assume all album entries are symlinks to archive originals
$target = preg_replace('{^(\.\./)*}', '', readlink($path));
- $thumb = preg_replace('{^data/}', 'thumb/200/', $target);
+ $thumb = 'thumb/200/' . $target;
@list ($order, $size, $title) = explode(':', pathinfo($path, PATHINFO_FILENAME), 3);
$imgtag = 'img src="/'.$thumb.'"';
$cover = "$path/index.jpg";
if (!file_exists($cover)) $cover = 'foto/index.jpg';
if (is_link($cover)) {
- $cover = preg_replace('{^(?:\.\./)*data/}', 'thumb/100/', readlink($cover));
+ $cover = preg_replace('{^(?:\.\./)*(?=data/)}', 'thumb/100/', readlink($cover));
}
$html = '<img src="/'.$cover.'" />';