Damian Mooyman
0b1f297873
Merge remote-tracking branch 'origin/3.1'
...
Conflicts:
.travis.yml
README.md
admin/code/LeftAndMain.php
admin/css/screen.css
admin/scss/screen.scss
api/RestfulService.php
conf/ConfigureFromEnv.php
control/injector/ServiceConfigurationLocator.php
control/injector/SilverStripeServiceConfigurationLocator.php
core/ClassInfo.php
core/Object.php
css/AssetUploadField.css
css/ComplexTableField_popup.css
dev/CSSContentParser.php
dev/DevelopmentAdmin.php
docs/en/changelogs/index.md
docs/en/misc/contributing/code.md
docs/en/reference/execution-pipeline.md
filesystem/GD.php
filesystem/ImagickBackend.php
filesystem/Upload.php
forms/Form.php
forms/FormField.php
forms/HtmlEditorConfig.php
forms/gridfield/GridFieldDetailForm.php
forms/gridfield/GridFieldSortableHeader.php
lang/en.yml
model/Aggregate.php
model/DataList.php
model/DataObject.php
model/DataQuery.php
model/Image.php
model/MySQLDatabase.php
model/SQLQuery.php
model/fieldtypes/HTMLText.php
model/fieldtypes/Text.php
scss/AssetUploadField.scss
search/filters/SearchFilter.php
security/Authenticator.php
security/LoginForm.php
security/Member.php
security/MemberAuthenticator.php
security/MemberLoginForm.php
security/Security.php
tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
tests/control/HTTPTest.php
tests/control/RequestHandlingTest.php
tests/filesystem/UploadTest.php
tests/forms/FormTest.php
tests/forms/NumericFieldTest.php
tests/model/DataListTest.php
tests/model/DataObjectTest.php
tests/model/TextTest.php
tests/security/MemberAuthenticatorTest.php
tests/security/SecurityDefaultAdminTest.php
tests/view/SSViewerCacheBlockTest.php
tests/view/SSViewerTest.php
2014-11-18 12:45:54 +13:00
Sean Harvey
2b316e79e5
NEW Provide a consistent way of triggering flush
...
Provides an interface for classes to implement their own flush()
functionality. This function gets called early in a request on
all implementations of Flushable when flush=1|all is requested in the
URL.
This fix came out of an issue where Requirements combined files were not
being cleaned up after dev/build?flush=1, due to the fact that flush
would only occur when you called it while on a page that used those
combined files, but not in any other contexts. This will now call flush
on any implementors of Flushable regardless of the context of where
flush was called.
2014-08-22 09:24:27 +12:00
Damian Mooyman
eb069e605d
Remove all redundant whitespace
2014-08-19 09:17:15 +12:00
Daniel Hensby
7617f08ad3
Use Controller::join_links()
in RestfulService
...
At the moment, `RestfulService` duplicates functionality of
`Controller::join_links` (badly) and it means that one MUST use a base
URL with a trailing slash for the URL to be constructed properly
Plus tests for `RestfulService::getAbsoluteRequestURL()`
API Deprecating `RestfulService::constructURL()`
This function isn't used in core so we should remove it
2014-05-08 08:59:57 +01:00
Daniel Hensby
87bb99667e
Revert "FIX: allow CURLOPT_CONNECTTIMEOUT to be configured."
...
This reverts commit 0d493d4eff
.
2014-05-06 22:13:56 +01:00
Will Rossiter
0d493d4eff
FIX: allow CURLOPT_CONNECTTIMEOUT to be configured.
2013-12-01 15:13:22 +13:00
Hamish Friedlander
b1f03db4ff
FIX Improve recent RestfulService fix for proxies
2013-09-20 16:26:39 +12:00
Mateusz Uzdowski
7ddd5b57c3
BUG Do not rely on broken curl header size calculation.
...
Header parsing now takes into account situations like a proxy or
redirections. Works around the curl issue.
Also fixes the issue when a redirected request would cause a double
amount of headers coming out of the parser - it would merrily process
anything that's in key:value format even if it was two distinct headers.
2013-09-20 15:02:40 +12:00
Daniel Hensby
ddd6a15b4a
FIX RestfulService header parsing now accepts non-title case headers
2013-07-10 13:00:40 +01:00
Ingo Schommer
1916a6e8f4
Fixed config API usage (unknown call to set())
2013-03-26 00:04:01 +01: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
06ff9f72b1
Increased recent deprecation warnings from 3.1 to 3.2
...
The deprecations are supposed to denote the release where
the functionality will be removed, as opposed to the one where
its deprecated. Having 3.1 as a target for recent changes
in popular methods like Object::add_extension() causes
too many short-term hassles, there's no "grace period".
2013-03-20 10:00:51 +01:00
Ingo Schommer
e486574b31
Merge pull request #1203 from dhensby/restfulservice-improvements
...
BUG Fixing a couple of bugs in RestfulService
2013-03-12 15:54:52 -07:00
Sam Minnée
b90e0c0955
Merge pull request #1230 from oddnoc/3.1-restfulservice-error-check
...
BUG: Fetch curl_error in RestfulService
2013-02-24 17:59:32 -08:00
Fred Condo
d3b3ab806d
BUG: Fetch curl_error in RestfulService
...
$curlError was used only once and never defined. Replace $curlError with
a call to curl_error($ch).
2013-02-22 17:41:55 -08:00
Fred Condo
bd73142bcf
BUG: Correct semantic error regarding cURL options in RestfulService
...
cURL options are numeric, and array_merge is destructive of numeric
keys. Replace array_merge calls with array union operator, with defaults
on right-hand side so that passed options override defaults.
2013-02-22 17:39:01 -08:00
Daniel Hensby
1cf2259b2c
BUG Undefined var
...
Getting the curl error.
2013-02-19 12:07:22 +00:00
Daniel Hensby
8d32ae954b
BUG setBody on SS_HTTPRequest is a function
...
When settingt he cached body on the RESTfulService_Response, the setBody should be a function call, not a variable assignment
2013-02-18 11:55:11 +00:00
Daniel Hensby
920fd71a2f
Adding default curl options
...
Because I removed completely the static setting of SSL_VERIFYPEER I've
added the ability to declare default curl options on the class. This
means that users that really want to one line turn off SSL_VERIFYPEER
can do so without needing to pass a custom option in every request()
call.
2013-02-15 11:45:52 +00:00
Daniel Hensby
f003359047
RestfulService_Response now gets response headers
...
Before now, the RestfulService_Response object was never sent the
response headers. For APIs that rely on the response headers to send
back information (signatures, pagination info, etc).
This change makes the curl response have the full HTTP response
(including Headers). We then extract the body and the header information
and assign them to relevant vars and then construct the response as
before (with the addition of the headers array).
This change required two new functions:
extractResponse: This extracts the HTTP Headers and the payload from the
curl response and assigns it to the relevany vars that are passed by
reference
parseRawHeaders: This was designed to mimic http_parse_headers (a
non-standard php class). It converts the headers into an associative
array.
2013-02-15 11:45:36 +00:00
Daniel Hensby
7c189731e3
Better cache key generation
...
All of the arguments supplied to the request function can impact what is
returned by a restful service.
This takes account of that and makes the cache key more specific,
including basic auth details, so we don't rely on *just* the absolute
URL for caching.
2013-02-15 11:16:46 +00:00
Simon Welsh
b0121b541c
Add codesniffer that ensures indentation is with tabs.
2012-12-12 17:33:31 +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
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Ingo Schommer
0e8c3acc35
MINOR Using SapphireInfo non-statically in RestfulService ( fixes #7238 )
2012-04-30 10:22:00 +02:00
Simon Welsh
f07258f3cf
MINOR Update @package values to match renaming sapphire
2012-04-15 10:50:19 +12:00
Fred Condo
d370423825
Clean up trailing ?> per coding standard
...
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Fred Condo
9bd499617b
Spelling correction
...
Found and fixed all misspellings of "[Hh]ierarchy"
2011-10-18 15:32:52 -07:00
ajshort
3f132a105b
API CHANGE: Replaced DataObjectSet instances with ArrayList.
2011-05-05 20:40:24 +10:00
ajshort
eb1a3fe75a
API CHANGE: Separated the actual CURL request generation code from RestfulService::request() into RestfulService::curlRequest().
...
MINOR: Updated RestfulServiceTest to use a mock service rather than the actual site. This eliminates the need for ?usetestmanifesst.
2011-03-24 21:31:00 +11:00
Sean Harvey
145d285d4b
BUGFIX RestfulService CURLOPT_FOLLOWLOCATION cannot be used when open_basedir option enabled in PHP (thanks jshipman!)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115062 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-15 05:23:55 +00:00
Sam Minnee
7f3f167748
ENHANCEMENT: make RestfulService support PUT method. (from r108942)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112768 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:51:33 +00:00
Sam Minnee
d60ef78ba4
ENHANCEMENT: Restful service returns cached response on http and curl errors (from r108437)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112750 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:36:48 +00:00
Ingo Schommer
6460d09570
MINOR Fixed phpdoc documentation
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@103385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-23 00:11:41 +00:00
Ingo Schommer
f660634cc9
ENHANCEMENT you can now pass arbitrary CURL options to the request() method of RestfulService. (from r98656)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102770 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-14 02:20:57 +00:00
Ingo Schommer
028d59ffc3
ENHANCEMENT Added RestfulService::set_default_proxy() and RestfulService->setProxy() ( #4637 , thanks hamish) (from r97192)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102432 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:39:14 +00:00
Ingo Schommer
37685e6d3f
API CHANGE Removed RestfulService->connect(), use RestfulService->request()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91587 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-15 19:39:48 +00:00
Sam Minnee
4252067f0c
MINOR Changed silverstripe.com references to silverstripe.org
...
MINOR Fixed broken wiki links (#4672 ) (from r90886)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90957 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-06 03:35:07 +00:00
Andrew Short
79773042be
API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
...
MINOR: Replaced usage of renamed classes with the new namespaced name.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Sean Harvey
b77d088d47
Merged in parent::__construct() additions from branches/2.3 - r83580 and r83587
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86676 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-18 03:02:19 +00:00
Ingo Schommer
faed7b0c14
MINOR Making version number in RestfulService dynamic (see #4383 )
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81824 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-14 20:55:42 +00:00
Ingo Schommer
c1f0dda466
BUGFIX Deleted duplicate call to curl_exec() in RestfulService (merge error from r69704)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81822 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-14 20:51:58 +00:00
Sean Harvey
1b1809f1a2
Merged from branches/2.3
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80873 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-02 07:18:18 +00:00
Andrew O'Neil
60f75c5ca4
Merged changes from 2.3 branch
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Ingo Schommer
085346f0e0
MINOR Merged from branches/2.3
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69704 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-01-05 06:19:48 +00:00
Sam Minnee
3d9532db83
Merged branches/2.3
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66108 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-18 01:48:37 +00:00
Sean Harvey
6195772779
ENHANCEMENT Allow use of RestfulService->setQueryString() and test to support it. Patch from ticket #2973 . Thanks to simon_w!
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64596 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-21 03:45:44 +00:00
Ingo Schommer
81e89c08fe
API CHANGE Removed deprecated RestfulService->connect(), use RestfulService->request()
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64373 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:34:45 +00:00
Ingo Schommer
2d8434a43f
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 02:57:59 +00:00
Ingo Schommer
6bd5da7e6e
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60206 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 03:29:30 +00:00