Modified:
development/4.0/textpattern/include/txp_image.php
Log:
image tab: reduce the chance of stale image caches.
Modified: development/4.0/textpattern/include/txp_image.php
==============================================================================
--- development/4.0/textpattern/include/txp_image.php (original)
+++ development/4.0/textpattern/include/txp_image.php Fri Aug 29 09:21:59
2008
@@ -180,7 +180,7 @@
if ($thumbnail) {
if ($ext != '.swf') {
- $thumbnail = '<img src="'.hu.$img_dir.'/'.$id.'t'.$ext.'" alt="" />';
+ $thumbnail = '<img src="'.hu.$img_dir.'/'.$id.'t'.$ext."?$uDate".'"
alt="" />';
} else {
$thumbnail = '';
}
@@ -334,19 +334,19 @@
$categories = getTree("root", "image");
- $rs = safe_row("*", "txp_image", "id = $id");
+ $rs = safe_row("*, unix_timestamp(date) as uDate", "txp_image", "id =
$id");
if ($rs) {
extract($rs);
if ($ext != '.swf') {
- $img = '<img src="'.hu.$img_dir.'/'.$id.$ext.'" height="'.$h.'"
width="'.$w.'" alt="" title="'.$id.$ext.' ('.$w.' × '.$h.')" />';
+ $img = '<img src="'.hu.$img_dir.'/'.$id.$ext."?$uDate".'"
height="'.$h.'" width="'.$w.'" alt="" title="'.$id.$ext.' ('.$w.'
× '.$h.')" />';
} else {
$img = '';
}
if ($thumbnail and ($ext != '.swf')) {
- $thumb = '<img src="'.hu.$img_dir.'/'.$id.'t'.$ext.'" alt="" />';
+ $thumb = '<img src="'.hu.$img_dir.'/'.$id.'t'.$ext."?$uDate".'" alt=""
/>';
} else {
$thumb = '';
}