Development

Changeset 7639

You must first sign up to be able to contribute.

Changeset 7639

Show
Ignore:
Timestamp:
02/27/08 22:29:45 (1 year ago)
Author:
fabien
Message:

removed hack needed for old PHP 5 version

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/database/sfPropelDataRetriever.class.php

    r5231 r7639  
    2121  static public function retrieveObjects($class, $peerMethod = null) 
    2222  { 
    23     if (!$classPath = sfAutoload::getInstance()->getClassPath($class.'Peer')) 
    24     { 
    25       throw new sfException(sprintf('Unable to find path for class "%s".', $class.'Peer')); 
    26     } 
    27  
    28     require_once($classPath); 
    29  
    3023    if (!$peerMethod) 
    3124    { 
     
    4033    } 
    4134 
    42     $objects = call_user_func(array($classPeer, $peerMethod), new Criteria()); 
    43  
    44     return $objects; 
     35    return call_user_func(array($classPeer, $peerMethod), new Criteria()); 
    4536  } 
    4637} 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php

    r7614 r7639  
    8181      $class = trim($class); 
    8282 
    83       $peer_class = $class.'Peer'; 
    84  
    85       $tableMap = $this->dbMap->getTable(constant($peer_class.'::TABLE_NAME')); 
    86  
    87       $column_names = call_user_func_array(array($peer_class, 'getFieldNames'), array(BasePeer::TYPE_FIELDNAME)); 
     83      $tableMap = $this->dbMap->getTable(constant($class.'Peer::TABLE_NAME')); 
     84 
     85      $column_names = call_user_func_array(array($class.'Peer', 'getFieldNames'), array(BasePeer::TYPE_FIELDNAME)); 
    8886 
    8987      // iterate through datas for this class 
     
    248246        } 
    249247 
    250         $peer_class = $class.'Peer'; 
    251  
    252         if (!$classPath = sfAutoload::getInstance()->getClassPath($peer_class)) 
    253         { 
    254           throw new sfException(sprintf('Unable to find path for class "%s".', $peer_class)); 
    255         } 
    256  
    257         require_once($classPath); 
    258  
    259         call_user_func(array($peer_class, 'doDeleteAll'), $this->con); 
     248        call_user_func(array($class.'Peer', 'doDeleteAll'), $this->con); 
    260249 
    261250        $this->deletedClasses[] = $class; 
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropelPager.class.php

    r6970 r7639  
    4343    $cForCount->clearGroupByColumns(); 
    4444 
    45     // require the model class (because autoloading can crash under some conditions) 
    46     if (!$classPath = sfAutoload::getInstance()->getClassPath($this->getClassPeer())) 
    47     { 
    48       throw new sfException(sprintf('Unable to find path for class "%s".', $this->getClassPeer())); 
    49     } 
    50     require_once($classPath); 
    5145    $count = call_user_func(array($this->getClassPeer(), $this->getPeerCountMethod()), $cForCount); 
    5246 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.