Ignore:
Timestamp:
Dec 23, 2010, 9:46:16 PM (13 years ago)
Author:
rvelices
Message:
  • faster trigger_event/trigger_action (it was overly complicated)
  • added a new param to get_thumbnail_url event
  • get_thumbnail_location is called only if the thumbnail does not exist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r7495 r8263  
    736736function get_thumbnail_url($element_info)
    737737{
    738   $path = get_thumbnail_location($element_info);
    739   if ( !url_is_remote($path) )
    740   {
    741     $path = embellish_url(get_root_url().$path);
    742   }
    743 
     738  $loc = $url = get_thumbnail_location($element_info);
     739  if ( !url_is_remote($loc) )
     740  {
     741    $url = (get_root_url().$loc);
     742  }
    744743  // plugins want another url ?
    745   $path = trigger_event('get_thumbnail_url', $path, $element_info);
    746   return $path;
     744  $url = trigger_event('get_thumbnail_url', $url, $element_info, $loc);
     745  return embellish_url($url);
    747746}
    748747
     
    767766    $path = get_themeconf('mime_icon_dir')
    768767        .strtolower(get_extension($element_info['path'])).'.png';
    769   }
    770 
    771   // plugins want another location ?
    772   $path = trigger_event( 'get_thumbnail_location', $path, $element_info);
     768    // plugins want another location ?
     769    $path = trigger_event( 'get_thumbnail_location', $path, $element_info);
     770  }
    773771  return $path;
    774772}
Note: See TracChangeset for help on using the changeset viewer.