[prev in list] [next in list] [prev in thread] [next in thread]
List: bricolage-commits
Subject: [Bricolage-Commits] Simple reorg.
From: David Wheeler <wheeler () users ! sourceforge ! net>
Date: 2003-07-30 20:28:23
[Download RAW message or body]
Log Message:
-----------
Simple reorg.
Modified Files:
--------------
/cvsroot/bricolage/bricolage/lib/Bric/App/Callback/Profile:
Media.pm
Story.pm
["wheeler-2003730202823-diff.txt" (wheeler-2003730202823-diff.txt)]
Index: Media.pm
===================================================================
RCS file: /cvsroot/bricolage/bricolage/lib/Bric/App/Callback/Profile/Media.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- Media.pm 25 Jul 2003 18:11:02 -0000 1.2
+++ Media.pm 30 Jul 2003 20:28:22 -0000 1.3
@@ -274,6 +274,21 @@
my @args = ('"' . $media->get_title . '"',
""$dname"");
add_msg($self->lang->maketext($msg, @args));
+
+ # HACK: Commit this checkin WHY?? Because Postgres does NOT like
+ # it when you insert and delete a record within the same
+ # transaction. This will be fixed in PostgreSQL 7.3. Be sure to
+ # start a new transaction!
+ Bric::Util::DBI::commit(1);
+ Bric::Util::DBI::begin(1);
+
+ # Use the desk callback to save on code duplication.
+ my $pub = Bric::App::Callback::Desk->new
+ ( ah => $self->ah,
+ apache_req => $self->apache_req,
+ request_args => { media_pup => { $media->get_id => $media } },
+ );
+ $pub->publish;
} else {
# Look up the selected desk.
my $desk = Bric::Biz::Workflow::Parts::Desk->lookup
@@ -305,25 +320,6 @@
add_msg($self->lang->maketext($msg, @args));
}
- # Publish the media asset, if necessary.
- if ($desk_id eq 'publish') {
- # HACK: Commit this checkin WHY?? Because Postgres does NOT like
- # it when you insert and delete a record within the same
- # transaction. This will be fixed in PostgreSQL 7.3. Be sure to
- # start a new transaction!
- Bric::Util::DBI::commit(1);
- Bric::Util::DBI::begin(1);
-
- # Use the desk callback to save on code duplication.
- my $pub = Bric::App::Callback::Desk->new(
- 'ah' => $self->ah,
- 'apache_req' => $self->apache_req,
- 'request_args' => {
- 'media_pub' => { $media->get_id => $media },
- },
- );
- $pub->publish();
- }
# Clear the state out and set redirect.
clear_state($widget);
set_redirect("/");
Index: Story.pm
===================================================================
RCS file: /cvsroot/bricolage/bricolage/lib/Bric/App/Callback/Profile/Story.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- Story.pm 25 Jul 2003 18:11:02 -0000 1.2
+++ Story.pm 30 Jul 2003 20:28:22 -0000 1.3
@@ -166,6 +166,22 @@
my @args = ('"' . $story->get_title . '"',
""$dname"");
add_msg($self->lang->maketext($msg, @args));
+
+ # HACK: Commit this checkin WHY?? Because Postgres does NOT like
+ # it when you insert and delete a record within the same
+ # transaction. This will be fixed in PostgreSQL 7.3. Be sure to
+ # start a new transaction!
+ Bric::Util::DBI::commit(1);
+ Bric::Util::DBI::begin(1);
+
+ # Use the desk callback to save on code duplication.
+ my $pub = Bric::App::Callback::Desk->new
+ ( ah => $self->ah,
+ apache_req => $self->apache_req,
+ request_args => { story_pub => { $story->get_id => $story } },
+ );
+ $pub->publish;
+
} else {
# Look up the selected desk.
my $desk = Bric::Biz::Workflow::Parts::Desk->lookup
@@ -197,25 +213,6 @@
add_msg($self->lang->maketext($msg, @args));
}
- # Publish the story, if necessary.
- if ($desk_id eq 'publish') {
- # HACK: Commit this checkin WHY?? Because Postgres does NOT like
- # it when you insert and delete a record within the same
- # transaction. This will be fixed in PostgreSQL 7.3. Be sure to
- # start a new transaction!
- Bric::Util::DBI::commit(1);
- Bric::Util::DBI::begin(1);
-
- # Use the desk callback to save on code duplication.
- my $pub = Bric::App::Callback::Desk->new(
- 'ah' => $self->ah,
- 'apache_req' => $self->apache_req,
- 'request_args' => {
- 'story_pub' => { $story->get_id => $story },
- },
- );
- $pub->publish();
- }
# Clear the state out and set redirect.
clear_state($widget);
set_redirect("/");
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Bricolage-Commits mailing list
Bricolage-Commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic