summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/controllers/file_proxy.php4
-rw-r--r--core/models/item.php8
-rw-r--r--core/tests/Album_Helper_Test.php8
3 files changed, 10 insertions, 10 deletions
diff --git a/core/controllers/file_proxy.php b/core/controllers/file_proxy.php
index 5bb15ebb..6dc27ce1 100644
--- a/core/controllers/file_proxy.php
+++ b/core/controllers/file_proxy.php
@@ -66,8 +66,8 @@ class File_Proxy_Controller extends Controller {
kohana::show_404();
}
- // If the last element is _album.jpg then we're done.
- if (count($paths) == 1 && $paths[0] == "_album.jpg") {
+ // If the last element is .album.jpg then we're done.
+ if (count($paths) == 1 && $paths[0] == ".album.jpg") {
break;
}
}
diff --git a/core/models/item.php b/core/models/item.php
index 9ab230b7..64af79ce 100644
--- a/core/models/item.php
+++ b/core/models/item.php
@@ -102,7 +102,7 @@ class Item_Model extends ORM_MPTT {
*/
public function thumb_path() {
return VARPATH . "thumbs/" . $this->_relative_path() .
- ($this->type == "album" ? "/_album.jpg" : "");
+ ($this->type == "album" ? "/.album.jpg" : "");
}
/**
@@ -113,7 +113,7 @@ class Item_Model extends ORM_MPTT {
return ($full_uri ?
url::abs_file("var/thumbs/" . $this->_relative_path()) :
url::file("var/thumbs/" . $this->_relative_path())) .
- ($this->type == "album" ? "/_album.jpg" : "");
+ ($this->type == "album" ? "/.album.jpg" : "");
}
/**
@@ -122,7 +122,7 @@ class Item_Model extends ORM_MPTT {
*/
public function resize_path() {
return VARPATH . "resizes/" . $this->_relative_path() .
- ($this->type == "album" ? "/_album.jpg" : "");
+ ($this->type == "album" ? "/.album.jpg" : "");
}
/**
@@ -133,7 +133,7 @@ class Item_Model extends ORM_MPTT {
return ($full_uri ?
url::abs_file("var/resizes/" . $this->_relative_path()) :
url::file("var/resizes/" . $this->_relative_path())) .
- ($this->type == "album" ? "/_album.jpg" : "");
+ ($this->type == "album" ? "/.album.jpg" : "");
}
/**
diff --git a/core/tests/Album_Helper_Test.php b/core/tests/Album_Helper_Test.php
index e01ebcbc..1d9388d9 100644
--- a/core/tests/Album_Helper_Test.php
+++ b/core/tests/Album_Helper_Test.php
@@ -23,11 +23,11 @@ class Album_Helper_Test extends Unit_Test_Case {
$album = album::create(1, $rand, $rand, $rand);
$this->assert_equal(VARPATH . "albums/$rand", $album->file_path());
- $this->assert_equal(VARPATH . "thumbs/$rand/_album.jpg", $album->thumb_path());
+ $this->assert_equal(VARPATH . "thumbs/$rand/.album.jpg", $album->thumb_path());
$this->assert_true(is_dir(VARPATH . "thumbs/$rand"), "missing thumb dir");
// It's unclear that a resize makes sense for an album. But we have one.
- $this->assert_equal(VARPATH . "resizes/$rand/_album.jpg", $album->resize_path());
+ $this->assert_equal(VARPATH . "resizes/$rand/.album.jpg", $album->resize_path());
$this->assert_true(is_dir(VARPATH . "resizes/$rand"), "missing resizes dir");
$this->assert_equal(1, $album->parent_id); // MPTT tests will cover other hierarchy checks
@@ -46,12 +46,12 @@ class Album_Helper_Test extends Unit_Test_Case {
public function thumb_url_test() {
$rand = rand();
$album = album::create(1, $rand, $rand, $rand);
- $this->assert_equal("http://./var/thumbs/$rand/_album.jpg", $album->thumb_url());
+ $this->assert_equal("http://./var/thumbs/$rand/.album.jpg", $album->thumb_url());
}
public function resize_url_test() {
$rand = rand();
$album = album::create(1, $rand, $rand, $rand);
- $this->assert_equal("http://./var/resizes/$rand/_album.jpg", $album->resize_url());
+ $this->assert_equal("http://./var/resizes/$rand/.album.jpg", $album->resize_url());
}
}