Commit Graph

87 Commits

Author SHA1 Message Date
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
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
e5a07227c2 ENHANCEMENT: Full-text search with double quotes returns too many results. ticket #5733. Thanks ktauber.
Using htmlentities($keywords,ENT_NOQUOTES) instead of proposed solution (from r108417)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:58:23 +00:00
Ingo Schommer
6bf8fad460 MINOR: force exclusive connection (from r107175)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112551 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:09:49 +00:00
Ingo Schommer
997a86b7e0 MINOR: return false rather than error out in case SS_Query:: is not a resource (from r107030)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112544 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:07:39 +00:00
Ingo Schommer
a0424ccd3e 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 (from r106938)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112543 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:07:22 +00:00
Sam Minnee
322a2da0dc BUGFIX Float should always be not null and default 0 in the database (from r102686)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:45:24 +00:00
Ingo Schommer
6f936bf10d API CHANGE: dbDataType function created (from r100651)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105616 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-05-25 04:21:21 +00:00
Ingo Schommer
a3b49b1566 MINOR: fixed typos in the comments (from r98201)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102625 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:28:13 +00:00
Ingo Schommer
1e20e55c68 MINOR don't HTML-format queries from showqueries if this is an AJAX request. (from r95855) (from r98097)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102589 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 02:06:24 +00:00
Ingo Schommer
7bd479156b MINOR Changed MySQLDatabase::now() block comment to be more useful (from r98059)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:53:25 +00:00
Ingo Schommer
a5dde231b6 API CHANGE Decimal now allows setting a default value properly
MINOR Unit tests for Decimal field type default value through new test class DecimalTest (from r98056)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102571 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:53:13 +00:00
Ingo Schommer
92a25a3e68 FEATURE: added support for MySQL data type SET used in MultiEnum FEATURE: added datetime helper functions (from r98041)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102568 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-13 01:49:40 +00:00
Ingo Schommer
731269988e MINOR PHP notice error (from r97838)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102539 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 23:43:52 +00:00
Ingo Schommer
2f0bc863e7 ENHANCEMENT: include menu title in default search. PATCH via lubzee #4508 (from r97028)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102423 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-12 03:33:29 +00:00
Sean Harvey
737701007a BUGFIX fixed reference to incorrect class (from r94061)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95583 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-12-16 05:35:15 +00:00
Sam Minnee
50831cba9a BUGFIX #2476: Rename lowercase tables to correct casing if they have been transferred from a windows box.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-31 00:38:38 +00:00
Sam Minnee
994e93f790 API CHANGE: replaced Database::USE_ANSI_SQL with DB::USE_ANSI_SQL
API CHANGE: replaced Database::alteration_message() with DB::alteration_message()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 22:03:29 +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
Andrew O'Neil
0b55bd5259 BUGFIX: Some places want tableList() to have lower case, some want native case - return both!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90047 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-23 02:15:37 +00:00
Geoff Munn
84ec644448 API CHANGE: support for advanced database options now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88296 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-08 01:22:06 +00:00
Geoff Munn
611af45993 API CHANGE: Transaction stubs created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87893 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-01 21:02:00 +00:00
Geoff Munn
a20818b529 ENHANCEMENT: Database specific version of RANDOM() created
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:05:23 +00:00
Julian Seidenberg
8b73690f23 ENHANCEMENT: Ticket #3910 - MySQL Time Zone support (alternative time zone to that of the website to which the server is set to)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85716 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-04 01:38:29 +00:00
Sam Minnee
e0e12aeb40 BUGFIX: Reverted some changes from r84163 because they broke cases where you have two fields of the same name on different subclasses.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84789 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 04:34:28 +00:00
Sam Minnee
07871f81e1 ENHANCMENT: Low-level performance improvements in database access.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84163 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-11 08:51:05 +00:00
Sam Minnee
3c47db80d8 BUGFIX: Fixed other parts of core in response to the changing of MySQLDatabase to not inherit from object.
BUGFIX: Restored SiteTree::canView() functionality.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84068 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 04:23:05 +00:00
Sam Minnee
be2fea38dd API CHANGE: Database and Query no longer inherit from Object, since they shouldn't be extended with Extensions.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84061 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-08 02:55:32 +00:00
Sam Minnee
e1fa960775 MINOR: Replaced mysql_escape_string() with mysql_real_escape_string()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81382 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-07-08 23:05:01 +00:00
Sam Minnee
43abccf15d MINOR: Bugfix to previous commit.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80233 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:36:01 +00:00
Sam Minnee
96250e0136 ENHANCEMENT: Added MySQLDatabase::set_connection_charset() so that utf8 data can be stored properly in the MySQL database.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 13:26:31 +00:00
Sam Minnee
86ccd8cb96 API CHANGE: Removed DB::getNextID(), which was deprecated some time ago
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-27 08:36:10 +00:00
Tom Rix
bfaa938897 BUGFIX fixing the build, making the code happier
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78497 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-05 04:37:45 +00:00
Tom Rix
d064eeb36b FEATURE Microsoft Sequel Server fulltext searching.
FEATURE sqlsrv_num_rows emulation (set $query->forceNumRows = true;)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-06-05 03:44:28 +00:00
Sean Harvey
5886d4578b BUGFIX Fixed undefined variables in MySQLDatabase::indexList()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77581 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 23:17:25 +00:00
Sam Minnee
86c7c2a3bd BUGFIX: Fixed engine selection option default, so that it works on windows.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77569 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 08:42:18 +00:00
Sam Minnee
9effc74de3 API CHANGE: Allow passing of temporary option to Database::createTable()
BUGFIX: Made Versioned's archive table functions (show deleted pages and show site at a particular date) db agnostic.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77551 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-21 05:08:11 +00:00
Ingo Schommer
336bce8bf8 ENHANCEMENT Added DataObject::$create_table_options to pass through special options to Database->requireTable(). Contains a keyed array by database driver. Example use is specifying different storage engines for MySQL: array('MySQLDatabase'=>'ENGINE=InnoDB')
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77160 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-19 03:55:14 +00:00
Sam Minnee
f7155ff580 API CHANGE: Database::tableList() no longer returns lowercase table names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76355 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 04:30:54 +00:00
Ingo Schommer
b12a00c391 MINOR phpdoc documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-22 22:59:14 +00:00
Geoff Munn
ec09946ae8 BUG FIX: modifyIndex function now present (was indexOrIndexAlt())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73231 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 19:56:11 +00:00
Ingo Schommer
a97ee0e97d MINOR Documentation about database indexes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72976 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-12 11:11:35 +00:00
Geoff Munn
fc4756ddcd BUG FIX: function now() now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72925 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:24:50 +00:00
Geoff Munn
586a1888ee BUG FIX: allTablesSQL function now included
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72924 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 22:00:01 +00:00
Geoff Munn
3201b4fd79 API CHANGE: addslashes function included for MySQL database
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72920 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:48:30 +00:00
Sean Harvey
87f9f13c3b BUGFIX Fixed duplicate function committed in r72468
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72673 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-09 04:54:31 +00:00
Geoff Munn
fed4d9b862 API CHANGE: Databases now support index types such as hash, btree (default) and rtree.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72468 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 21:54:33 +00:00
Sam Minnee
a581e748d9 ENHANCEMENT: Added dev/tests/cleanupdb action to remove test databases
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72463 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 07:31:23 +00:00
Andrew O'Neil
635e2c3df6 Merged from 2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72453 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-04 03:44:11 +00:00
Geoff Munn
57dcdaa8be API CHANGE: 'Year' datatype now uses abstracted array structure
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-17 03:54:10 +00:00