Commit Graph

2055 Commits

Author SHA1 Message Date
Damian Mooyman
7f057ce343 API UploadField functions on new records
Fixed regression from 1e5d40474d (UploadField::canPreviewFolder).
Merged in pull request #2009 - (6018bdd631).
Merged pull request #1259 (34bfc862ee).
2013-05-27 15:22:59 +12:00
Stephen Shkardoon
d6c2c2e07f Fixes #1892 - Stop session hijacking with UA check 2013-05-25 19:29:08 +12:00
Simon Erkelens
513270ca48 API: Allow array of fields passed to FieldList::removeByName()
Supports passing an array to removeByName(), which is iterate and then removed. Useful for removing fields from a fieldlist that are not on a tab. Similar to removeFieldsFromTab();
This is cleaner than a new function.
2013-05-25 15:31:30 +12:00
Sam Minnée
c26ddee191 Merge pull request #1861 from raket/dataobject-update-orphan
Fix: Orphaned records when running DataObject::update
2013-05-24 19:48:48 -07:00
Sam Minnee
738581f0f5 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	.travis.yml
2013-05-23 18:59:34 +12:00
Simon Welsh
b9d5f27194 Add code-sniffs other than line length to scrutinizer 2013-05-23 10:39:01 +12:00
Will Rossiter
5ec4f3146f Merge pull request #1869 from wilr/open6236
FIX: Remove version field from default scaffolded CMS fields.
2013-05-21 03:50:55 -07:00
Will Rossiter
f6cd582dd9 FIX: Remove version field from default scaffolded CMS fields. 2013-05-21 22:47:54 +12:00
Sean Harvey
13e632d053 Merge pull request #1867 from tractorcow/3.1-urlsegmentfilter-fixes
BUG Fixes issue with "+" characters in url.
2013-05-20 00:36:18 -07:00
Jeremy Shipman
d21fd1f0bb FIX: Don't rewrite urls to be absolute, if they are a URI with a protocol.
This is determined in this fix by the existence of a colon ':', to show the uri has a protocol.
2013-05-20 11:59:04 +12:00
Ingo Schommer
8bf2f16c75 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	README.md
2013-05-17 13:50:40 +02:00
Damian Mooyman
6e0e3564e1 NEW Added beforeExtending, afterExtending, and beforeUpdateCMSFields to allow user code better control over interaction with extending methods 2013-05-16 10:34:45 +12:00
Sam Minnee
b401d39aec NEW: Move temp data into a user-specific subfolder, to stop temp-permission bugs from occurring.
Anyone who has run "sudo -u www-data ./framework/sake dev/build" knows that SilverStripe's temp
folder permissions can be very brittle.  This patch resolves this by making the temp folder
user-specific.

To minimise directory pollution it first creates a chmod 777 parent folder with the same name
as the current folder.  It then creates a subfolder of this with the same name as the current
user.

The positive impact of this change is that sake can be used without fear of messing up file
permissions.  This means, among other things, that we can put a Composer post-update-cmd into
the installer to run dev/build.  Progress!

The negative impact is that you will get two caches if you run sake as a different user.  However,
that is much better than the current situation - which is a bunch of bugs - and if you're concerned
about that, you still have the option of running sake as www-data.
2013-05-15 12:54:55 +02:00
Ingo Schommer
7bf790a5fa Merge pull request #1875 from wilr/open6473
FIX: If CSV column mapping maps to function, keep key values
2013-05-14 04:02:01 -07:00
Will Rossiter
c8af0fd7d1 FIX: If CSV column mapping maps to function, keep key value as key.
Fixes http://open.silverstripe.org/ticket/6473

When using CSVParser::$columnMapping to map columns to a callback action, it previously used the action name as the key value. This prevented users from defining multiple entries to the same callback. This patch retains those key values and simply runs the callback field name filter later on.
2013-05-14 22:00:52 +12:00
Sean Harvey
bb6283740a Fixing broken CoreTest when using silverstripe-cache for temp folder 2013-05-13 23:39:52 +12:00
Ingo Schommer
8c02f10c03 Merge pull request #1874 from wilr/open6210
API: Add sync_blacklisted_patterns for configuring files to skip in sync()
2013-05-12 15:15:23 -07:00
Will Rossiter
a99dbae012 FIX: NumericField should work with numbers like 54,6
Fixes http://open.silverstripe.org/ticket/5577.

Uses Zend_Locale_Format::isNumber(). Includes unit test for NumericField. Does not include testing work on DBField underlying NumericField to ensure that works consistently.
2013-05-11 22:51:39 +12:00
Will Rossiter
1a36bb628e API: Add sync_blacklisted_patterns for configuring files to skip in sync tasks
Fixes http://open.silverstripe.org/ticket/6210.

Replaces the hardcoded file patterns from Folder::syncChildren() with a new static Filesystem::$sync_blacklisted_patterns to describe files and folder names to skip when running Folder::sync().

Added unit test for Folder::sync()

Extended Folder::sync() to report on the number of file / folders skipped.
2013-05-11 16:06:14 +12:00
Ingo Schommer
d6733caf14 Merge pull request #1870 from wilr/is_https
API: Add Director::is_https()
2013-05-10 05:28:00 -07:00
Will Rossiter
42cf2a95bd FIX: Add support for multi dimensional source arrays in LookupField (open/6132) 2013-05-11 00:01:39 +12:00
Will Rossiter
718108969b API: Add ArrayLib::flatten($array, $preserveKeys) 2013-05-11 00:00:31 +12:00
Will Rossiter
1325d736a0 API: Add Director::is_https() 2013-05-10 22:31:38 +12:00
Damian Mooyman
de41a2a75e BUG Fixes issue with '+' characters in url. 2013-05-10 16:16:31 +12:00
Jeremy Shipman
d47b202697 Restored c4eac5310e (merge error)
FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-05-09 23:06:02 +02:00
Ingo Schommer
3b02d22989 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	dev/CsvBulkLoader.php
2013-05-09 10:34:20 +02:00
Sam Minnée
9672a22166 Merge pull request #1851 from chillu/pulls/form-strict-method-check
Form strict method check
2013-05-08 22:31:40 -07:00
Marcus Dalgren
7f871fa18b Fix orphaned records when running update
When DataObject::update() is run with relation fields and the relationship
is new the relationship ID was not set on the DataObject. This patch fixes
this. Fixes issue 6195 in open.silverstripe.org.
2013-05-09 03:53:53 +02:00
Ingo Schommer
5d9cbae949 Merge pull request #1819 from oddnoc/csvbulkloader-findexisting-3.1
Use the correct variable as the key into $record
2013-05-08 04:23:05 -07:00
Ingo Schommer
14c59be85e API Form::setStrictFormMethodCheck() and strict argument to setFormMethod()
Thanks to @sminnee for getting this started
2013-05-08 10:25:13 +02:00
Ingo Schommer
1a52a51195 DataObject->duplicate() test
Advanced relationship copying is already tested further down,
but doesn't cover the same basics. Triggered by a CMS bug
which turned out to be unrelated (https://github.com/silverstripe/silverstripe-cms/issues/689)
2013-05-07 10:06:15 +02:00
Sean Harvey
677122256e Merge pull request #1837 from simonwelsh/short-array-parse
FIX Handle PHP 5.4's short array notation everywhere arrays are parsed.
2013-05-06 20:32:51 -07:00
Sean Harvey
f1a4e7203e BUG Fixing queries on non-existent table breaking archive site
With a many to many relation, e.g. SiteTree_MyRelation, and listing
them in your template then adding ?archiveDate=x in the URL, a SQL
error is shown because Versioned::augmentSQL() tries to query the
non-existent table "SiteTree_MyRelation_versions" assuming there's
versioning setup, but there isn't.
2013-05-07 12:34:46 +12:00
Simon Welsh
835aefbe83 FIX Handle PHP 5.4's short array notation everywhere arrays are parsed. 2013-05-05 13:27:42 +12:00
Simon Welsh
cb0977ce9f Remove duplicate parse_class_spec method. 2013-05-05 11:43:56 +12:00
Fred Condo
bd5c8520bb FIX: Use the correct variable as the key into $record
It was using $fieldName, which is the CSV field name, not the database
field name. This prevents duplicate detection from working. It now
properly uses $SQL_fieldName.

Update CsvBulkLoaderTest to remove keys that are nonexistent in the CSV
test data. Having them causes the test to fail with an undefined-index
error. This did not previously fail because of the bug in CsvBulkLoader
that this patch fixes. This partially reverts c4eac53.
2013-05-01 06:50:40 -07:00
Damian Mooyman
4d5bd451bb Updated HTMLTextTest to test for correct testFirstSentence, specifically a past failing test case. fixes #1422 2013-05-01 16:03:58 +12:00
Ingo Schommer
5efae23cb2 FIX Template discovery on themed Layout templates
Was failing when 'main' template only exists in theme,
but 'Layout' template only exists in module.
2013-04-30 15:41:26 +02:00
Ingo Schommer
cef955c8b9 Removed stray ampersand in Requirements (fixes #1809)
Only happens with suffix_requirements=true
2013-04-30 00:35:25 +02:00
Ingo Schommer
0e5b099287 FIX Unquoted shortcodes weren't parsed (fixes #680)
Since that used to be the default shortcode notation
for our core "insert media" functionality, its important
to have this fixed and keep supporting "legacy" content
created with 3.0.
2013-04-26 01:00:13 +02:00
Zauberfisch
809e0e547a MINOR: updated and extended Tests 2013-04-22 18:17:31 +00:00
Sam Minnee
9ba26a04c4 Added test for lazy-loading edge-case in Money field. 2013-04-22 11:50:57 +12:00
Jeremy Shipman
c4eac5310e FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
2013-04-19 16:52:39 +12:00
Che Van Lawrence
d07fb4355d Merge pull request #1770 from kinglozzer/config-dir-detection-fix
FIX: _config/ directories are now correctly detected as modules (fixes #1762)
2013-04-18 14:48:55 -07:00
Sean Harvey
6e0fa5db45 Merge pull request #1768 from tractorcow/3.1-http-mail-fixes
BUG HTTP incorrectly converts mailto links to absolute urls
2013-04-18 14:46:10 -07:00
Loz Calver
0384369acb FIX: _config/ directories are now correctly detected as modules (fixes #1762)
DO NOT MERGE: to be reviewed. Only i18n & Deprecation classes use
->getModules() as far as I can see. Given that the method still simply
returns an array of modulename => modulepath, I don't think it's really
an API change
2013-04-18 14:08:03 +01:00
Damian Mooyman
b6fc1d314e BUG HTTP will now correctly pass over mailto: links when converting relative links to absolute (e.g. in Emails) 2013-04-18 14:25:51 +12:00
Simon Welsh
93a8e6f16e Merge pull request #1773 from silverstripe-rebelalliance/fix/htmlvalue_attr_escaping
FIX We still need XML escaping on href attributes in HTML4Value
2013-04-17 15:05:33 -07:00
Hamish Friedlander
8d26bdbd2e FIX We still need XML escaping on href attributes in HTML4Value 2013-04-18 09:13:24 +12:00
s-m
acf2ff8ce6 BUG: Fix for #1487
The parser could sometimes generate invalid code if the
source-file-comments were enabled, this moves the comments outside the
html-tag to circumvent these problems, update test as well.
2013-04-15 19:54:41 +02:00