Commit Graph

12 Commits

Author SHA1 Message Date
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
86940aa684 Made hyphen escaping clearer in FileNameFilter and URLSegmentFilter
Does not actually change behaviour, but ensures that the hyphen
is not interpreted as a range identifier should it be placed
between two characters which PCRE regards as "rangeable".
2012-12-19 17:30:28 +01:00
Sean Harvey
1ce279ec9d BUG FileNameFilter should remove any amount of underscores from start of filename
When a user renames a file to "__test.txt" (two underscores or more),
then FileNameFilter will only remove the very first underscore from the
filename. This is not sufficient, as any number of underscores in the
filename will be problematic when Filesystem::sync() is called, it will
remove that File record thinking it's an internal file. This fixes it
so any number of underscores are stripped out at the start of the filename.
2012-10-29 17:07:58 +13:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Simon Welsh
9bd7765272 API CHANGE Renames Transliterator to SS_Transliterator
The intl extension in PHP 5.4 provides a Transliterator class, which
conflicts with the SilverStripe one. This leads to some really weird
ReflectionExceptions about Transliterator's constructor being
private.
2012-06-15 15:54:47 +12:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Ingo Schommer
40d73127ae MINOR Using late static binding instead of Object::create() calls 2012-04-04 17:10:31 +02:00
Ingo Schommer
9b27a4c1be ENHANCEMENT More flexible URL filtering through new URLSegmentFilter API. Support for multibyte URL segments through URLPathFilter::$default_allow_multibyte. Abstraction from Convert::raw2url() (and SiteTree->generateURLSegment()) 2011-11-29 11:04:08 +01:00
Ingo Schommer
d1ebe1ce9a BUGFIX Fixed double negation of transliterator checks in FileNameFilter, which meant it wasn't used by default when filtering SiteTree->URLSegment 2011-11-14 10:26:38 +01:00
Ingo Schommer
da0ac49d5f API CHANGE Rewriting underscores to dashes in files uploaded through Upload->load(), Folder->addUploadToFolder() or Image->loadUploadedImage(). Transliterating non-ASCII characters automatically (turn off via FileNameFilter::$default_use_transliterator=false)
ENHANCEMENT New FileNameFilter class for a more customisable way to influence filename filtering in Upload->load(), Folder->addUploadToFolder() or Image->loadUploadedImage()
2011-10-07 14:12:46 +02:00