Commit Graph

128 Commits

Author SHA1 Message Date
Colin Richardson
b2934d7ebf FIX: exclude directory from available themes when underscore is first character
Change FALSE to lowercase
2013-05-23 16:49:35 +01:00
Ingo Schommer
3b02d22989 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	dev/CsvBulkLoader.php
2013-05-09 10:34:20 +02:00
Ingo Schommer
cef955c8b9 Removed stray ampersand in Requirements (fixes #1809)
Only happens with suffix_requirements=true
2013-04-30 00:35:25 +02:00
Zauberfisch
034f575003 MINOR: if no doctyle is set, include comments inside <html>
MINOR: if <html> tag is inside a html comment do not add a comment
2013-04-22 18:16:09 +00:00
Zauberfisch
94b37f9c85 MINOR: moved includeDebuggingComments logic into own method to allow separated tests 2013-04-22 14:12:43 +00:00
Zauberfisch
7c66e8e7a2 API: try to place source_file_comments after doctype instead of html 2013-04-22 13:53:20 +00:00
Sam Minnee
eb583c5f14 NEW: Added DataObject::getQueriedDatabaseFields() as faster alternative to toMap()
API: CompositeDBField::setValue() may be passed an object as its second argument, in addition to array.

These changes provide a 15% - 20% performance improvement, and as such justify an small API change in the 3.0 branch. It will likely affect anyone who has created their own composite fields, which is fortunately not all that common.
2013-04-21 13:39:11 +12:00
s-m
acf2ff8ce6 BUG: Fix for #1487
The parser could sometimes generate invalid code if the
source-file-comments were enabled, this moves the comments outside the
html-tag to circumvent these problems, update test as well.
2013-04-15 19:54:41 +02:00
s-m
29e6bd513c BUG: Allow empty else- and else_if-blocks
This fix allows empty else and else-if blocks to be processed, fixes #1660
2013-04-10 16:17:44 +02:00
s-m
6a95db0eff API: Support inequalities in templates
This adds support for <, <=, >, >= in templates
2013-04-08 17:07:39 +02:00
Ingo Schommer
7121fc3f85 FIX Config isolation in Director::test() 2013-04-07 23:59:10 +02:00
Ingo Schommer
828ac7fe4f API Replaced SSViewer.custom_theme with SSViewer.theme_enabled
Since we can't influence the setting of configuration values,
we also can't set/unset the 'custom_theme' value based on which
theme is set. This means the 'custom_theme' value goes stale,
and we can't rely on it e.g. in FilesystemPublisher.

The 'theme_enabled' toggle is a cleaner solution to the same problem,
since the 'custom_theme' was really just a way to remember the original
theme, while still disabling it. The toggle makes this more explicit,
but also requires users of the 'theme' setting to check for it.
2013-04-07 23:59:10 +02:00
s-m
14de34cb9b Sync template-parser files
The template-parser files were not in sync, there were some lines added
in SSTemplateParser.php from 3334eafcb1
and 0a9f3b75a9 , I readded those parts
into the SSTemplateParser-include-file and recreated the
SSTemplateParser.php to get to a synced state...
2013-04-05 19:12:54 +02:00
Ingo Schommer
0242686a7a Requirements acces to files with query strings (fixes #7735)
Originally authored by florian.thoma, tests added
by Ingo Schommer. Also removed query params from
file paths before calling mtime() on it.

See https://github.com/silverstripe/sapphire/pull/1023
2013-04-03 16:39:59 +02:00
Ingo Schommer
3334eafcb1 API Marked statics private, use Config API instead (#8317)
See "Static configuration properties are now immutable, you must use Config API." in the 3.1 change log for details.
2013-03-24 17:20:53 +01:00
Ingo Schommer
0a9f3b75a9 Fixed deprecated usage of <% control %> 2013-03-19 12:58:14 +01:00
Hamish Friedlander
743a186c32 API Make SSViewer#process return HTMLText not string
This means that you dont have to worry about casting it
as HTMLText again when using the result in a template or other context

However in some situations code might be assuming it can
check with is_string, in which case you now need to use instanceof HTMLText
2013-03-14 12:49:03 +13:00
Hamish Friedlander
9bd6dd9ade API Make default_cast Text and not HTMLText 2013-03-14 12:49:03 +13:00
Hamish Friedlander
d2650bbc44 NEW Disable shortcodes in $Layout and $Content in SSViewer 2013-03-14 12:49:03 +13:00
g4b0
2f16951634 BUG: ampersand escaping 2013-03-11 09:58:14 +01:00
miiihi
5af35a89ce ENHANCEMENT Allow multiline comments in SS3 templates 2013-03-07 18:45:07 +01:00
Hamish Friedlander
7efae6b95f Merge remote-tracking branch 'origin/3.0' into 3.1 2013-02-18 14:31:57 +13:00
Simon Welsh
be8482aa73 Merge pull request #1173 from ajshort/include-object-argument
BUG: Pass named include argument as objects.
2013-02-13 23:44:29 -08:00
ajshort
d3629be344 BUG: Pass named include argument as objects.
This means you can pass objects such as lists as named parameters, not
just strings.
2013-02-14 18:31:40 +11:00
Ingo Schommer
d969e29d00 API Require ADMIN for ?showtemplate=1 2013-02-12 23:26:04 +01:00
Ingo Schommer
b44720179c Merge pull request #1180 from mateusz/css-combining-media
API Add possibility to combine media-targeting stylesheets.
2013-02-12 14:13:45 -08:00
Mateusz Uzdowski
53feb3a5ae API Add possibility to combine media-targeting stylesheets. 2013-02-13 11:04:05 +13:00
ajshort
a4096ecc70 Add a self method to the SSViewer scope.
This returns the current object, and resets the scope.
2013-02-11 17:53:14 +11:00
Ingo Schommer
14a56c18e9 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	control/Director.php
2013-02-07 21:45:16 +01:00
Ingo Schommer
b381e9933d Include "media" attr for module customCSS() (fixes #8219) 2013-02-01 10:23:16 +01:00
Ingo Schommer
5f8115f4c7 BUGFIX Hard fallback to en_US.js in Requirements
Ideally we'll have region-less locales like en.js as fallbacks,
but for now this prevents the UI becoming non-operational
e.g. when both i18n::set_locale() and i18n::default_locale()
are set to 'en_NZ'.
2013-01-09 22:31:19 +01:00
Ingo Schommer
618a3d0314 Requirements acces to files with query strings (fixes #7735)
Originally authored by florian.thoma, tests added
by Ingo Schommer. Also removed query params from
file paths before calling mtime() on it.

See https://github.com/silverstripe/sapphire/pull/1023
2012-12-18 01:01:19 +01:00
Matt Lewis
af6eccea96 Fixing typo in Requirements allowing access to files requested with query strings 2012-12-18 00:53:54 +01:00
Simon Welsh
b0121b541c Add codesniffer that ensures indentation is with tabs. 2012-12-12 17:33:31 +13:00
Simon Welsh
fc5dd2994c Add codesniffer that ensures indentation is with tabs. 2012-12-12 00:12:11 +13:00
Ingo Schommer
d92258da8f Allow calling SSViewer_Scope on empty sets
Specifically fixes a bug where a SelectionGroup_Item
without a "child" field causes fatal errors.
2012-12-11 11:07:00 +01:00
Ingo Schommer
c55c7c33f8 Merge branch '3.0'
Conflicts:
	admin/code/CMSProfileController.php
	composer.json
	tests/model/DataObjectTest.php
2012-11-22 23:51:28 +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
Sean Harvey
6a868e79e1 Removing deprecated prototype/behaviour libraries 2012-11-16 11:37:56 +13:00
Sean Harvey
0d79897d4f Removing deprecated ArrayData::getArray()
Use ArrayData::toMap() instead
2012-11-15 14:43:15 +13:00
Sean Harvey
fbc6e3366b Merge branch '3.0' 2012-11-05 15:11:48 +13:00
Will Rossiter
dfd3455802 BUG Only include processed requirements at the top level. (Fixes #7847)
After each sub template was processed Requirements::includeInHTML() is included which appended requirements again.
2012-11-04 17:54:09 +13:00
Sean Harvey
f6a90467e4 Merge branch '3.0' 2012-10-15 10:10:01 +13:00
Sean Harvey
fca9831e66 Remove end php tag from TemplateIteratorProvider 2012-10-10 11:15:55 +13:00
Ingo Schommer
fb5e488103 Line length fixes 2012-10-03 18:11:31 +02: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
Simon Welsh
1e629f4585 Merge branch '3.0'
Conflicts:
	control/Cookie.php
	control/Director.php
	dev/Profiler.php
	view/Requirements.php
2012-09-21 14:56:56 +12:00
Ingo Schommer
e2f073f38a Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Sean Harvey
954eb60983 BUG If combined files can't be written, fallback instantly to uncombined 2012-09-20 14:01:45 +12:00