Commit Graph

2017 Commits

Author SHA1 Message Date
Ingo Schommer
f79c6aeb83 BUGFIX Don't allow HTML formatting in RequestHandler->httpError() by sending "Content-Type: text/plain" response headers. (from r114444)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114445 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:03 +13:00
Ingo Schommer
30e3f08efb MINOR Checking for class_exists() before SapphireTest::is_running_tests() to avoid including the whole testing framework, and triggering PHPUnit to run a performance-intensive directory traversal for coverage file blacklists (from r114332)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114334 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:03 +13:00
Ingo Schommer
5236e09026 BUGFIX Including template /lang folders in i18n::include_by_locale() (implementation started in r113919)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114208 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Ingo Schommer
43c85e3c9a ENHANCEMENT Added SS_HTTPResponse->setStatusDescription() as equivalent to setStatusCode(). Added documentation.
BUGFIX Strip newlines and carriage returns from SS_HTTPResponse->getStatusDescription() (fixes #6222, thanks mattclegg) (from r114082)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114083 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Ingo Schommer
b5e9b911d3 BUGFIX Removed double quoting of $where parameter in Translatable::get_existing_content_languages() (fixes #6203, thanks cloph) (from r114080)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114081 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Ingo Schommer
253083bc81 MINOR Documentation for Aggregate caching (from r114077)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@114078 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Sean Harvey
10d283a641 BUGFIX #6201 Use of set_include_path() did not always include sapphire paths in some environments
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113976 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:02 +13:00
Saophalkun Ponlu
8381858d58 MINOR: Make sure that Translatable creates a translated parent of SiteTree only when the parent is not translated (from r113955)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113956 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Sean Harvey
febcc15c3a MINOR Fixed spaces with tabs in Core
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Sean Harvey
b7d7a86b51 MINOR Fixed spaces with tabs for Core::getTempFolder()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Ingo Schommer
a9e611d721 ENHANCEMENT Allowing i18nTextCollector to discover entities in templates stored in themes/ directory (thanks nlou) (from r113918)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:01 +13:00
Sean Harvey
68eebd8023 BUGFIX ErrorPage::requireDefaultRecords() case where no assets directory causes an fopen() error. Ensure assets directory is created before attempting to write error page files
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:20:00 +13:00
Ingo Schommer
d2b489b4ef BUGFIX Clear static marking caches on Hierarchy->flushCache()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113277 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:59 +13:00
Ingo Schommer
1aadb8c990 MINOR Using SecurityToken in ViewableData->getSecurityID()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113274 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Ingo Schommer
20b41e1904 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113241 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:58 +13:00
Sean Harvey
f58644116d BUGFIX Renamed MySQLQuery::__destroy() renamed to __destruct() so that it is called properly after the object is destroyed
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@112288 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:57 +13:00
Sean Harvey
9f673c1e9a MINOR Reverted regression in r112272
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@112278 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:57 +13:00
Sean Harvey
e81f11cc60 ENHANCEMENT MySQLDatabase::renameField() no longer checks that the field exists in fieldList(). alterField() does no such check, so it should be consistent. Removing this should provide a small performance improvement as well
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@112272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:57 +13:00
Sean Harvey
5453c1a99d BUGFIX #3910 Setting timezone parameter to MySQLDatabase::__construct() should use $this->query() to be consistent
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111889 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:56 +13:00
Sean Harvey
14d9011658 ENHANCEMENT MySQLDatabase::getVersion() now uses mysql_get_server_info() which has been supported since PHP 4. This gives us a better version than say "5.1", instead we now get something like "5.1.51"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111868 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
80caa74d9d MINOR Revert r111850 to MySQLDatabase::getVersion as version comparisons need to happen, and this will strip out non-numeric characters e.g. "ubuntu1" or "lenny4" which are prefixed on some Linux distros
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111852 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
5019881d1d MINOR dev/build now shows database name and version next to "Building database ..." text
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111851 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
f0b68587bc ENHANCEMENT Make use of mysql_get_server_info() when calling MSSQLDatabase::getVersion(), if there's a problem getting info this way, falls back to using query for VERSION() details
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111850 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Sean Harvey
9d78fbb983 BUGFIX #6055 ErrorPage should always create static error page files when dev/build is called if they don't exist
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111842 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:55 +13:00
Ingo Schommer
622fda969f MINOR Fixed documentation in Datetime (fixes #6062, thanks nicolaas)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111787 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Sean Harvey
10f8318e32 BUGFIX DB::connect() should not rely on $_SESSION existing, so we check isset() to supress any warnings of undefined indexes
MINOR Code formatting tidy of DB::connect() function


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111772 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:54 +13:00
Sean Harvey
47227a9395 BUGFIX ContentController::SiteConfig() should look to the SiteTree record so an alternate SiteConfig is considered, if this method doesn't exist on the data record then fall back to the default SiteConfig
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111255 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:53 +13:00
Sean Harvey
451fa7664b MINOR Spelling corrections to Director comments
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111123 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Sean Harvey
aa5eacc6ff ENHANCEMENT #6023 Shorten SSViewer cached template path for readability of the filenames, and also so Windows doesn't break on long paths
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
3cc576d69a MINOR Documentation for constants in Core.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111052 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
f4ae35b55a BUGFIX Unset $default_session when using Session::clear_all()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111049 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:52 +13:00
Ingo Schommer
1b5ec9bd50 BUGFIX: Don't require a current controller for Session::get/set/etc to work.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111043 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:51 +13:00
Ingo Schommer
94f03523b5 ENHACENEMENT: Change behaviour of the MenufestBuilder to use spl_autoload_register instead of traditional __autoload.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111038 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Sean Harvey
ae89969321 BUGFIX Fixed column names that were not quoted that broke PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110944 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Sean Harvey
92c04a6a1c BUGFIX Fixed double quotes around column names in Versioned::augmentDatabase()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110914 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Will Rossiter
f9a84974b6 BUGFIX: delete orphaned records from versioned tables when updating. #5936
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:50 +13:00
Ingo Schommer
1ae4d04246 MINOR Avoid using ASP-style tags in SSViewer comments, it confuses PHP with asp_tags=ON (fixes #5976, thanks ezero)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110836 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Will Rossiter
1f0d664150 BUGFIX: ensure that pages can only be requested from staging and live
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110759 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Sean Harvey
c5bf8a31cb ENHANCEMENT #5977 Added optional argument to ClassInfo::getValidSubClasses() and removed harcoded SiteTree
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110467 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Sean Harvey
d566ac4292 MINOR Warning about install.php existing for root site tree node as well (SiteConfig form)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110440 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Andreas Piening
0e156f1759 MINOR: added missing closing tag
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110243 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:49 +13:00
Sean Harvey
e65bfb893d MINOR Make dev/build not constantly show a changed index because of whitespace between VersionID and Version in the index spec
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:48 +13:00
Andreas Piening
3a210c397a MINOR: only call next() in iterator validation on initialisation or after reset NOT if current value is invalid
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@110190 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:48 +13:00
Mateusz Uzdowski
0e60353e05 BUGFIX: makeRelative would return "false" for the root path, empty string is expected - fix that
BUGFIX: change the check in forceSSL to work on Windows - it sets the $_SERVER['https'] to off, instead of null 



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109712 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Rainer Spittel
2d7b75d4cb BUGFIX: getItem didn't consider the PostgreSQL SQL syntax. Columns with Capital letters must be quoted. Added quotes to the where clause in getItem. I didn't added quotes to the baseTable because it causes PostgreSQL errors (tables can not be double quoted, just single quoted).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109591 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Andreas Piening
0226781e37 MINOR: neatly quote identifiers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109405 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Luke Hudson
4311966880 Revert "MINOR: Applied patch from walec51 for <% control %> on empty set (#5579) Also added unit tests by ischommer"
This was not supposed to be pushed out yet.

This reverts commit 9c2aafa414948314236674e31fd756797d695139.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109177 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:47 +13:00
Sean Harvey
0cbde73445 API CHANGE #5873 DataObjectSet::shift() now performs a proper shift instead of unshift (wrong). Please use DataObjectSet::unshift($item) if unshifting was intended!
API CHANGE Added DataObjectSet::pop()
MINOR Unit tests for DataObjectSet::shift(), DataObjectSet::unshift() and DataObjectSet::pop()


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109156 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Sean Harvey
9d33d6abaa MINOR Doc update for Director::forceSSL()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109152 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00
Luke Hudson
0e3bea57ce MINOR: Applied patch from walec51 for <% control %> on empty set (#5579) Also added unit tests by ischommer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109127 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:46 +13:00