Commit Graph

1739 Commits

Author SHA1 Message Date
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
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02: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
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
Simon Welsh
4e3c684b62 Merge branch 'bugfix/apishortcodes' of https://github.com/elliot-sawyer/sapphire into 3.0 2012-09-18 16:36:11 +12:00
Sam Minnée
651f45e0e4 Merge pull request #782 from tractorcow/3.0-index-generation-fixes
FIXED: Generation of table indexes
2012-09-16 23:43:17 -07:00
Elliot Sawyer
71758c782f ISSUE 7833: Invoke ShortcodeParser on RestfulServer output 2012-09-17 17:53:51 +12:00
Damian Mooyman
0e997d0285 FIXED: Cleaned up test case, made sure it initialised consistently and correctly
ADDED: Extra assertions to test case to ensure that different expressions of the same index definition were treated as non-changes.
2012-09-14 14:55:07 +12:00
Ingo Schommer
b0fc1cb16a Merge branch '3.0.2' into 3.0 2012-09-12 11:05:50 +02:00
Ingo Schommer
99b1bc672b Don't rely on hardcoded IDs in DataListTest (breaks postgres) 2012-09-12 10:51:40 +02:00
Ingo Schommer
8772eb3e18 Merge branch '3.0.2' into 3.0 2012-09-12 09:50:38 +02:00
Ingo Schommer
d5313aa6a4 BUG Fixed SSViewerTest execution in non-dev environments 2012-09-12 09:50:10 +02:00
Damian Mooyman
30e15d11a7 FIXED: Generation of tables with fulltext indexes now no longer incorrectly thinks that all fulltext indexes have changed.
ADDED: Test cases correctly checking for changes (and no changes) to the data model for both fields and indexes.
FIXED: References to indexes throughough the code that probably should have quoted field names. This prevents a lot of 'spam' during dev build. This includes an updated FulltextSearchable test case.
2012-09-11 12:53:08 +12:00
Simon Welsh
4ead89a4d0 API Adds getManipulatedList() method to GridField to get the SS_List after applying Manipulators 2012-09-06 23:42:48 +12:00
Sean Harvey
b6a6c4670e NEW Allow setting default cache lifetime, and test that it's being used correctly on new caches 2012-09-03 12:55:19 +12:00
Ingo Schommer
2facc31e1f BUGFIX Case insensitive search filters for PostgreSQL (fixes #6548) 2012-09-02 23:02:20 +02:00
Sam Minnée
c738744c38 Merge pull request #740 from tractorcow/3.0-route-fixes-alt
FIXED: Issue where route table arguments would not be accessible without using non deprecated API
2012-08-28 17:41:30 -07:00
Sam Minnee
09e3fa4e6a Removed pre-emptive dev/build from travis test run, to make it faster. 2012-08-29 12:10:58 +12:00
Simon Welsh
9d2686130c Merge cd61b61 from master 2012-08-29 11:18:41 +12:00
Sam Minnee
abbce151d9 Updated Travis-CI configuration to have a 4 build grid.
The Travis config will now run tests on the following instances

 * 5.3 + SQLite
 * 5.3 + MySQL
 * 5.3 + PostgreSQL
 * 5.4 + MySQL

In other words, with the exception of Windows tech (MSSQL + Win server) this is a wide-coverage build config.
2012-08-28 16:25:26 +12:00
Sam Minnée
93cdb83ac8 Merge pull request #738 from simonwelsh/lsb-53-30
FIX Removes version checking for LSB in Object::static_lookup()
2012-08-27 21:07:29 -07:00
Hamish Friedlander
8b6e4f5a90 Add some basic tests for ConfigManifest#relativeOrder 2012-08-27 16:42:25 +12:00
Damian Mooyman
9b6216d967 FIXED: Error in test case deprecation 2012-08-27 11:04:16 +12:00
Damian Mooyman
c2a8eec43c APICHANGE: Changed behaviour of HTTP_Request::params to include route table params (as per 2.4 behaviour, see FIX: below).
ADDED: HTTP_Request::params() to retrieve all (shifted) params used in the request
FIXED: Issue where route-table level arguments would not be accessible without using non-deprecated API.
ADDED: Test case to test the above items
UPDATED: Extended Director::test to allow for the retrieval of the request object
UPDATED: Deprecated notice on Director::urlParam and Director::urlParams
REMOVED: Unused variable
FIXED: Coding convention conformity
2012-08-27 10:56:59 +12:00
Simon Welsh
e159a68f89 FIX Removes version checking for LSB in Object::static_lookup()
Late static binding was added in PHP 5.3, not 5.4. As such, the check for 5.4
and then fallback to Reflection isn't needed.
2012-08-23 17:51:29 +12:00
Sam Minnee
f6334dd017 Added default sort to test data for better cross-db performance. 2012-08-23 12:38:33 +12:00
Fred Condo
3e0782267c Allow scheme-relative URLs in requirements
The Requirements class currently treats only absolute URLs as URLs, and
tries to interpret anything else as a filesystem path. This prevents
using scheme-relative URLs for requirements.

Example:
<% require javascript(//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js) %>

This forces the unfortunate choice of not using a CDN for common
scripts, always using an https absolute URL, or accepting that some
browsers will throw a security warning when viewing the site in https.

This change allows scheme-relative URLs & updates RequirementsTest.
2012-08-22 16:49:55 -07:00
Sam Minnée
47b56d4ef8 Merge pull request #716 from tractorcow/3.0-versioned-fixes
FIXED: Crashed caused by viewing versioned page
2012-08-19 19:02:24 -07:00
Damian Mooyman
89728acece UPDATED: Improved get_all_versions test case to test versions in the middle of version updates. 2012-08-20 13:48:48 +12:00
Damian Mooyman
56fe7f881a REMOVED: Unnecessary publish actions from test cases
ADDED: Test case for get_all_versions
2012-08-20 13:44:56 +12:00
Damian Mooyman
0f09305e3d FIXED: Issue where temporary table would cause unpredictable behaviour. Temporary table functionality was substituted with subqueries in each use case.
ADDED: Test case for version archive functionality.
2012-08-20 13:24:28 +12:00
Ingo Schommer
6d41cd8d09 Merge pull request #686 from wilr/3.0-rssfeed
FIX: use standard template rendering process for RSS feeds
2012-08-16 14:45:44 -07:00
Sam Minnee
fe1434678b Revert "Make PHPUnit bootstrap add flush=1"
This reverts commit e0037967c2.

Conflicts:

	tests/travis/_ss_environment.php
2012-08-14 19:00:57 +12:00
Sam Minnee
2c62dda47a Fixed Travis CI and make it use SQLite 2012-08-14 17:02:28 +12:00
Sam Minnee
e0037967c2 Make PHPUnit bootstrap add flush=1 2012-08-14 17:02:12 +12:00
Sam Minnee
04e3beddf5 Added support for Travis CI 2012-08-14 16:02:12 +12:00
Will Rossiter
7558d32da6 FIX: use standard template rendering process for RSS feeds
This changes the behaviour of output to browser to use the standard SilverStripe rendering process rather than an echo statement to enable easier testability.
2012-07-31 20:38:41 +12:00
Hamish Friedlander
36c8fc2e93 Merge pull request #660 from silverstripe-rebelalliance/trac/7673
API Prep ArrayList, DataList, forForeignID for immutability in 3.1 per 7673
2012-07-22 21:30:53 -07:00
Hamish Friedlander
e160b76df5 BUG 7362 dont include trailing space in bare string 2012-07-23 15:42:58 +12:00
Hamish Friedlander
b7691077cf API Prep forForeignID for immutability in 3.1 per 7673 2012-07-23 10:31:47 +12:00
Ingo Schommer
1a91431d39 Query param searches for GridFieldAddExistingAutocompleter
Fixes issues with query construction in JS when the search URL
already contains GET paramters (e.g. when using the 'translatable'
module).
2012-07-17 13:26:33 +02:00
Mateusz Uzdowski
70dcb55fe0 BUG Use prepStringForDB consistently across the framework.
Also remove a line from DBFieldTest, it's redundant with the previous
line.

Ref: os7229
2012-07-17 14:27:58 +12:00
Saophalkun Ponlu
c555256890 BUGFIX: PaginatedList::getIterator() trims the original list to the page lenght when the source list is DataList 2012-07-15 01:02:49 +12:00
Ingo Schommer
712f28bc78 Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
Ingo Schommer
bc1c7f766a Add sorting to GridFieldDetailFormTest fixtures
Broke SQLite3 tests in some cases due to random ordering of results.
2012-07-06 12:42:42 +02:00
Ingo Schommer
64669938da Warning when running tests without flush=1
This is now the default setting for both "sake" and "phpunit"
runs, because of performance reasons (every manifest flush takes
multiple seconds). On the other hand, we want to make errors
like missing classes more obvious to developers.
See discussion in https://github.com/silverstripe/sapphire/pull/620
2012-07-06 12:01:21 +02:00
Ingo Schommer
c072dc4757 Merge pull request #620 from chillu/pull/no-flush-on-tests
No flush in framework/tests/bootstrap.php (kills TDD) (for 3.0 branch)
2012-07-06 03:00:57 -07:00
Ingo Schommer
55c348d01b Merge pull request #621 from chillu/pull/dbdatetimetest-offsets
Skip tests rather than throw PHP error on wrong offests in DBDatetimeTest
2012-07-06 02:34:19 -07:00
Ingo Schommer
64357a4522 Merge branch '3.0'
Conflicts:
	admin/css/screen.css
	admin/scss/_forms.scss
	docs/en/changelogs/3.0.0.md
2012-07-05 18:01:09 +02:00
Ingo Schommer
664903433d Mark DBDatetimeTest skipped on wrong offsets, rather than error out.
While well-intentioned, this test keeps causing problems
due to wrong timezone settings in test mode.
It shouldn't completely abort test execution,
since its more of an environment sanity check than a failed test.

Refactored to mark test skipped (regardless of offset, as long as
its greater than 5 seconds). And skipping tests altogether
on SQLite3 with new supportsTimezoneOverride() check.
SapphireTest->setUp() sets the PHP timezone to UTC (see 59547745),
but SQLite doesn't support this for a DB connection.
Since changing it on a global UNIX system level is infeasible,
the tests need to be skipped.
2012-07-05 16:20:18 +02:00