mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-31 04:00:56 -04:00
#2010 - Revise item::find_by_path to search for jpg-converted items.
- added extra $var_subdir argument to item::find_by_path. - changed item::find_by_path to use $var_subdir to detect if we should look for a jpg-converted item or not (e.g. movie thumbs) - moved the album thumb detection to item::find_by_path to ensure it knows to look for an exact album match. - added more sanity checks to item::find_by_path (now has fewer false positive possibilities). - updated file_proxy to remove the need to guess different movie files. - updated File_Proxy_Controller - new sanity checks catch previously undetected bug. - added additional unit tests for item::find_by_path.
This commit is contained in:
@@ -66,7 +66,7 @@ class File_Proxy_Controller_Test extends Gallery_Unit_Test_Case {
|
||||
public function movie_thumbnails_are_jpgs_test() {
|
||||
$movie = test::random_movie();
|
||||
$name = legal_file::change_extension($movie->name, "jpg");
|
||||
$_SERVER["REQUEST_URI"] = url::file("var/thumbs/{$movie->name}");
|
||||
$_SERVER["REQUEST_URI"] = url::file("var/thumbs/$name");
|
||||
$controller = new File_Proxy_Controller();
|
||||
$this->assert_same($movie->thumb_path(), $controller->__call("", array()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user