Development

Changeset 9577

You must first sign up to be able to contribute.

Changeset 9577

Show
Ignore:
Timestamp:
06/13/08 15:09:33 (6 months ago)
Author:
antoine
Message:

sfPropelImpersonatorPlugin: fixed a bug, could not customize an aliased field name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelImpersonatorPlugin/trunk/lib/objects/sfPropelObject.class.php

    r8382 r9577  
    2121      if (is_array($column) && count($column)>=2) 
    2222      { 
    23         $columns[$index][2] = trim(strtolower(preg_replace('/[^a-z]/i', '_', $column[1])), '_'); 
     23        if (!isset($column[2])) 
     24        { 
     25          $columns[$index][2] = trim(strtolower(preg_replace('/[^a-z]+/i', '_', $column[1])), '_'); 
     26        } 
     27        else 
     28        { 
     29          $columns[$index][2] = trim(strtolower(preg_replace('/[^a-z_]+/i', '_', $column[2])), '_'); 
     30        } 
    2431      } 
    2532      else