Commit Graph

34 Commits

Author SHA1 Message Date
Hamish Friedlander
80d4af6b6e
API Apply Framework\ORM Namespace to model 2016-06-29 10:02:32 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Christopher Darling
0c14bfc897 DOCS: FulltextSearchable code example 2016-03-15 11:49:12 +00:00
Damian Mooyman
27a8afe78b BUG Fix regressions in fulltextsearch 2015-10-15 16:33:32 +13:00
Damian Mooyman
eb069e605d Remove all redundant whitespace 2014-08-19 09:17:15 +12:00
Damian Mooyman
d8e9af8af8 API New Database abstraction layer. Ticket #7429
Database abstraction broken up into controller, connector, query builder, and schema manager, each independently configurable via YAML / Injector
Creation of new DBQueryGenerator for database specific generation of SQL
Support for parameterised queries, move of code base to use these over escaped conditions
Refactor of SQLQuery into separate query classes for each of INSERT UPDATE DELETE and SELECT
Support for PDO
Installation process upgraded to use new ORM
SS_DatabaseException created to handle database errors, maintaining details of raw sql and parameter details for user code designed interested in that data.
Renamed DB static methods to conform correctly to naming conventions (e.g. DB::getConn -> DB::get_conn)
3.2 upgrade docs
Performance Optimisation and simplification of code to use more concise API
API Ability for database adapters to register extensions to ConfigureFromEnv.php
2014-07-09 18:04:05 +12:00
Kirk Mayo
632884252b NEW: Updating out of date URLs in the framework source code and docs 2014-02-07 15:10:44 +13:00
Andrew O'Neil
fdea5321c7 APICHANGE: add_extension() is now called directly on the class, instead of on Object 2012-11-07 11:07:55 +13:00
Ingo Schommer
56f7ce1dcf Merge remote-tracking branch 'origin/3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	control/HTTPResponse.php
	model/Database.php
	model/MySQLDatabase.php
	model/SQLQuery.php
	view/Requirements.php
	view/SSViewer.php
2012-10-03 16:16:19 +02: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
Damian Mooyman
cd7ea01bd1 FIXED: Minor adjustment to order of file fulltext search fields. By matching the order of these index columns to the same as the fields on the table itself, this will prevent the unnecessary regeneration of fulltext indexes on some database connectors each dev/build, notably MS SQL Server. 2012-09-25 12:31:50 +12:00
Ingo Schommer
5df519c6b5 Removed SiteTree.MetaTitle and MetaKeywords usage 2012-09-21 11:31:24 +02:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Damian Mooyman
30e15d11a7 FIXED: Generation of tables with fulltext indexes now no longer incorrectly thinks that all fulltext indexes have changed.
ADDED: Test cases correctly checking for changes (and no changes) to the data model for both fields and indexes.
FIXED: References to indexes throughough the code that probably should have quoted field names. This prevents a lot of 'spam' during dev build. This includes an updated FulltextSearchable test case.
2012-09-11 12:53:08 +12:00
Hamish Friedlander
fa37c448a5 API Reverse config extra statics control flow
Config system used to provide an add_static_source method, which was intended for
use by Extensions to add statics. But extensions for a class arent initialised
until at least one instance of that class is created, so before that the
Config system didnt include values from extensions

This patch reverses the control flow, so that the Config system explictly asks
each Object for its additional config sources via the new method
get_extra_config_sources. This method returns an array that can contain
string names of classes and also raw associative arrays.

The developer visible change is that Extension#add_to_class has been
deprecated. Instead there is a new method, get_extra_config, which has
the same method signature but needs to guarantee that it doesnt
cause side effects. Additionally there is no need to call
parent::get_extra_config - this is handled automatically.
2012-08-23 09:29:13 +12:00
Marcus Nyeholt
82495f5a7e BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector

BUGFIX: Provide default constructor values for classes (fixes issues when used in 'singleton' scenario during dev/build in particular)

MINOR Clear out injector state when resetting db schema during tests (a follow on from changing singleton() calls to use the injector underneath)
2012-05-23 21:10:04 +10:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Sean Harvey
41433f1211 BUGFIX Fixing FulltextSearchable and Hierarchy to conform to the parent DataExtension for E_STRICT compliance. 2012-04-12 12:06:02 +12:00
Sean Harvey
ec02ab6f68 BUGFIX Fixed FulltextSearchable checking DB::getConn() unncessarily for
MySQL, as Database::requireTable() will only apply create_table_options
to the database adapter they're set for. Replace Object::add_static_var
usage (deprecated) with the new config system instead.
2012-03-25 20:38:29 +13:00
Sean Harvey
f63497d6f9 ENHANCEMENT Extension arguments are now passed through to add_to_class()
static function on Extension classes.
BUGFIX FulltextSearchable didn't pass through arguments, use now
available $args parameter with FulltextSearchable::add_to_class()
2012-03-12 16:14:47 +13:00
Ingo Schommer
719bb18db8 MINOR Added documentation about the new File.ShowInSearch property 2011-12-03 12:01:23 +01:00
Stig Lindqvist
260a9e230c BUGFIX Versioned returns error on singleton($className)->summaryFields()
This solves a bugfix when calling singleton($className)->summaryFields() and Versioned kicks back. It is needed to by the GridField functionality to get default columns to show.

This is due to DataExtension calls ClassName::extraStatics() when calling ::load_extra_statics() statically, we need to pass in class and extension.
2011-10-31 11:17:37 +13:00
Simon Welsh
28c97325a3 BUGFIX: Removes duplicate create_table_options that caused preg_match() to fail in PHP 5.2. 2011-10-29 17:12:02 +13:00
Will Rossiter
3c16af3aca Merge pull request #92 from simonwelsh/fulltextsearch-fix
BUGFIX fulltext fixes.
2011-10-28 21:00:42 -07:00
Simon Welsh
25602811f2 BUGFIX: FulltextSearchable::enable() needs to replace the static on the decorated class iff the database engine is for MySQL 2011-10-29 16:57:16 +13:00
Simon Welsh
82da8a0718 Only set the create_table_options value when enabling FulltextSearch 2011-10-29 15:24:06 +13:00
ajshort
3a1c2df4e7 API CHANGE: Renamed DataObjectDecorator to DataExtension.
API CHANGE: Renamed LeftAndMainDecorator to LeftAndMainExtension.
MINOR: Replaced all references to decorators with extension.
2011-04-26 11:01:38 +10:00
Ingo Schommer
0d39a888a1 MINOR Removed references to ContentController from documentatin 2011-03-29 18:20:14 +13:00
Ingo Schommer
a9b13509d2 MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
Paul Meyrick
dc36725869 MINOR Using BlankPage template in SecurityTest, BasicAuthTest to remove ContentController dependency
MINOR Checking for SiteTree class existence in Security, Translatable
MINOR Checking for ContentController existence in FulltextSearchable
MINOR Removed unnecessary ContentController tests from ObjectTest
MINOR Replaced CMS specific examples in PermissionCheckboxSetFieldTest, DataObjectTest
MINOR Changed SecurityTest to make assertions against Security/login rather than relying on redirection from admin/cms
2011-03-29 18:07:55 +13:00
Sam Minnee
6449e3a1a7 MINOR Added FulltextSearchable::get_searchable_classes() in order to introspect currently searchable classes, added FulltextSearchableTest, added documentation (from r111789)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112923 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 04:53:36 +00:00
Sam Minnee
dd1c02cd90 BUGFIX: Search didn't respect searchableClasses passed to FulltextSearchable::enable() (from r111464)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112905 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:54:51 +00:00
Sam Minnee
2948bc1c64 MINOR: Misc merges from branches/2.4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:53:12 +00:00
Sam Minnee
368033942c API CHANGE Changed MySQLFulltextSearchable class to FulltextSearchable (applies to all databases) (from r102012)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112056 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:26:51 +00:00