Commit Graph

2046 Commits

Author SHA1 Message Date
Ingo Schommer
396f297acb API CHANGE Using i18n::validate_locale() in various Translatable methods to ensure the locale exists (as defined through i18n::$allowed_locales)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114470 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:28:24 +00:00
Ingo Schommer
17ac4753fd BUGFIX Check for valid locale in i18n::set_locale()/set_default_locale()/include_locale_file()/include_by_locale() (as defined in i18n::$allowed_locales). Implicitly sanitizes the data for usage in controllers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-03 00:27:41 +00:00
Ingo Schommer
640b504ebe BUGFIX Don't allow HTML formatting in RequestHandler->httpError() by sending "Content-Type: text/plain" response headers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114444 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-02 08:03:17 +00:00
Ingo Schommer
07b6d1870a 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
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114332 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-30 05:13:09 +00:00
Ingo Schommer
7be01d3d10 BUGFIX Fixed saving of files in IE6/IE7 in SS_HTTPRequest::send_file() by adding custom "Cache-Control" HTTP headers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:50 +00:00
Ingo Schommer
196cabb2f0 MINOR: unique indexes on versioned tables now changed to 'index'
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114134 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:49 +00:00
Ingo Schommer
f1bf0d0fc4 BUGFIX Aborting marking in Hierarchy->markPartialTree() before loading nodes, if the expected node count would exceed the totals (regardless of the in-memory marking state)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114133 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:48 +00:00
Ingo Schommer
b15019a95f 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)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114082 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-23 19:38:15 +00:00
Ingo Schommer
3725ab77a0 BUGFIX Removed double quoting of $where parameter in Translatable::get_existing_content_languages() (fixes #6203, thanks cloph)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-23 19:21:44 +00:00
Ingo Schommer
6ccd6d61bd MINOR Documentation for Aggregate caching
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114077 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-23 05:43:59 +00:00
Saophalkun Ponlu
efda708708 MINOR: Make sure that Translatable creates a translated parent of SiteTree only when the parent is not translated
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113955 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-19 02:49:41 +00:00
Geoff Munn
7d96dcd02b MINOR: dev/build message fixed to explain changes more clearly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113931 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-18 23:29:30 +00:00
Ingo Schommer
ab92919b27 ENHANCEMENT Allowing i18nTextCollector to discover entities in templates stored in themes/ directory (thanks nlou)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113918 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-18 19:00:13 +00:00
Ingo Schommer
854cbe79c8 API CHANGE Don't partially URI encode strings in SiteTree->RelativeLink(), rely on XML casting in templates instead (fixes #6125, thanks paradigmincarnate)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113694 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-13 02:54:13 +00:00
Geoff Munn
4215b2f434 ENHANCEMENT: full text search indexes now identified more clearly in dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113657 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-11 19:06:18 +00:00
Geoff Munn
92c7419767 BUGFIX: unique versioned indexes are now converted to standard indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@113299 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-01 02:58:43 +00:00
Sam Minnee
4665369e31 BUGFIX Renamed MySQLQuery::__destroy() renamed to __destruct() so that it is called properly after the object is destroyed (from r112288)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112950 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:08:59 +00:00
Sam Minnee
75101d329f MINOR Reverted regression in r112272 (from r112278)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112949 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:08:46 +00:00
Sam Minnee
2699eb3b5b 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 (from r112272)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112948 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:08:32 +00:00
Sam Minnee
bb183add33 BUGFIX #3910 Setting timezone parameter to MySQLDatabase::__construct() should use $this->query() to be consistent (from r111889)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:04:40 +00:00
Sam Minnee
e2cb7001ce 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" (from r111868)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112933 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:03:03 +00:00
Sam Minnee
429434811f 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 (from r111852)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112932 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:02:42 +00:00
Sam Minnee
4af7d7aa34 MINOR dev/build now shows database name and version next to "Building database ..." text (from r111851)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112931 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:02:02 +00:00
Sam Minnee
849bca4a3d 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 (from r111850)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112930 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:01:50 +00:00
Sam Minnee
5e0b978263 BUGFIX #6055 ErrorPage should always create static error page files when dev/build is called if they don't exist (from r111842)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112927 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 05:00:35 +00:00
Sam Minnee
8d5b417619 MINOR Fixed documentation in Datetime (fixes #6062, thanks nicolaas) (from r111787)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112921 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:53:11 +00:00
Sam Minnee
d328c7cc53 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 (from r111772)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:52:59 +00:00
Sam Minnee
c07e870b4d 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 (from r111255)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:49:13 +00:00
Sam Minnee
b573414486 MINOR Spelling corrections to Director comments (from r111123)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:47:11 +00:00
Sam Minnee
0200c75ca0 ENHANCEMENT #6023 Shorten SSViewer cached template path for readability of the filenames, and also so Windows doesn't break on long paths (from r111086)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112891 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:44:37 +00:00
Sam Minnee
ee9c2053b5 MINOR Documentation for constants in Core.php (from r111052)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112890 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:44:24 +00:00
Sam Minnee
abe50eb26a BUGFIX Unset $default_session when using Session::clear_all() (from r111049)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112887 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:41:46 +00:00
Sam Minnee
fa5db43d76 BUGFIX: Don't require a current controller for Session::get/set/etc to work. (from r111043)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:35:28 +00:00
Sam Minnee
bc7c91a1bf ENHACENEMENT: Change behaviour of the MenufestBuilder to use spl_autoload_register instead of traditional __autoload. (from r111038)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112870 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:06:40 +00:00
Sam Minnee
ffba082738 BUGFIX Fixed column names that were not quoted that broke PostgreSQL (from r110944)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112869 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:06:15 +00:00
Sam Minnee
4c0afd2564 BUGFIX Fixed double quotes around column names in Versioned::augmentDatabase() (from r110914)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112867 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:03:19 +00:00
Sam Minnee
0b2ed12c63 BUGFIX: delete orphaned records from versioned tables when updating. #5936 (from r110901)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112866 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:01:51 +00:00
Sam Minnee
2f9192dbf6 MINOR Avoid using ASP-style tags in SSViewer comments, it confuses PHP with asp_tags=ON (fixes #5976, thanks ezero) (from r110836)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112849 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:36:15 +00:00
Sam Minnee
995f1f4157 BUGFIX: ensure that pages can only be requested from staging and live (from r110759)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112845 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:32:39 +00:00
Sam Minnee
6f8baaa2c9 ENHANCEMENT #5977 Added optional argument to ClassInfo::getValidSubClasses() and removed harcoded SiteTree (from r110467)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112843 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:31:56 +00:00
Sam Minnee
9d72145ee1 MINOR Warning about install.php existing for root site tree node as well (SiteConfig form) (from r110440)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112841 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:31:07 +00:00
Sam Minnee
d0c9fe908a MINOR: added missing closing tag (from r110243)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112839 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:29:55 +00:00
Sam Minnee
32783ef0e8 MINOR Make dev/build not constantly show a changed index because of whitespace between VersionID and Version in the index spec (from r110205)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112837 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:29:25 +00:00
Sam Minnee
6e8bf5617a MINOR: only call next() in iterator validation on initialisation or after reset NOT if current value is invalid (from r110190)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112834 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:27:51 +00:00
Sam Minnee
0154fbae0f 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 (from r109712)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:25:50 +00:00
Sam Minnee
ac33763d05 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). (from r109591)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112827 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:25:32 +00:00
Sam Minnee
458f3b1197 MINOR: neatly quote identifiers (from r109405)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112826 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:25:19 +00:00
Sam Minnee
99fde26091 MINOR CSSContentParser::__construct() now gives a better error if the content could not be parsed. This will mostly happen if tidy isn't present. (from r109274)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:23:00 +00:00
Sam Minnee
496e9bcef6 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() (from r109156)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112817 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:20:56 +00:00
Sam Minnee
fcc20b5e1a BUGFIX Fixed ContentNegotiator to handle HTML and XHTML base tags properly when converting, regression from r108413 (from r108421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112815 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:20:07 +00:00