[textpattern commit] r2967 - development/4.0/textpattern/include

0 views
Skip to first unread message

codesite...@google.com

unread,
Aug 29, 2008, 12:22:53 PM8/29/08
to txp...@googlegroups.com
Author: r.wetzlmayr
Date: Fri Aug 29 09:21:59 2008
New Revision: 2967

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.' &#215; '.$h.')" />';
+ $img = '<img src="'.hu.$img_dir.'/'.$id.$ext."?$uDate".'"
height="'.$h.'" width="'.$w.'" alt="" title="'.$id.$ext.' ('.$w.'
&#215; '.$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 = '';
}

Reply all
Reply to author
Forward
0 new messages