]> git.imager.perl.org - bse.git/blobdiff - site/cgi-bin/modules/BSE/TB/Image.pm
the image inline method now defaults the cfg parameter
[bse.git] / site / cgi-bin / modules / BSE / TB / Image.pm
index e3387bd52f393ecadff401c69146b866b6e1aa58..df29c05fe171095cc39ef7aa7e41ddcb20689a55 100644 (file)
@@ -8,7 +8,7 @@ use vars qw/@ISA/;
 @ISA = qw/Squirrel::Row BSE::ThumbCommon BSE::TB::TagOwner/;
 use Carp qw(confess);
 
-our $VERSION = "1.009";
+our $VERSION = "1.011";
 
 =head1 NAME
 
@@ -145,8 +145,7 @@ Returns HTML.
 sub inline {
   my ($self, %opts) = @_;
 
-  my $cfg = delete $opts{cfg}
-    or confess "Missing cfg parameter";
+  my $cfg = delete $opts{cfg} || BSE::Cfg->single;
 
   my $handler = $self->_handler_object($cfg);
 
@@ -283,8 +282,8 @@ sub article {
     return BSE::TB::Site->new;
   }
   else {
-    require Articles;
-    return Articles->getByPkey($self->articleId);
+    require BSE::TB::Articles;
+    return BSE::TB::Articles->getByPkey($self->articleId);
   }
 }