[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bricolage-commits
Subject:    [6100] Mark fixed this bug where nothing would ever publish if you
From:       slanning () bricolage ! cc
Date:       2004-12-15 18:27:44
Message-ID: 20041215182744.3632.qmail () x1 ! develooper ! com
[Download RAW message or body]

Revision: 6100
Author:   slanning
Date:     2004-12-15 10:27:42 -0800 (Wed, 15 Dec 2004)
ViewCVS:  http://viewsvn.bricolage.cc/?rev=6100&view=rev

Log Message:
-----------
Mark fixed this bug where nothing would ever publish if you had
PUBLISH_RELATED_ASSETS enabled in bricolage.conf.

Modified Files:
--------------
    bricolage/branches/rev_1_8/lib/Bric/App/Callback/Desk.pm
    bricolage/branches/rev_1_8/lib/Bric/Changes.pod



["r6100-slanning.diff" (r6100-slanning.diff)]

Modified: bricolage/branches/rev_1_8/lib/Bric/App/Callback/Desk.pm
===================================================================
--- bricolage/branches/rev_1_8/lib/Bric/App/Callback/Desk.pm	2004-12-15 18:15:06 UTC (rev 6099)
+++ bricolage/branches/rev_1_8/lib/Bric/App/Callback/Desk.pm	2004-12-15 18:27:42 UTC (rev 6100)
@@ -159,46 +159,46 @@
 
     my (@sids, @mids);
 
-    if (PUBLISH_RELATED_ASSETS) {
-        my %seen;
-        for ([story => \@stories, $story_pub],
-             [media => \@media, $media_pub]) {
-            my ($key, $objs, $pub_ids) = @$_;
-            # iterate through objects looking for related and stories
-            while (@$objs) {
-                my $doc = shift @$objs or next;
+    my %seen;
+    for ([story => \@stories, $story_pub],
+         [media => \@media, $media_pub]) {
+        my ($key, $objs, $pub_ids) = @$_;
+        # iterate through objects looking for related and stories
+        while (@$objs) {
+            my $doc = shift @$objs or next;
 
-                # haven't I seen you someplace before?
-                my $id = $doc->get_id;
-                next if exists $seen{"$key$id"};
-                $seen{"$key$id"} = 1;
+            # haven't I seen you someplace before?
+            my $id = $doc->get_id;
+            next if exists $seen{"$key$id"};
+            $seen{"$key$id"} = 1;
 
-                if ($doc->get_checked_out) {
-                    # Cannot publish checked-out assets.
-                    my $doc_disp_name = lc get_disp_name($key);
-                    add_msg("Cannot publish $doc_disp_name \"[_1]\" because it is"
-                            . " checked out.", $doc->get_name);
-                    delete $pub_ids->{$id};
-                    next;
-                }
+            if ($doc->get_checked_out) {
+                # Cannot publish checked-out assets.
+                my $doc_disp_name = lc get_disp_name($key);
+                add_msg("Cannot publish $doc_disp_name \"[_1]\" because it is"
+                          . " checked out.", $doc->get_name);
+                delete $pub_ids->{$id};
+                next;
+            }
 
-                unless (chk_authz($doc, PUBLISH, 1)) {
-                    my $doc_disp_name = lc get_disp_name($key);
-                    add_msg('You do not have permission to publish '
-                            . qq{$doc_disp_name "[_1]"}, $doc->get_name);
-                    next;
-                }
+            unless (chk_authz($doc, PUBLISH, 1)) {
+                my $doc_disp_name = lc get_disp_name($key);
+                add_msg('You do not have permission to publish '
+                          . qq{$doc_disp_name "[_1]"}, $doc->get_name);
+                next;
+            }
 
-                # Hang on to your hat!
-                if ($key eq 'story') {
-                    push @sids, $id;
-                } else {
-                    push @mids, $id;
-                }
+            # Hang on to your hat!
+            if ($key eq 'story') {
+                push @sids, $id;
+            } else {
+                push @mids, $id;
+            }
 
-                my %desks;
+            my %desks;
 
-                # Examine all the related objects.
+            # Examine all the related objects.
+            if (PUBLISH_RELATED_ASSETS) {
                 foreach my $rel ($doc->get_related_objects) {
                     # Skip assets whose current version has already been published.
                     next unless $rel->needs_publish;
@@ -215,7 +215,7 @@
                         # Cannot publish checked-out assets.
                         my $rel_disp_name = lc get_disp_name($rel->key_name);
                         add_msg("Cannot auto-publish related $rel_disp_name "
-                                . '"[_1]" because it is checked out.',
+                                  . '"[_1]" because it is checked out.',
                                 $rel->get_name);
                         next;
                     }
@@ -228,7 +228,7 @@
                         unless ($desk->can_publish) {
                             my $rel_disp_name = lc get_disp_name($rel->key_name);
                             add_msg("Cannot auto-publish related $rel_disp_name "
-                                    . '"[_1]" because it is not on a publish desk.',
+                                      . '"[_1]" because it is not on a publish desk.',
                                     $rel->get_name);
                             next;
                         }
@@ -238,7 +238,7 @@
                         # Permission denied!
                         my $rel_disp_name = lc get_disp_name($rel->key_name);
                         add_msg('You do not have permission to auto-publish '
-                                . qq{$rel_disp_name "[_1]"}, $rel->get_name);
+                                  . qq{$rel_disp_name "[_1]"}, $rel->get_name);
                         next;
                     }
 

Modified: bricolage/branches/rev_1_8/lib/Bric/Changes.pod
===================================================================
--- bricolage/branches/rev_1_8/lib/Bric/Changes.pod	2004-12-15 18:15:06 UTC (rev 6099)
+++ bricolage/branches/rev_1_8/lib/Bric/Changes.pod	2004-12-15 18:27:42 UTC (rev 6100)
@@ -56,6 +56,11 @@
 Toolkit is installed but its version number is less than 2.14. Reported by
 Adam Rinehart. [David]
 
+=item *
+
+Fixed a bug where nothing would ever publish if you had PUBLISH_RELATED_ASSETS
+enabled in bricolage.conf. [Mark]
+
 =back
 
 =head1 VERSION 1.8.3 (2004-11-09)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic