Commit Graph

9921 Commits

Author SHA1 Message Date
Ingo Schommer
b3d4951a88 Merge pull request #836 from sminnee/line-endings-fix-3.0
Line endings fix
2012-10-01 14:59:04 -07:00
Sam Minnee
b7e7c165ff NEW Amend Travis build to run a simple PHP_CodeSniffer test.
At this stage, the test just checks line-length and line-endings, but previous commits have ensured that framework actually passes those tests.  We can add more tests as we actually correct the code to pass those tests, and grow the test suite, as we had for unit tests.
2012-09-30 17:28:46 +13:00
Sam Minnee
1f7fc1f76a FIX Remove instances of lines longer than 120c
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit.  This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Sam Minnee
28bd939580 FIX: Ignore charset when checking mime types in LeftAndMain ajax responses.
This is partly a fix to #7574, although quite different from the work Ingo did on Content-length.  The text/json mime type occasionally gets a charset suffixed to it by the webserver, which broke everything.

A follow-on fix from this would be to get the PHP code to supply charsets more consistently, so that webservers don't have to make things up.

Additionally, the 2nd interpretation - which treats the response as text/html - should probably only happen if the response is text/html, and throw a more helpful error otherwise.
2012-09-30 16:32:22 +13:00
Sam Minnée
1a1740e563 Merge pull request #835 from chillu/pulls/7574
BUG Setting response length directly before output (fixes #7574)
2012-09-29 18:15:00 -07:00
Ingo Schommer
356a367eb5 BUG Setting response length directly before output (fixes #7574)
Complying to HTTP1.1/RFC2616 in terms of when to
set 'Content-Length' in the first place
2012-09-29 17:24:33 +02:00
Ingo Schommer
b75c4b84ec Localization for PermissionCheckboxSetField 2012-09-28 16:41:25 +02:00
Jeremy Bridson
07bc75c281 ENHANCEMENT: open/7881 - removed disabled checkboxes and replaced them with green ticks. Added help text above the list of permissions. Removed action buttons by fade out when user goes to users permissions tab. 2012-09-28 16:37:35 +02:00
Ingo Schommer
91e4fde96f ENHANCEMENT "Readonly" behaviour for CMS tabs 2012-09-28 16:37:35 +02:00
Ingo Schommer
d504e9e634 Add .cms-tabset on all GridFieldDetailForm instances
This allows us to add cms behaviour consistently
2012-09-28 16:37:35 +02:00
Ingo Schommer
d50341d8cd Rendering attributes for CMSTabSet.ss
Make behaviour consistent with parent template, Tabet.ss
2012-09-28 16:37:34 +02:00
Ingo Schommer
ea86b96fbb Merge pull request #832 from halkyon/sitetree_children_disabled
BUG If a nested page editable but parent not, user can't expand tree
2012-09-28 06:38:26 -07:00
Ingo Schommer
ecbdab90ee Merge pull request #834 from Firesphere/patch-2
Translation possible for clear before import
2012-09-28 05:44:09 -07:00
Simon Erkelens
f991401a52 Translation possible for clear before import
I couldn't figure out why it wouldn't translate...
2012-09-28 09:45:16 +03:00
Sam Minnée
d6b4606087 Merge pull request #831 from frankmullenger/3.0
BUGFIX: Old version of SimpleTest does not recognise input fields of type 'email'.
2012-09-27 17:28:17 -07:00
Sean Harvey
b186626b73 BUG If a nested page editable but parent not, user can't expand tree
If you're logged in as a specific user in a group who has view/edit
permissions of a page that has a parent page which doesn't have
permissions, you can't expand the tree node to get access to that
nested page.

This fixes LeftAndMain.Tree.js to allow expanding if there are
immediate children tree nodes that are not disabled. Also fixes
styling so that only immediate children nodes are greyed out.

Fixes this ticket: http://open.silverstripe.org/ticket/7913
2012-09-28 12:18:34 +12:00
Frank Mullenger
a602ba5941 BUGFIX: Old version of SimpleTest does not recognise input fields of
type 'email'.
2012-09-28 12:07:54 +12:00
Will Rossiter
a86b54b3ed Update tutorial to include RSS feed API change. 2012-09-27 18:46:48 +12:00
Sam Minnée
de8f06b711 Merge pull request #828 from tractorcow/3.0-win-compatibility-fixes
3.0 win compatibility fixes
2012-09-26 21:14:38 -07:00
Damian Mooyman
d54ef36b47 FIXED: CSV Test cases now use platform-correct linebreak characters 2012-09-27 13:54:19 +12:00
Damian Mooyman
5ea2c3dc5a FIXED: Unnecessarily strict comparison of path separators in windows filenames 2012-09-27 13:41:28 +12:00
Ingo Schommer
61148834f2 Merge pull request #824 from nyeholt/tab_null_pointer
BUG Fixed possible reference to null string
2012-09-26 02:31:13 -07:00
Ingo Schommer
33f67e1ad8 Fixed FulltextSearchable regression from 21a6390d 2012-09-26 11:28:25 +02:00
Ingo Schommer
21a6390d7f Merge pull request #817 from tractorcow/3.0-file-index-update
FIXED: Minor adjustment to order of file fulltext search fields.
2012-09-26 02:15:05 -07:00
Marcus Nyeholt
da70dc469c BUG Fixed possible reference to null string
Hashlink for tabs in the backend didn't check the existence of
the href value before trying to .replace it.
2012-09-26 16:27:50 +10:00
Ingo Schommer
93c00ec80a Merge pull request #819 from howardgrigg/patch-3
Correct brush name in template docs to avoid js popup
2012-09-25 05:33:04 -07:00
Howard Grigg
69e9876059 Correct brush name in template docs to avoid js popup 2012-09-25 22:27:30 +10:00
Sam Minnée
95005818c3 Merge pull request #818 from tractorcow/3.0-duplicate-field-description-fix
FIXED: Issue with duplicate help tips appearing on select fields in CMS
2012-09-24 18:42:25 -07:00
Damian Mooyman
495ffb033c FIXED: Issue with duplicate help tips appearing on select fields in CMS. See Security / Groups / Edit Group form field for example. 2012-09-25 13:37:17 +12:00
Damian Mooyman
cd7ea01bd1 FIXED: Minor adjustment to order of file fulltext search fields. By matching the order of these index columns to the same as the fields on the table itself, this will prevent the unnecessary regeneration of fulltext indexes on some database connectors each dev/build, notably MS SQL Server. 2012-09-25 12:31:50 +12:00
Simon Welsh
2b172aa891 Merge branch 'patch-2' of https://github.com/anselmdk/sapphire into 3.0 2012-09-24 18:22:49 +12:00
Sean Harvey
8806fd18c5 MINOR Upgrading TinyMCE dependency from 3.5.6 to 3.5.7 2012-09-24 15:05:50 +12:00
Anselm Christophersen
0df9b1c8a0 added CroppedImage 2012-09-23 19:46:06 +03:00
Sean Harvey
0b17e0036a BUG Fixing percent encoding issues with saveHTML 2012-09-23 22:28:42 +12:00
Ingo Schommer
e44a3558dd Merge pull request #793 from halkyon/htmlvalue_parsing_fixes
BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
2012-09-20 02:09:36 -07:00
Simon Welsh
fe0e357be9 Merge pull request #807 from chillu/pulls/public-function
Method visibility according to coding conventions
2012-09-20 01:55:52 -07:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Simon Welsh
d3112f7d20 Merge pull request #806 from halkyon/requirements_combined_fallback
BUG If combined files can't be written, fallback instantly to uncombined
2012-09-19 20:22:39 -07:00
Sean Harvey
954eb60983 BUG If combined files can't be written, fallback instantly to uncombined 2012-09-20 14:01:45 +12:00
Simon Welsh
d0153f32cf Write the test before ending it, so it still exists.
Also, switches to a constant instead of hardcoding the value.
2012-09-19 21:41:34 +12:00
Ingo Schommer
069dbfa69a Merge pull request #801 from howardgrigg/patch-2
Updated Template docs to include using backslash to escape
2012-09-19 02:32:01 -07:00
Simon Welsh
4e7ed3f535 Merge pull request #804 from wilr/corecontrollertemplate
Include $Form  in basic Controller view
2012-09-19 02:22:10 -07:00
Will Rossiter
3fc928a861 Include in basic Controller view 2012-09-19 21:00:43 +12:00
Sam Minnée
a5d9e3260c Merge pull request #802 from tractorcow/3.0-unittest-error-fixes
FIXED: Issue with test reporting
2012-09-18 23:45:53 -07:00
Sam Minnée
445aabfe2e Merge pull request #803 from halkyon/temp_path_tinymce
Have tiny_mce_gzip.php use local silverstripe-cache folder if available
2012-09-18 22:47:40 -07:00
Sean Harvey
b075fa29c5 Have tiny_mce_gzip.php use local silverstripe-cache folder if available
This is a fix for ticket #7670. Some hosting situations don't
allow write access to the system temp path. tiny_mce_gzip.php is currently
using sys_get_temp_dir() by default, and not using a local silverstripe-cache
folder that may exist in the SilverStripe project.

This change moves the getTempFolder() function into a common file, and
includes that in core/Core.php, as well as thirdparty/tinymce/tiny_mce_gzip.php
so both locations share the same code to work out the temp path.
2012-09-19 16:43:17 +12:00
Sean Harvey
e0beca198b Added missing $tempPath argument (regression from last commit) 2012-09-19 13:30:05 +12:00
Sean Harvey
aa4fa75091 Consistently use the $base argument to getTempFolder() 2012-09-19 13:27:43 +12:00
Damian Mooyman
69d888b5d1 FIXED: Issue with test reporting not correctly presenting errors that prevent test execution.
In the case of errors arising during setUp or setUpOnce a unit test will fail to run any individual tests. However, this situation was incorrectly being reported as a test pass (as no tests were run, thus no tests had errors). E.g. the output of a test run that raised an error during setUp would be "0 tests run: 0 passes, 0 failures, and 0 incomplete" with a green background.

To rectify this the following fixes were made:
- Non-cleanly ended tests and test suites are now automatically ended at the end of the test run, as well as at the beginning of subsequent test/suites. This should make catching of errors a lot more robust.
- Errors raised during setup are now no longer lost to the mist of time. The test suite itself will record any error status which was generated outside the scope of any individual tests.
- An additional "errors" count is added to the output at the end of test running. For example, in the case where setup failed and no tests could be run the error would be written to the browser (along with stacktrace) with a message similar to "0 tests run: 0 passes, 0 failures, and 0 incomplete with 1 errors". The intent of this is to separate the concepts of failed/succeeded/incomplete tests from any errors which may have arisen. I.e. no tests "failed" due to the error, but the test run itself is highlighted as an error (red background on the output).

This problem has been a severe cause of issue when testing code that interacts with the database, as any database error during setup would refuse to be shown.
2012-09-19 12:25:58 +12:00
Sean Harvey
26d70d6fca BUG HtmlEditorField doesn't save HTML fragments in HTMLValue correctly
The issue was raised in #7628, where an anchor tag was being changed from
<a name="anchor"></a> to <a name="anchor"/> by SS_HTMLValue, when
HtmlEditorField::saveInto() parses the HTML fragments.

This is because SS_HTMLValue uses DOMDocument::saveXML(), which is fine
for saving an XML document, but not suitable for HTML. This fix changes
that to use DOMDocument::saveHTML() instead.
Note that we can't use the parameter to saveHTML() for selecting a single
node only, as that's only supported in PHP 5.3.6+, SilverStripe 3.0 supports
PHP 5.3.2 as a minimum. The workaround for this shortcoming is to replace
unncessary output by DOMDocument with a regular expression.
2012-09-19 11:39:01 +12:00