1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Add nocache URL to image variations modal per processwire/processwire-issues#369

This commit is contained in:
Ryan Cramer
2017-09-11 14:17:22 -04:00
parent 5a9c8fea58
commit b1048297e9

View File

@@ -1294,12 +1294,14 @@ class ProcessPageEditImageSelect extends Process implements ConfigurableModule {
if(in_array('hidpi', $info['suffix'])) $dimensions .= " ($info[hidpiWidth]x$info[hidpiHeight] {$this->labels['hidpi']})";
$filesize = filesize($info['path']);
$filesizeStr = wireBytesStr($filesize);
$modified = date('Y-m-d H:i:s', filemtime($info['path']));
$mtime = filemtime($info['path']);
$modified = date('Y-m-d H:i:s', $mtime);
$url = "$info[url]?nc=$mtime";
$table->row(array(
++$cnt,
"<a class='preview' href='$info[url]'><img src='$info[url]' alt='$name' style='max-width: 100px;' /></a>",
"<a class='preview' href='$info[url]'>$name</a><br /><span class='detail'>{$width}x{$height}</span>",
"<a class='preview' href='$url'><img src='$url' alt='$name' style='max-width: 100px;' /></a>",
"<a class='preview' href='$url'>$name</a><br /><span class='detail'>{$width}x{$height}</span>",
"<span style='display: none;'>$filesize</span>$filesizeStr",
$modified,
implode('<br />', $notes),