Commit graph

16357 commits

Author SHA1 Message Date
Scott Walters
2cf986ff57 Back out $SIG{__DIE__}. Exposes far too many caught errors. Back to the
drawing board.
2011-05-22 23:54:01 -04:00
Scott Walters
cd66af7855 Warn the user if upgradeState is set but not current, and WebGUI::Middleware::Maintenance is going to block everything because of it. 2011-05-22 21:44:44 -04:00
Scott Walters
d6f66b0245 session->var is apparently deprecated. 2011-05-22 21:04:41 -04:00
Scott Walters
6a6fff613f Fixing the var() deprecation crutch. 2011-05-22 21:03:45 -04:00
Scott Walters
7687203a2f Author: kthakore <thakore.kartik@gmail.com>
Date:   Sun May 22 16:02:00 2011 -0400

    Fixed SQL statement for ?op=listUsers operation.
2011-05-22 18:12:20 -04:00
Scott Walters
f14f2e59c9 Failed calls to www_ methods generating stack traces when webgui.debug is on
is useful for developers; merely warning skips stack traces in
WebGUI::Middleware::StackTrace.  Make this an error.
2011-05-22 15:55:11 -04:00
Scott Walters
819cef2c17 $SIG{__DIE__} is a can of worms. Why doesn't try { } localize it...? 2011-05-22 15:36:40 -04:00
Scott Walters
096fe5ebaa Can't try possibily null data in an asset constructor any more, at least not without catching; this throws exceptions now. 2011-05-22 15:28:48 -04:00
Scott Walters
95def8a439 Perl run-time errors get kicked over to session->log->error, and
WebGUI::Middleware::StackTrace now intercepts errors as well as
fatals (since fatals are likely going away).
2011-05-22 15:25:10 -04:00
Colin Kuskie
f4bd6d3f2f Add the i18n alias to the default WebGUI configuration file. 2011-05-20 16:37:09 -07:00
Doug Bell
65752f2213 Merge pull request #12 from haarg/tt-asset-plugin
Adds an Asset plugin for Template Toolkit
2011-05-20 12:07:30 -07:00
Scott Walters
c011dda0af README and docs/install fixes. 2011-05-20 00:37:38 -04:00
Graham Knop
2a73f5ab63 fix undefined warnings 2011-05-19 19:25:13 -05:00
Doug Bell
258d939614 remove getValue for the third time maybe? 2011-05-19 19:23:51 -05:00
Doug Bell
af2abb7a42 fix outdated macros in conf.original 2011-05-19 13:20:56 -05:00
Doug Bell
e5012d3914 App::Cmd options are normalized to lower-case 2011-05-18 14:56:24 -05:00
Doug Bell
b1a527682d do not buffer command output 2011-05-18 14:12:23 -05:00
Doug Bell
72667d0bd1 add process() sub for FormBuilder 2011-05-17 17:30:49 -05:00
Graham Knop
d1f93b8f7c add Asset template plugin 2011-05-17 17:09:27 -05:00
Doug Bell
72d32d679d clarify returning from try/catch 2011-05-17 15:27:37 -05:00
Doug Bell
587d494501 add Template Toolkit plugins/extentions 2011-05-17 15:20:17 -05:00
Doug Bell
1f750691c0 allow assetName to be a normal, non-i18n string 2011-05-17 11:52:03 -05:00
Doug Bell
01b9d95259 fix RichEdit merge 2011-05-17 11:49:00 -05:00
Doug Bell
677ac978b6 Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8
Conflicts:
	lib/WebGUI.pm
	lib/WebGUI/Auth/WebGUI.pm
	sbin/findBrokenAssets.pl
	sbin/testEnvironment.pl
2011-05-13 18:20:52 -05:00
Doug Bell
277faae8a1 Merge commit 'v7.10.15' into 8
Conflicts:
	docs/gotcha.txt
	docs/previousVersion.sql
	docs/templates.txt
	lib/WebGUI.pm
	lib/WebGUI/Asset.pm
	lib/WebGUI/Asset/Event.pm
	lib/WebGUI/Asset/File.pm
	lib/WebGUI/Asset/MapPoint.pm
	lib/WebGUI/Asset/RichEdit.pm
	lib/WebGUI/Asset/Sku/Product.pm
	lib/WebGUI/Asset/Snippet.pm
	lib/WebGUI/Asset/Story.pm
	lib/WebGUI/Asset/Template.pm
	lib/WebGUI/Asset/Template/TemplateToolkit.pm
	lib/WebGUI/Asset/Wobject/Calendar.pm
	lib/WebGUI/Asset/Wobject/Carousel.pm
	lib/WebGUI/Asset/Wobject/Collaboration.pm
	lib/WebGUI/Asset/Wobject/Dashboard.pm
	lib/WebGUI/Asset/Wobject/DataForm.pm
	lib/WebGUI/Asset/Wobject/Folder.pm
	lib/WebGUI/Asset/Wobject/Map.pm
	lib/WebGUI/Asset/Wobject/Search.pm
	lib/WebGUI/Asset/Wobject/Shelf.pm
	lib/WebGUI/Asset/Wobject/StockData.pm
	lib/WebGUI/Asset/Wobject/StoryTopic.pm
	lib/WebGUI/Asset/Wobject/SyndicatedContent.pm
	lib/WebGUI/Asset/Wobject/Thingy.pm
	lib/WebGUI/Asset/Wobject/WeatherData.pm
	lib/WebGUI/AssetClipboard.pm
	lib/WebGUI/AssetCollateral/DataForm/Entry.pm
	lib/WebGUI/AssetExportHtml.pm
	lib/WebGUI/AssetLineage.pm
	lib/WebGUI/AssetMetaData.pm
	lib/WebGUI/AssetTrash.pm
	lib/WebGUI/AssetVersioning.pm
	lib/WebGUI/Auth.pm
	lib/WebGUI/Cache/CHI.pm
	lib/WebGUI/Content/AssetManager.pm
	lib/WebGUI/Fork/ProgressBar.pm
	lib/WebGUI/Form/JsonTable.pm
	lib/WebGUI/Form/TimeField.pm
	lib/WebGUI/Form/Zipcode.pm
	lib/WebGUI/Group.pm
	lib/WebGUI/International.pm
	lib/WebGUI/Macro/AssetProxy.pm
	lib/WebGUI/Macro/FileUrl.pm
	lib/WebGUI/Operation/SSO.pm
	lib/WebGUI/Operation/User.pm
	lib/WebGUI/Role/Asset/Subscribable.pm
	lib/WebGUI/Shop/Cart.pm
	lib/WebGUI/Shop/Transaction.pm
	lib/WebGUI/Shop/TransactionItem.pm
	lib/WebGUI/Test.pm
	lib/WebGUI/URL/Content.pm
	lib/WebGUI/URL/Uploads.pm
	lib/WebGUI/User.pm
	lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm
	lib/WebGUI/Workflow/Activity/SendNewsletters.pm
	lib/WebGUI/i18n/English/Asset.pm
	lib/WebGUI/i18n/English/WebGUI.pm
	sbin/installClass.pl
	sbin/rebuildLineage.pl
	sbin/search.pl
	sbin/testEnvironment.pl
	t/Asset/Asset.t
	t/Asset/AssetClipboard.t
	t/Asset/AssetLineage.t
	t/Asset/AssetMetaData.t
	t/Asset/Event.t
	t/Asset/File.t
	t/Asset/File/Image.t
	t/Asset/Post/notification.t
	t/Asset/Sku.t
	t/Asset/Story.t
	t/Asset/Template.t
	t/Asset/Wobject/Collaboration/templateVariables.t
	t/Asset/Wobject/Collaboration/unarchiveAll.t
	t/Asset/Wobject/Shelf.t
	t/Auth.t
	t/Macro/EditableToggle.t
	t/Macro/FilePump.t
	t/Shop/Cart.t
	t/Shop/Transaction.t
	t/Storage.t
	t/User.t
	t/Workflow.t
2011-05-13 18:15:11 -05:00
Scott Walters
7a994b59ce File assets should always give IO::File::WithPath objects to PSGI, instead of the current redirecting or streaming behavior. (#11688)
New API method:  WebGUI::Response::sendFile;  it, as appropriate, calls
setRedirect or setStreamedFile, depending on enableStreamingUploads config var.
setStreamedFile now kicks off the XSendfile process.
File.pm now uses this instead of trying to set both a redirect and a stream.
IO::File::WithPath blows up if a file doesn't exist so this raises an exception
now.
The http now no longer insist that '0' is not a valid filename to stream.
site.psgi, depending on enableStreamingUploads, enables either the Static
or XSendfile middleware.
2011-05-12 20:22:43 -04:00
Scott Walters
96bb194402 Change newByDynamicClass calls that creept in back to newById, except for the ones in doc/upgrade. Kinda important. 2011-05-11 16:26:32 -04:00
Scott Walters
57d2dbed56 WebGUI::Session::Http should go away (#11647)
Move logic out of WebGUI::Session::HTTP and into WebGUI::Session::Response /
::Request; deprecate more functions; change references in core to use
$session->response instead; fix tests that broke because of the change but
not one that merely generate the deprecated warning because I want to know
that the proxying of depricated methods is working.  These can be changed later.
2011-05-11 16:17:54 -04:00
Scott Walters
72bac90f93 Rework WebGUI::Test::getPage2 to be a wrapper around WebGUI::Test::Mechanize; this is still just
a crutch for converting tests, though really, it's enough shorter that it probably should live on.
getPage should be deprecated and replaced with getPage2 which should then be renamed.  Joy.
Anyway, WebGUI::Test::Mechanize had a bit of chicken-and-egg going on with not being able to
modify things in its session until after a request with a valid session cookie was made.
It's now more forgiving.
Reworked t/Asset/AssetExportHtml.t slightly to use getPage2 as it currently stands.
2011-05-11 15:26:32 -04:00
Scott Walters
d2c8670098 Introduce WebGUI::Test::getPage2, similar to WebGUI::Test::getPage, that makes
requests using Plack::Test and attempts to maintain getPage's API.
Change three tests in t/Asset/AssetExportHtml.t to use this instead.
Backstory:
Forthcoming WebGUI::Session::HTTP, ::Request, ::Responses mucking abouts broke
some tests that use WebGUI::Test::getPage; in the case of t/Asset/AssetExportHtml.t,
files were written correctly to disc but tests failed because it was comparing them
to undef, which it got back for the page, apparently because getPage bypasses the
logic that traps printing to a filehandle.
2011-05-11 13:58:20 -04:00
Scott Walters
2d31f7234a PSGI entry points (#11632) -- add a plackMiddleware section to the config file; modify share/site.psgi to load from it.
This is minimal in implementation right now in that there's no support for passing args, which would generally be objects
mixed with strings, to the middlewares being added, as would be necessary if the .psgi files were to be largely migrated
to the config files.  I agree that it's important that upgrade scripts be able to add middleware (probably custom ones
that know how to get the session from %$env) but I'm not convinced of the utility of moving much logic out of
share/site.psgi.
2011-05-10 14:40:06 -04:00
Scott Walters
dd6a297c06 make the admin view [Edit] controls right-click-able so I can continue to right-click-open-in-new-tab them. 2011-05-10 14:40:06 -04:00
Doug Bell
5cefff9f47 make RemoveOldCarts test more robust 2011-05-06 13:20:02 -05:00
Scott Walters
a4744e91fa Doug and Colin did the work of removing all use of Class::InsideOut so now we can celebrate. 2011-05-05 21:43:06 -04:00
Scott Walters
13a2c359e7 Get rid of the cargo culted code about sending a text reply if the browser didn't specify
that it understands HTML.  This interacts badly with Plack::Test and doesn't have much of
a point in real life anyway, and I accidentally sent the test up that dends on this being
gone without sending this too.  Argh.  If I could send up a coherent commit just once...
2011-05-05 21:42:38 -04:00
Doug Bell
6b0cd93e61 i'm not testing that imagemagick does it correctly... 2011-05-05 20:01:03 -05:00
Doug Bell
0693e33128 getEditForm is a FormBuilder and doesnt include csrfToken (added by www_edit) 2011-05-05 19:45:50 -05:00
Doug Bell
2e720d6899 getEditForm returns FormBuilder and csrfToken should be added by www_edit 2011-05-05 19:43:32 -05:00
Doug Bell
f33f4db65b admin mode is always on for admins 2011-05-05 19:36:55 -05:00
Doug Bell
bf75ed1615 we now cache the requested URL inside the session, fix it for tests 2011-05-05 19:35:49 -05:00
Doug Bell
61eff5be0c the default URL is /, not the empty string 2011-05-05 19:31:59 -05:00
Doug Bell
36923dc335 class is now className in www_add 2011-05-05 19:29:11 -05:00
Doug Bell
d7339c9ba8 class is now className in www_add 2011-05-05 19:28:29 -05:00
Doug Bell
18dd9a459d move export product tests and fix the export product helper 2011-05-05 19:27:22 -05:00
Doug Bell
140b5a546f move Shelf tests into AssetHelper tests (and fix the thing) 2011-05-05 18:51:42 -05:00
Doug Bell
a476f09e12 Shelf no longer has importProducts or exportProducts, they're AssetHelpers 2011-05-05 16:03:05 -05:00
Doug Bell
65f3f3546f class is now className when doing www_add 2011-05-05 15:56:54 -05:00
Doug Bell
6ae2862bb6 all template vars have "controls" now 2011-05-05 15:55:48 -05:00
Doug Bell
e34d1ad38c shortcut no longer overrides getToolbar, so stop testing it 2011-05-05 15:54:14 -05:00
Doug Bell
ef2727f6f5 update usedBy when redeeming subscription code 2011-05-05 15:52:22 -05:00