/[drupal]/contributions/modules/emfield/emfield.module
ViewVC logotype

Diff of /contributions/modules/emfield/emfield.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.12.4.45, Tue Oct 20 17:11:48 2009 UTC revision 1.12.4.46, Wed Nov 4 21:43:34 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: emfield.module,v 1.12.4.44 2009/10/05 19:05:10 aaron Exp $  // $Id: emfield.module,v 1.12.4.45 2009/10/20 17:11:48 aaron Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 146  function emfield_implement_types($cached Line 146  function emfield_implement_types($cached
146  function emfield_parse_embed($field, $embed = '', $module) {  function emfield_parse_embed($field, $embed = '', $module) {
147    $providers = emfield_allowed_providers($field, $module);    $providers = emfield_allowed_providers($field, $module);
148    foreach ($providers as $provider) {    foreach ($providers as $provider) {
149      $success = emfield_include_invoke($module, $provider->name, 'extract', $embed, $field);      $success = emfield_include_invoke($module, $provider->name, 'extract', trim($embed), $field);
150    
151      // We've been given an array of regex strings, so try to find a match.      // We've been given an array of regex strings, so try to find a match.
152      if (is_array($success)) {      if (is_array($success)) {
153        foreach ($success as $regex) {        foreach ($success as $regex) {
154          $matches = NULL;          $matches = NULL;
155          if (preg_match($regex, $embed, $matches)) {          if (preg_match($regex, trim($embed), $matches)) {
156            return array('provider' => $provider->name, 'value' => $matches[1]);            return array('provider' => $provider->name, 'value' => $matches[1]);
157          }          }
158        }        }

Legend:
Removed from v.1.12.4.45  
changed lines
  Added in v.1.12.4.46

  ViewVC Help
Powered by ViewVC 1.1.2