Commit Graph

76 Commits

Author SHA1 Message Date
Samuel Georges c0aa03a400 Create an error making trait
Widgets can throw fatal errors too
2017-06-11 22:38:03 +10:00
Samuel Georges 04f89dc5bb getToken -> token 2017-05-20 13:19:51 +10:00
Samuel Georges 7e76f39e6c Add app.name config
Various other refittings
2017-05-16 18:50:41 +10:00
Samuel Georges 015b34fe88 Block media manager entirely if user lacks access 2017-04-11 08:40:39 +10:00
Samuel Georges 5b5e23bfb8 Minor touch up from #2604 2017-01-26 11:30:26 +11:00
Samuel Georges 5e729f9978 Merge pull request #2604 from dubcanada/patch-1
If CMS module is loaded (and MediaManager exists) bind it
2017-01-26 11:27:56 +11:00
dubcanada 0a4390b4d9 If CMS module is loaded (and MediaManager exists) bind it
I am using OctoberCMS without the CMS module (removed from modules directory and turned off in cms.php) and I am getting an error in the backend regarding missing `MediaManager` class. I wrapped this in a class_exists to check that MediaManager exists before binding it.

Let me know your thoughts.
2017-01-10 13:45:59 -04:00
Samuel Georges 6af6ebe733 Added config backendForceSecure used to force HTTPS
Refs https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html
2016-12-17 10:16:02 +11:00
Samuel Georges 0a2b343047 Simplify system events
This pipes all event calls through a new EventEmitter trait, which substitutes the October Rain event emitter trait. The view event has been moved to this trait also.
Pass some variables by reference to allow multi-extension.
Fixes #2420
2016-12-10 09:02:06 +11:00
Samuel Georges 6173ff177b Typo in variable name 2016-11-02 08:58:07 +11:00
Samuel Georges 0aadcc6675 Merge paths and vars when calling widget handler
When an AJAX handler is called for a widget, the view paths and specified variables should be merged in to the controller. This sets the appropriate context:

1) Look at the widget first
2) Fall back to the controller

Fixes #2432
2016-11-02 08:50:15 +11:00
soulshockers e10c162667 Fixed calling dynamic methods for dynamically extended widgets. 2016-08-05 18:51:27 +03:00
Samuel Georges 78a4067564 Make logic more explicit
This tightens up the rules of 7baea87068
2016-07-23 15:50:48 +10:00
Samuel Georges 7baea87068 Allow AJAX handlers to pipe objects to Laravel
Treat non scalar, non array, non RedirectResponse, non null as a Laravel compatible response
This brings AJAX handlers in line with page cycles, which do the same thing if the response is not a string. However in AJAX we should treat any scalar as a "result", not just a string. For all else (where not null), let Laravel handle it as a custom response object -- could be a model for serialization, or anything compatible.
Importantly to note when a custom redirect is sent, October's workflow is completely wiped out, so any partial updates, redirects, etc. will not occur. This is a normal and fair expectation.
Fixes #1784
2016-07-23 11:57:15 +10:00
Samuel Georges e970d80443 Align AJAX logic: merge custom response last
This is to allow overriding the standard values
Refs #2209
2016-07-16 13:11:10 +10:00
Luke Towers b73811fefc Moves AJAX handler response handling
Fixes octobercms/october#2208
2016-07-13 09:51:18 -06:00
Samuel Georges e9be15cc15 Preferences -> Preference
Rename brandsetting config folder
2016-05-27 07:46:50 +10:00
Samuel Georges cdb35f5070 UserPreferences -> UserPreference
(Models should be singular)
2016-05-27 07:35:32 +10:00
Samuel Georges 6c081d9265 Combine editor preferences and backend preferences
Add backend timezone setting used for converting display dates
2016-04-23 05:31:05 +10:00
Pásztor Gábor 31457bd2ee Cleanup 2016-01-15 10:20:57 +01:00
Samuel Georges 2213c6f28c Fix string comparison function
Flush stray output on view errors
2016-01-02 16:13:30 +11:00
flynsarmy 98e1d0fe4d Add getPublicActions controller method 2015-09-07 14:17:09 +10:00
Samuel Georges 48b4a137fa Allow passing explicit content to hints 2015-07-25 09:34:47 +10:00
Samuel Georges d453f922dc Improve the hint API, add inset mode to loader 2015-07-25 09:23:34 +10:00
Samuel Georges fc490b18e9 Add actionUrl() helper to backend controller
Used for generating URLs to the current controller
2015-07-23 19:44:54 +10:00
Samuel Georges 606892143b Added new security config option cms.enableCsrfProtection 2015-07-04 09:31:28 +10:00
Samuel Georges f9c921a797 Adds getAjaxHandler() API to controllers
Fixes bug where update process fails midway
2015-06-30 08:56:53 +10:00
Samuel Georges d9dfa21372 Adds CSRF protection to the backend - Refs #105 2015-06-20 21:17:58 +10:00
Samuel Georges cd1d62d8d7 AJAX requests can only use the POST method 2015-06-20 20:18:58 +10:00
Samuel Georges 9ed73e0cba Updates for new symbolizePath API, requires latest rain lib code
Backend layouts can now be provided by plugins
2015-05-30 15:54:47 +10:00
alekseybobkov c1740c479c Media Manager: implemented insert link, insert image, and crop and insert features. Minor fixes in October core and third-party JS plugins. 2015-04-11 18:55:02 -07:00
Samuel Georges 77d3ab8b67 Finish basic theme utilities: properties, import/export, duplicate, delete 2015-03-16 19:00:39 +11:00
Samuel Georges 9b8e1ce3c1 Improve theme list to allow editing properties 2015-03-14 18:09:54 +11:00
Samuel Georges a3f3084924 Implement AjaxException 2015-03-03 18:41:09 +11:00
Samuel Georges 7b52e07b65 Overhaul exceptions, rename triggerapi display -> show 2015-02-16 21:16:43 +11:00
Samuel Georges 0a6e14f4d2 Popup control now supports several sizes via `data-size` attribute: giant, huge, large, small, tiny.
Fixes various bugs in RC version
2015-02-11 14:36:00 +11:00
Samuel Georges b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00
Samuel Georges e7b0c3ae2c Typo 2015-01-18 15:30:09 +11:00
Samuel Georges 47cd204686 Add event for backend, before running a controller 2015-01-18 15:23:19 +11:00
Samuel Georges 5bbb248ffa Minor 2015-01-18 14:49:09 +11:00
Samuel Georges eb8f4ec1a8 Removed generic permission "Manage settings", these should be more granular to the tool
Fixes #831 - Fixes dashboard redirect, add "Manage mail settings" permission
Fixes bug in Settings permissions, they now work!
2015-01-18 13:16:18 +11:00
Samuel Georges d3000ca51a Unify the handling of detailed exception messages 2014-12-16 12:21:55 +11:00
Sam Georges 38170d3101 Use popup loading indicator on relationcontroller behavior 2014-11-07 19:38:05 +11:00
Sam Georges c32ba4cbad Minor code clean 2014-11-04 17:41:48 +11:00
Sam Georges c83797231d Subsequent expressions are on a new line (see developer guide > PSR exceptions) 2014-11-01 12:00:45 +11:00
Sam Georges 23f6d75416 Peer review of #679 2014-10-19 10:58:18 +11:00
Stefan Talen 347dff7e75 Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/RelationController.php
	modules/backend/classes/WidgetManager.php
	modules/cms/classes/CmsCompoundObject.php
	modules/cms/twig/Extension.php
	modules/cms/twig/PlaceholderNode.php
	modules/cms/widgets/TemplateList.php
2014-10-18 11:07:17 +02:00
Stefan Talen 06890d711a Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/UserPreferencesModel.php
	modules/cms/classes/Controller.php
	modules/system/classes/CombineAssets.php
2014-10-16 18:44:18 +02:00
Sam Georges 9f5646d273 BackendSettings -> BrandSettings
pageTitle is now translated at the end of the line
Fixed unit tests so they pass
SettingsModels are now cached
2014-10-15 19:53:44 +11:00
Stefan Talen dcb292b246 Fixing incorrect brackets 2014-10-12 13:43:50 +02:00