Commit Graph

1265 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
730725fe86 BUGFIX SiteTree decorated canView() checks not being passed through to SiteTree::canView()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109082 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Sean Harvey
34a4aa5b00 BUGFIX StringField::setNullifyEmpty() should assign the given value boolean, not evaluate whether it's true or not
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109081 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:45 +13:00
Andreas Piening
4659068c3f MINOR: remove SQL table alias keyword AS
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108961 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:44 +13:00
Sean Harvey
7725426327 ENHANCEMENT #3828 500 server error page is created by default on dev/build
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108644 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:44 +13:00
Will Rossiter
de5462c9ef MINOR: allow $icon to be overridden on ErrorPages. PATCH via martljn (#5875).
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:44 +13:00
Ingo Schommer
0d042e9a06 MINOR Making "todo" tab title translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108441 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:43 +13:00
Ingo Schommer
92ab004781 ENHANCEMENT Added argument to SQLQuery->leftJoin()/innerJoin() (#5802, thanks stojg)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108418 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Carlos Barberis
fa65f5edce ENHANCEMENT: Full-text search with double quotes returns too many results. ticket #5733. Thanks ktauber.
Using htmlentities($keywords,ENT_NOQUOTES) instead of proposed solution


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108417 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Sean Harvey
52f1d1b17d BUGFIX Undefined variable when calling DataObject::many_many_extraFields() and relation name couldn't be found for the component
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Carlos Barberis
900d4ea23a BUGFIX: DataObjects without the Versioned decorator cannot have a "Version" field. ticket #5775. Thanks ajshort
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108399 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Sam Minnee
cc1584cf12 ENHANCEMENT: Show a warning inside the the CMS if you've neglected to delete install.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108024 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:39 +13:00
Sean Harvey
7fc3d8bd09 MINOR Reverted r107831
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107838 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:38 +13:00
Sean Harvey
cf4be93f87 BUGFIX dev/build always reporting index change because of a whitespace in the index column names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107831 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:38 +13:00
Ingo Schommer
b20f1fd59d BUGFIX Remove dummy entry created by Versioned if record is first written to Live stage (fixes #5596, thanks muzdowski)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107537 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:37 +13:00
Carlos Barberis
e344eb0dcc MINOR: Fixed Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107430 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
4833ecbfd0 ENHANCEMENT: Added documentation and changed static names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107429 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Carlos Barberis
30b4699734 ENHANCEMENT: Added static to set regeneration of default pages (ticket #5633)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107426 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Will Rossiter
7e30018e8d BUGFIX: Only highlight strings more than 2 characters long. #4949
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Ingo Schommer
8dee93b523 BUGFIX Allowing dev/build in "live" mode when Security::database_is_ready() returns FALSE (typically happens when an existing SilverStripe project is upgraded and database columns in Member/Permission/Group have been added) (fixes #4957)
MINOR Using Object::create() in DevelopmentAdmin to make objects mockable
ENHANCEMENT Added Security::$force_database_is_ready to mock database_is_ready() state
ENHANCEMENT Added permission check exception in TaskRunner and DatabaseAdmin if SapphireTest::is_running_test() returns TRUE (necessary for DevelopmentAdminTest)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107415 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:36 +13:00
Ingo Schommer
423a526c8d MINOR Documentation in DataObjectSet
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107400 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:35 +13:00
Ingo Schommer
7e65d3c5af MINOR Documentation in File and Folder class
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107265 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Will Rossiter
d5ae174e95 MINOR: updated generator tag URL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107214 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Andreas Piening
58e7936004 MINOR: force exclusive connection
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107175 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Andreas Piening
7be9ca0c7e MINOR: return false rather than error out in case SS_Query:: is not a resource
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107030 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Andreas Piening
b5ad10bff1 MINOR: mysql_fetch_row() expects resource, this will fatal if query was e.g. UPDATE when iterating a result because MySQLQuery::nextRecord() is used by Iterator::valid() and MySQLQuery:: is bool in this case
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106938 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:33 +13:00
Ingo Schommer
422d654dae BUGFIX Re-enabling theme in ErrorPage->doPublish() (it's usually disabled in the publication context through LeftAndMain->init())
MINOR Reverted r88633, it breaks <base> tag in static HTML for ErrorPage->doPublish()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@106777 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:32 +13:00