mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-14 19:05:01 -04:00
Allow albums to have two (or more) dots in the name. Fixes #1897.
This commit is contained in:
@@ -806,7 +806,7 @@ class Item_Model_Core extends ORM_MPTT {
|
||||
|
||||
// Do not accept files with double extensions, they can cause problems on some
|
||||
// versions of Apache.
|
||||
if (substr_count($this->name, ".") > 1) {
|
||||
if (!$this->is_album() && substr_count($this->name, ".") > 1) {
|
||||
$v->add_error("name", "illegal_data_file_extension");
|
||||
}
|
||||
|
||||
|
||||
@@ -520,4 +520,10 @@ class Item_Model_Test extends Gallery_Unit_Test_Case {
|
||||
$this->assert_true(false, "Shouldn't get here");
|
||||
}
|
||||
}
|
||||
|
||||
public function albums_can_have_two_dots_in_name_test() {
|
||||
$album = test::random_album_unsaved(item::root());
|
||||
$album->name = $album->name . ".foo.bar";
|
||||
$album->save();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user