Or, more specifically, revert it to what it was before. If a story hasn't been published before, then on publish failure the publish status will be false and the publish date and first publishd date will be `undef`. If it *has* been published before, then the publish date will not be udpated. This has been an issue for a long time, so I'll backpatch all the way to 1.10.x. [#200 state:resolved]
It was a bit of a mess. Much of the code was unnecessary, dating from before 2.0 when it used Net::SFTP instead of Net::SSH2. As a result, the error handling was all wrong. While at it, remove the file name escaping, as with newer versions of Net::SSH2 at least (or perhaps newer versions of libssh2), it was leaving the backslashes in the file names on the destination server. So bump up the minimum version of Net::SSH2. For sanity, also add tests to make sure that Net::Util::Trans::SFTP and Net::Util::Trans::SFTP compile and have apprpropriate interfaces.
…l element type results when clicking the links for subsequent pages. Fixed by preventing the list() method of Bric::Biz::ElementType from modifying the parameter hash passed to it, as the modification was persisting in the list manager's state. Thanks to Aaron Fuleki for the report and for making the Denison available to diagnose the problem. Forward-ported from rev_1_10.
I tried for hours to reduce this to a simple regression, and failed. The problem is that, during the tests, sometimes MySQL doesn't consider a date with .00000 microseconds to be the same as without the .000000 when used in the first part of a BETWEEN query. No idea WTF that's about, so work around it by simply dropping the first date back a second in the tests.
…<list()> method of Bric::Biz::Asset::Business::Story, Bric::Biz::Asset::Business::Media, and Bric::Biz::Asset::Template now works as expected, returning the latest version of all stories regardless of their publish status, rather than no stories at all (Bug #1).
* Added `unescape_uri()` to Bric::Util::ApacheUtil. * Updated the various URI-processing methods in Bric::Util::Trans::FS to properly escape or unescape URIs as appropriate. * Wrote tests for the URI-processing methods in Bric::Util::Trans::FS. * Fixed `PREVIEW_LOCAL` block in Bric::Util::Burner to convert a URI to a directory with the improved `uri_to_dir()` method in Bric::Util::Trans::FS. * Updated the distribution movers (FS, FTP, and SFTP) to convert from URIs to file-system paths. Left WebDAV alone, since it should actually use URIs.
Fixed a bug in `find_or_create_alternate()` where an element type is passed with a different setting for its `top_level` attribute than is the value of the `top_level` attribute of the original image's element type. This caused problems because it looked for an existing image using the wrong URI. So I hacked in a workaround to fool the current image into using the alternat's element type when determining the URI, so that the URI should always be the same. I ran into this in production for The Tyee, where editors were trying to create non-fixed thumbnails for fixed images. This caused some pretty serious indigestion. The workaround is a bit of a hack, but it's clean and works well. I updated the test suite to replicate the issue before patching, so we do have a proper regression test for the issue.
I updated the docs for the new `mark_as_published()` method in `Bric::Biz::Asset::Business`, removing some invalid notes, adding some valid notes, and fixing some grammar nits. I also removed the call to `save()` at the end of the method, because no method should call `save()`; the user should always call it implicitly. I also changed the method so that it simply returns if the document is already marked as published, as there is no point in updating the publish date in this context. And finally, I added some tests for the new method.
Signed-off-by: David E. Wheeler <firstname.lastname@example.org>