Commit Graph

9960 Commits

Author SHA1 Message Date
Sam Minnée
b618909220 Merge pull request #1007 from simonwelsh/indent-sniff
Add codesniffer that ensures indentation is with tabs
2012-12-11 20:46:47 -08:00
Marcus Nyeholt
4f63f91cc8 BUG Fixed issue with convertServiceProperty
Fixed issue where convertServiceProperty is called when creating objects
with user-supplied constructor arguments, so that it's only called when
creating objects using injector configuration. This reduces the overhead
of unnecessary calls to convertServiceProperty.

Updated test cases to validate behaviour
2012-12-12 15:22:23 +11:00
Ingo Schommer
e8fbfc0bd1 NEW FixtureFactory separated out from YamlFixture
Enables more generic use of the fixture facilities
without dependency on the YAML format, for example
when creating fixtures from Behat step definitions.

Note: The YamlFixture class needs to be created via
Injector::inst()->create('YamlFixture') now,
direct instantiation is no longer supported.
2012-12-11 17:06:27 +01:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Sean Harvey
0f8b229d6b Modify Composer install path in docs
Composer examples at http://getcomposer.org/doc/00-intro.md use
/usr/local/bin for installing Composer globally, so let's use that
path as well instead of /usr/bin.
2012-12-11 15:43:30 +13:00
stojg
efa9ff9b08 API: Queries added by DataList::addInnerJoin() and DataList::leftJoin() come after the base joins, not before.
This bug will surface when using the ORM and adding an join to DataList
where a DataObject inherits another DataObject.

If you for example want to restrict the number of pages that only have a
related Staff object:

    $list = DataList::create('Page')
		->InnerJoin('Staff', '"Staff"."ID" = "Page"."StaffID");

This will create a SQL query where the INNER JOIN is before the
LEFT JOIN of Page and SiteTree in the resulting SQL string. In MySQL
and PostgreSQL this will create an invalid query.

This patch solves the problem by sorting the joins.
2012-12-11 11:04:29 +13:00
Ingo Schommer
1e0b0e7f56 More flexible Behat steps for HTML fields 2012-12-10 15:39:20 +01:00
Ingo Schommer
b15b5cd115 Ability to replace entire content in HTMLEditorField JS API 2012-12-10 15:39:15 +01:00
Ingo Schommer
3c0bd405a1 Removed @stable workarounds from composer docs
No longer necessary since we only add the @stable markers
for release tags, and remove them for release branches again.
2012-12-07 00:41:03 +01:00
Simon Welsh
aadefbb641 Sort lists that check ordering of results
These tests would randomly fail, mostly on Postgres, as the result
is an unordered set, not the ordered set expected.
2012-12-07 08:45:52 +13:00
Simon Welsh
5ca000d0a5 Correct routing rule block indentation 2012-12-07 08:15:53 +13:00
Ingo Schommer
f78f1cb254 Merge pull request #998 from drzax/validation-exception-bugfix
BUGFIX Make sure a message is set on ValidationException objects.
2012-12-06 05:52:34 -08:00
Ingo Schommer
9152387c92 Fixed GridField button alignment (regression from a9cbea34)
The text-indent: 9999px was relying on text-align: right to function. Because it was left-aligned, text showed below the icon graphic.
The width of the button column was constrainted to 40px,
which first of all didn't fit the two icons properly,
but also made the big assumption that we never have more than two.
The new width: auto setting means that the column might be a bit
longer than desired, but at least it doesn't cut off icons
or wrap them into multiple lines unnecessarily.

Thanks to ARNHOE for starting this patch.
2012-12-06 14:50:27 +01:00
Simon Elvery
205ee42110 BUGFIX Make sure a message is set on ValidationException objects. 2012-12-05 12:18:36 +10:00
Ingo Schommer
ab260d4913 Upgraded jQuery UI from 1.9.1 to 1.9.2 (fixes #8062) 2012-12-04 16:05:48 +01:00
Ingo Schommer
0be51a9321 BUG Fix ModelAdmin search (fixes #8052)
Broken by jQuery UI ajax behaviour in tabs, which compares
URLs to determine if the tab needs to be loaded via ajax.
This was always a brittle solution, and now broke alongside
our upgrade to jQuery UI 1.9 (specifically, with 2657a275).

The ajax behaviour is now globally disabled in favour of
having '.cms-panel-link' behaviour on the tabs, which
was already in place.
2012-12-04 14:28:36 +01:00
Ingo Schommer
0eab45392e Merge pull request #962 from chillu/pulls/buildtools
Updated docs to fit new 'buildtools' workflow
2012-12-04 01:24:35 -08:00
Ingo Schommer
4a0099e049 Merge pull request #995 from nyeholt/tab_hashlink_bug
BUG Rewrite hashlinks failing on empty a tags
2012-12-04 00:50:10 -08:00
Will Rossiter
100ad658db Email doc formatting
Workaround markdown parser throwing a fit with code straight after list.
2012-12-04 20:00:09 +13:00
Will Rossiter
bf67679155 Fix typo in email docs. 2012-12-04 19:56:36 +13:00
Will Rossiter
4cb81dafdf Fix typo with setTemplate() rss docs. 2012-12-04 19:54:26 +13:00
Marcus Nyeholt
1a4b245e84 BUG Fix rewriteHashlinks in TabSet
As per commit 3478813, check for presence of href before matching
2012-12-04 16:00:40 +11:00
Marcus Nyeholt
34788130ef BUG Rewrite hashlinks failing on empty a tags
Check for presence of href in _a_ tags before trying to .match them to
prevent null pointer errors.

Some external JS libs (eg tag-it) use <ul><a> structures which get matched
and break

(fixes regression introduced by ff39f9ad38)
2012-12-04 15:47:14 +11:00
Sean Harvey
449cce95a7 Fixing .htaccess to ignore rewriting PHP files directly 2012-12-04 14:36:59 +13:00
Simon Welsh
9106e41498 Fix related to ModelAdmin links 2012-12-01 11:57:07 +13:00
Ingo Schommer
3f67404a8a Revert "BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential."
This reverts commit b6017a7c90.
It breaks SelectionGroup, and its most prominent usage,
the "add page" dialog.
2012-11-30 14:24:03 +01:00
Ingo Schommer
78015ea3cf Merge pull request #985 from ARNHOE/3.0
SummaryFields doesn't change Title of Field
2012-11-30 01:01:55 -08:00
ARNHOE
8590bec1a9 SummaryFields doesn't change Title of Field
$field_labels does for me.
2012-11-30 09:53:01 +01:00
Will Rossiter
69dffd9b86 Merge pull request #982 from zoao/3.0
More fluent API.
2012-11-29 20:06:01 -08:00
João Martins
cc3e500f82 return $this, for do things like this: new DropdownField('XPTOName', 'XPTO Label', XPTOModel::get()->map("ID", "Name")->unshift(0,'- Select -'))
This does not break anything and makes things more natural
2012-11-30 01:37:36 +00:00
Ingo Schommer
7db1d619e8 Merge pull request #981 from ARNHOE/3.0
MINOR: Forgot Apostrophe in comment
2012-11-29 03:17:17 -08:00
ARNHOE
47f5235f94 MINOR: Forgot Apostrophe in comment 2012-11-29 12:12:26 +01:00
Ingo Schommer
9e44672433 Using $TRAVIS_BRANCH again, since its now available on travis-ci.org 2012-11-28 16:35:29 +01:00
Simon Welsh
7935c14e39 Merge pull request #975 from kopymark/patch-1
Add limit() details to datamodel.md
2012-11-27 00:01:50 -08:00
Adam Judd
2d8b7daaf9 Add limit() details to datamodel.md 2012-11-26 23:59:31 -08:00
Sam Minnée
270f6b2d77 Merge pull request #973 from silverstripe-rebelalliance/docs/composer
DOC Update composer docs with changes from 3.0.3
2012-11-25 19:36:43 -08:00
Hamish Friedlander
40fd5abb57 DOC Update composer docs with changes from 3.0.3 2012-11-26 16:29:20 +13:00
Sean Harvey
220d317f27 Upgrading TinyMCE dependency from 3.5.7 to 3.5.8
This also fixes 78ab9d3bf6 which strips HTML data attributes
from the editor contents.

See changelog here:
http://www.tinymce.com/develop/changelog/index.php?type=tinymce
2012-11-26 15:13:48 +13:00
Hamish Friedlander
e934030bc1 Merge changes for 3.0.3 release into 3.0 2012-11-26 11:34:28 +13:00
Hamish Friedlander
77f7778b4a Add 3.0.3 changelog 2012-11-26 11:20:21 +13:00
UndefinedOffset
4310718b94 BUG Insert Media, inserts all previous media (fixes #7545) 2012-11-23 17:37:39 +01:00
Ingo Schommer
aa72425e84 Fixed PHPUnit assertions for incomplete tests in core
Avoid PHPUnit throwing "test didn't run any assertions"
notices in PHP. If nothing else, it keeps test output
looking less broken by default, making it more likely
that actual errors do get noticed.
2012-11-23 15:16:39 +01:00
Ingo Schommer
453d04e4ba BUG Reset DataObject caches in SapphireTest->resetDBSchema()
This became a problem with fdcd7a2e where $custom_database_fields
were cached, but never reset. It lead to extensions not applying
correctly in SapphireTest->setUpOnce().
2012-11-23 11:14:02 +01:00
Ingo Schommer
a3cd7ddc09 BUG Force SapphireTest schema reset for extension changes
Previously changes to $requiredExtensions and $illegalExtensions
didn't cause a reset unless there was also other schema-altering
settings like $extensionsToRemove or $extraDataObjects
2012-11-23 11:12:03 +01:00
Ingo Schommer
96acd50681 Update composer contributing instructions 2012-11-22 15:10:10 +01:00
Sam Minnee
ecd921cc0a Fixed glitches in the sample composer.json shown in the docs 2012-11-22 17:03:11 +13:00
Ingo Schommer
7c3ce86bbb Updated docs to fit new 'buildtools' workflow 2012-11-21 16:15:48 +01:00
Mateusz Uzdowski
2657a27573 BUG Adjust the handler to jQuery UI 1.9 API change.
Settings.url no longer contains the URL, as a result navigating around
tabs in IE (browsers that do not support History API) becomes broken.

For example when the admin is opened on "Pages" section it is impossible to
navigate to specific page, or if the admin is opened on a tab, it's not
possible to navigate to another tab.
2012-11-21 11:02:51 +01:00
Sander van Dragt
8f89aa9171 BUG only call filemtime if file exists
Added file_exists check before calling filemtime as this results in
'filemtime(): stat failed'
2012-11-21 13:11:53 +13:00
Ingo Schommer
df4fde3864 Pjax docs 2012-11-18 23:48:43 +01:00