diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-02 07:36:00 -0700 | 
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-02 07:36:00 -0700 | 
| commit | b6bf7a58813046904c429a3390dd8e6576d574f6 (patch) | |
| tree | 64f24bf1f539c19017682dc9f149167493a280c6 /modules/gallery/libraries | |
| parent | 7bc40fd3152c35d95b69b320c351d91a7ca0675a (diff) | |
| parent | a674170bf779ab373ef52fe4dd491c2401c4033b (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/Gallery_View.php | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index 32d79ac3..8a0be7f2 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -72,13 +72,16 @@ class Gallery_View_Core extends View {     */    protected function combine_files($files, $type) {      $links = array(); -    $key = array(); + +    // Include the url in the cache key so that if the Gallery moves, we don't use old cached +    // entries. +    $key = array(url::abs_file(""));      foreach (array_keys($files) as $file) {        $path = DOCROOT . $file;        if (file_exists($path)) {          $stats = stat($path); -        $links[] = $path; +        $links[$file] = $path;          // 7 == size, 9 == mtime, see http://php.net/stat          $key[] = "$file $stats[7] $stats[9]";        } else { @@ -92,11 +95,11 @@ class Gallery_View_Core extends View {      if (empty($contents)) {        $contents = ""; -      foreach ($links as $link) { +      foreach ($links as $file => $link) {          if ($type == "css") { -          $contents .= "/* $link */\n" . $this->process_css($link) . "\n"; +          $contents .= "/* $file */\n" . $this->process_css($link) . "\n";          } else { -          $contents .= "/* $link */\n" . file_get_contents($link) . "\n"; +          $contents .= "/* $file */\n" . file_get_contents($link) . "\n";          }        } | 
