/[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.21.2.6, Mon Aug 24 20:26:58 2009 UTC revision 1.21.2.7, Wed Nov 4 21:47:28 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: emfield.module,v 1.21.2.5 2009/05/29 01:10:28 aaron Exp $  // $Id: emfield.module,v 1.21.2.6 2009/08/24 20:26:58 aaron Exp $
3    
4  /**  /**
5   * Implement hook_menu   * Implement hook_menu
# Line 270  function emfield_parse_embed($field, $em Line 270  function emfield_parse_embed($field, $em
270  //     $module = $field['widget']['helper_module'];  //     $module = $field['widget']['helper_module'];
271      $providers = emfield_allowed_providers($field, $module);      $providers = emfield_allowed_providers($field, $module);
272      foreach ($providers as $provider) {      foreach ($providers as $provider) {
273        $success = emfield_include_invoke($module, $provider->name, 'extract', $embed, $field);        $success = emfield_include_invoke($module, $provider->name, 'extract', trim($embed), $field);
274        // we've been given an array of regex strings, so let's see if we can find a match        // we've been given an array of regex strings, so let's see if we can find a match
275        if (is_array($success)) {        if (is_array($success)) {
276          foreach ($success as $regex) {          foreach ($success as $regex) {
277            $matches = NULL;            $matches = NULL;
278            if (preg_match($regex, $embed, $matches)) {            if (preg_match($regex, trim($embed), $matches)) {
279              return array('provider' => $provider->name, 'value' => $matches[1]);              return array('provider' => $provider->name, 'value' => $matches[1]);
280            }            }
281          }          }

Legend:
Removed from v.1.21.2.6  
changed lines
  Added in v.1.21.2.7

  ViewVC Help
Powered by ViewVC 1.1.2