Author: lombardot
Date: 2010-01-21 23:33:48 +0100 (Thu, 21 Jan 2010)
New Revision: 27023
Modified:
plugins/sfDatagridPlugin/lib/sfDatagridFormatterPropel.class.php
Log:
[sfDatagidPlugin] lombardot add compat fr sf1.4 in propel version
Modified: plugins/sfDatagridPlugin/lib/sfDatagridFormatterPropel.class.php
===================================================================
--- plugins/sfDatagridPlugin/lib/sfDatagridFormatterPropel.class.php
2010-01-21 21:45:56 UTC (rev 27022)
+++ plugins/sfDatagridPlugin/lib/sfDatagridFormatterPropel.class.php
2010-01-21 22:33:48 UTC (rev 27023)
@@ -23,11 +23,20 @@
*/
$tablePeer=$object->_get('peerTable').'Peer';
$builder=$object->_get('peerTable').'MapBuilder';
+ if(class_exists($builder)){
$mapBuilder=new $builder;
$mapBuilder->doBuild();
$adminrelated =
$mapBuilder->getDatabaseMap()->getTable(sfInflector::underscore($object->_get('peerTable')))->getColumn(strtoupper($column));
+ }else{
+
$map=$object->_get('peerTable').'TableMap';
+ $map=new
$map($object->_get('peerTable'),new DatabaseMap('propel'));
+ $map->initialize();
+ $adminrelated =
$map->getColumn(strtoupper($column));
+ }
+
+
}catch(Exception $e)
{
$adminrelated = '';
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.