Skip to content

Commit

Permalink
Add a cache-buster to the SWF url so that it'll refresh in the browser
Browse files Browse the repository at this point in the history
every time the SWF file changes.
  • Loading branch information
bharat committed Jun 17, 2010
1 parent a03e3d1 commit 3592351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/organize/controllers/organize.php
Expand Up @@ -47,6 +47,8 @@ function dialog($album_id) {
$v->access_key = rest::get_access_key($user->id)->access_key;

$v->protocol = (empty($_SERVER["HTTPS"]) OR $_SERVER["HTTPS"] === "off") ? "http" : "https";
$v->swf_url = url::file("modules/organize/lib/Gallery3WebClient.swf?") .
filemtime(MODPATH . "organize/lib/Gallery3WebClient.swf");
print $v;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/organize/views/organize_dialog.html.php
Expand Up @@ -121,7 +121,7 @@ function getGalleryParameters() {
attributes.id = "Gallery3WebClient";
attributes.name = "Gallery3WebClient";
attributes.align = "middle";
swfobject.embedSWF("<?= url::file("modules/organize/lib/Gallery3WebClient.swf") ?>",
swfobject.embedSWF("<?= $swf_url ?>",
"flashContent", size.width() - 100, size.height() - 135,
swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
</script>
Expand Down

0 comments on commit 3592351

Please sign in to comment.