Changeset 1817

Show
Ignore:
Timestamp:
11/19/07 23:50:13 (6 years ago)
Author:
charsbar
Message:

lang/perl/Jipotter: profile image may be a local file; failed to load plugin properly when it was not found by find_plugins

Location:
lang/perl/Jipotter/trunk/lib/Jipotter
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Jipotter/trunk/lib/Jipotter/Plugin/Timelines/View.pm

    r1815 r1817  
    181181        cell { attr { class => 'LeftSide' }; 
    182182          a { attr { href => $entry->user_url }; 
     183            my $image_url = $entry->profile_img_url; 
     184            unless ( $image_url =~ /^http ) { 
     185              $image_url = "$base/$image_url"; 
     186            } 
    183187            img { attr { src => $entry->profile_img_url, width => 32, height => 32 } }; 
    184188            br {}; 
  • lang/perl/Jipotter/trunk/lib/Jipotter/Util.pm

    r1810 r1817  
    2727  unless ( $timelines ) { 
    2828    my $package = 'Jipotter::Plugin::Timelines'; 
    29     $timelines = Jifty->find_plugin($package); 
     29    $timelines  = Jifty->find_plugin($package); 
    3030    unless ( $timelines ) { 
    3131      $package->require; 
    32       $timelines = $package->new; 
     32      my @configs = @{ Jifty->config->framework('Plugins') || [] }; 
     33      foreach my $config ( @configs ) { 
     34        next unless $config->{$package}; 
     35        $timelines = $package->new(%{ $config->{$package} || {} }); 
     36        last; 
     37      } 
    3338    } 
    3439  }