Commit graph

207 commits

Author SHA1 Message Date
Colin Kuskie
0eba64bc52 Session->Privilege is not design well to work in embedded applications
like the RTE because by default it uses the default user style from settings.
This renders a full page, when we really need a message.

I've added an argument to session->privilege->insufficient to use the
empty style and to use a different message with no embedded macros
to process for logging in.  I tested this on the RTE folder adder and
it works fine.  I duplicated this work in the Image add/edit save routine
as well.

Since privilege->insuffient didn't take arguments before, this preserves
the existing API, which is broken.
2007-01-26 05:45:56 +00:00
JT Smith
600118b40a - fix: Styles were printing double head block headers. 2007-01-07 17:38:24 +00:00
Colin Kuskie
0db2156374 Removed /x from ErrorHandler HTML reformatting since it doesn't use embedded whitespace or comments.
Fixed a typo in the Macro_r_printable where an ending bold tag was dropped.
Add some POD to Asset.pm talking about variables that are added when
processTemplate is called.
More ISA work in the Help system.
2006-11-28 19:20:04 +00:00
Colin Kuskie
a0d2326f9c Found and fixed a bug in ErrorHandler, canShowPerformanceIndicators.
It didn't work with CIDR format IP addresses.  I cannabilized the
code from canShowDebug and refactored it into its own method,
canShowBasedOnIP.  Both canShowDebug and canShowPerformanceIndicators call this.
Updated the docs for the debugIp setting to note that it's used for both
showDebug and showPerformanceIndicators.
Added about 20 more tests to ErrorHandler.t.  Only the two hard methods are
left, fatal (which closes the session at the end) and showDebug, which is
validating a ton of output.
2006-11-21 03:50:15 +00:00
Colin Kuskie
5e074e0939 canShowDebug checked for a literal string, 'text/html' in order to generate
the debug output.  When the default mimetype was changed to text/html; charset=UTF-8,
the literal check always failed.

There are probably a few more of these floating around.
2006-11-17 22:00:35 +00:00
Drake
e3350f05ef Couple of minor code cleanups in WebGUI::Session::DateTime. 2006-11-13 23:20:55 +00:00
JT Smith
4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00
Roy Johnson
0ce287c212 fix - Style templates now process metadata properties assigned to them 2006-11-07 16:42:41 +00:00
Doug Bell
e68f609850 WebGUI::Session::Scratch->delete now acts more like Perl's delete()fix: redirectAfterLogin wouldn't work if displayLogin called from WebGUI::Operation::execute 2006-11-07 08:13:23 +00:00
JT Smith
8b20bebc32 merging 7.1.4 changes 2006-11-03 21:29:57 +00:00
Doug Bell
3ab139e6cc fix: SQLReport no longer paginates or runs nested queries when downloading.Stow's warning when cache is disabled is now a debug message, since that's what debug messages are for. 2006-11-02 18:08:39 +00:00
JT Smith
67dfefff08 merging 7.1.3 changes 2006-10-31 23:34:55 +00:00
Doug Bell
2675784f14 Stow now warns if set() is called when cache is disabled 2006-10-30 21:02:15 +00:00
Colin Kuskie
75f159f71b A whole batch of Http test, and a pseudo Request test module to help.
Added accessors to Session/Http.pm, and wrote tests to back them all up.
2006-10-30 18:09:25 +00:00
Colin Kuskie
4ed1ffe3c7 Set default mime-type to include character encoding inside Session/Http.pm
Fix typo in pod in AddUserToGroup workflow.
2006-10-27 04:09:58 +00:00
Colin Kuskie
6ad527c4a9 Bulk tests for Session::Icon
Documented the disabled flag for moveDown and moveUp.  Only the EMS uses this in
the core as far as I can tell.
Optimized out 1 profile call in getBaseURL
2006-10-20 21:19:08 +00:00
Colin Kuskie
37aad09679 Clean up Session::Privilege code.
Add $! to errorHandler message in Session::Icon when toolbar dir cannot be opened.
Change i18n for default toolbar "Default" to be more self explanatory.
2006-10-19 23:19:22 +00:00
Colin Kuskie
acaa0a0e20 remove context sensitive behavior of getStatus and add an accessor instead 2006-10-16 15:58:47 +00:00
Colin Kuskie
defef0767d missed two places where getStatus is called in list context. fixed. 2006-10-16 15:50:03 +00:00
Colin Kuskie
ca7110249f Extend Session::Http::getStatus so that is will also return the
description when called in list context.
Build tests to verify that behavior, and the default settings
for code and description.
2006-10-15 05:23:32 +00:00
Colin Kuskie
eadb9ada36 Implemented the last few tests to give Session::Style 100% coverage.
There are still a few functional tests that need to be written, they're
codified as TODOs.

In Session/Style.pm, in all methods that have a send immediate option
(when sent=1), they no longer send and cache.  This prevents duplicate
heag tags from being generated if generateAdditionalHeadTags was
ever called twice.
2006-10-12 22:43:33 +00:00
Colin Kuskie
514c2263fc Added tests to cover userStyle.
fixed a bug in userStyle where it would not process data that was false.
process will do this, so I made userStyle do it as well by adding
in a definedness check on $output.
2006-10-12 04:53:43 +00:00
Colin Kuskie
01a09cbea9 Add tests for printableStyleTemplateId.
Found a fixed an infinite loop in WebGUI::Style::process

If an asset was requested to be printed who does not have a
printableStyleTemplateId then process would recurse back up the
lineage until it does find an asset with a printableStyleTemplateId.
Eventually, if none is found, it will find the Asset Root, whose
parent is itself, and it will loop forever.

I added code to jump out of the loop if it recurses back to the
assetRoot.
2006-10-12 04:06:13 +00:00
Colin Kuskie
7867ce3573 more POD docs for WebGUI::Session::Style->process that describe hierarchy if templates 2006-10-12 01:13:41 +00:00
Colin Kuskie
a86c34df84 Added 5 more tests for Style's process method, checking for meta tags
for default processing and for meta tags when cache busting is enabled.

Fixed a bug where the default meta tag Generator did not contain the
WebGUI version.

Added lots of POD to the Style module detailing how meta tags are
handled in various cases.
2006-10-11 04:15:21 +00:00
Colin Kuskie
b1bb5d0b58 Fix broken templateId in Session/Style/process when useEmptyStyle was
requested.  It used to be 6, but at somepoint in the 6.x cycle it
was changed to be PBtmpl0000000000000132 in the database.

Added tests that verify that it works correctly.
2006-10-11 00:32:42 +00:00
Colin Kuskie
6cf1afc6a7 Add more POD to Style.pm to document that sent is set to true after this method
is called.

Add tests to check personalStyleTemplate and sent inside process method.
2006-10-10 23:10:31 +00:00
Colin Kuskie
5920a6d482 10 more tests for methods in Session/Style.pm
Refactored generateAdditionalHeadTags to remove two loops.
2006-10-05 03:40:39 +00:00
Colin Kuskie
ff2344cdad Added comments to the POD in Var.pm that creating a Var object overwrites
the Session Id.  This is by design.

Added a check to Style.pm so that if no params are passed to setLink that
it won't die by trying to deref undef into a hashref.

First set of tests for Session/Style added.
2006-10-03 23:27:08 +00:00
Colin Kuskie
f5aaa2e996 Additional tests to cover WebGUI::Session::Scratch.
Found and fixed a but in Session/Scratch/deleteNameByValue.  It would
not delete any value that was false (0, '' or undef).  Added a defined-ness
check to make sure it will delete 0 or '', but undef is still not handled.
Added POD to say that this was the case.
2006-10-01 21:49:05 +00:00
Colin Kuskie
d995ff09fe Fixed a bug with WebGUI::Session::Url::page where, if preventProxyCache
was enabled a noCache param was always added to the URL.  In some
cases it would add 2 noCache params.

To fix this, I added a skipPreventProxyCache param to the gateway method,
and page just passes $pairs and $skipPreventProxyCache to gateway.

Added tests to Url.t to test gateway, page, makeAbsolute and urlize
to bring its coverage up to 100%.

Added tests to Stow.t to bring it's coverage up to 100% as well.
2006-09-30 17:23:44 +00:00
Colin Kuskie
b1a5c46fcb add 6 more tests for page and clean up the POD 2006-09-29 22:51:18 +00:00
Colin Kuskie
2d2b780ed6 More comments and POD for Session/Url.pm.
Tests for escape, unescape, extras methods.  Test code is big enough 
that I've added section delimiting comments.  This has helped make
the code a lot more readable.
2006-09-29 03:32:24 +00:00
Colin Kuskie
8174f9d2b4 More tests for WebGUI::Session::Url::getSiteUrl, which now has 100% test coverage.
Refactored getSiteUrl so it is very obvious as to how it works, replacing
code that was hard to cover.
2006-09-29 02:30:54 +00:00
Colin Kuskie
86a5cb9128 Fix the same problem with form params in getRequestedUrl as in
getRefererUrl and add tests to detect it.
2006-09-25 04:47:05 +00:00
Colin Kuskie
eea7b941c9 A few more tests to kick coverage up to 100 on WebGUI::Session::Setting
Convert it to use placeholders as well.
More WebGUI::Session::Url tests, and some bug fixes:
	getRefererUrl returned parameters and accepted weird methods that
	looked like http but weren't.
2006-09-25 03:49:25 +00:00
Colin Kuskie
00e37ae971 finalized Var test with 100% coverage 2006-09-23 02:49:37 +00:00
Colin Kuskie
56e78708a4 Add a comment to WebGUI::Session::Var::start that if no userSessionId is passed
that a new userSessionId will be created and that the current sessionId (the actual
session object's id) will be set to this new id.
Add several new tests to Session/Var.t  Tried hard to exploit the change in 
sessionId and haven't found a way, yet.
2006-09-22 03:44:34 +00:00
Drake
a170904340 Add support for browser-session cookies, using a cookieTTL value of
"session".
2006-09-21 18:42:41 +00:00
Colin Kuskie
381ce45c1a Add 7 tests to Session/Var.t. Some of them are redundant. That will
be fixed later.
Added lots of comments to start and new subs.  Changed db methods to
use placeholders.  Changed timely data to call time once so that they
all match.
2006-09-21 03:06:04 +00:00
Drake
08858c20c3 Revert erroneously-included hunk in previous commit. 2006-09-21 00:50:14 +00:00
Drake
1ad3f6e3b3 Make DBI connect errors not infinitely recurse. 2006-09-21 00:25:01 +00:00
JT Smith
90cb569bb5 - fix: deleting workflows did not delete related instances and crons
- Added a "run" link to the scheduler and the running workflows listings to
   aid in debugging workflow errors.
 - fix: profile fields not validated by WebGUI::User
2006-09-15 06:08:30 +00:00
Colin Kuskie
66d98f371c Update some POD in Stow and PageTitle.
Fix several tests with bad coverage.
2006-09-14 15:54:54 +00:00
Roy Johnson
aac1df8dfb fix - makePrintable operation with other styleId 2006-09-07 18:17:32 +00:00
JT Smith
35db285a67 - rfe: Workflow activity for assigning users to a group
- The prevent proxy cache setting also now sets anti-caching meta tags and
   HTTP headers.
2006-08-16 22:04:59 +00:00
Colin Kuskie
b3678c6795 fix bad minute spec in Session/DateTime/epochToHttp. Add tests to cover 2006-08-09 20:06:19 +00:00
JT Smith
c956ba3969 - Added an option to override the session cookie domain.
- fix: Search results not showing synopses
 - fix: Redirects get displayed inside page layouts as '0'
 - fix: Mysterious "0" Appearing When Admin Is Off
 - fix: Deletion of Products
2006-08-08 17:27:41 +00:00
JT Smith
03b4b0ed33 - fix: Head Block in styles
- fix: select assetVersionTag
 - fix: Infinite recursion
 - fix: assetUiLevel override broken
 - fix: Indexing files failes (derck)
 - fix: Unable to approve New listings on Matrix
2006-07-25 17:15:57 +00:00
Colin Kuskie
5dbd9b44c9 Fixed a typo in the POD for Session/Env.pm
Added more docs for find method in Group.pm
Fixed a latent bug that would probably never occur in Macro/GroupAdd.pm
If Group->find is called with the name of a group that doesn't exist,
then Group will return an object with defaults, and the guid of the
group is undef, not ''.  However, since by default autoAdd is off,
the Macro will still do the right thing.
GroupDelete has the same bug, but it shouldn't be patched until there's
a test written for it.
2006-07-24 05:08:17 +00:00