Development

Changeset 13390

You must first sign up to be able to contribute.

Changeset 13390

Show
Ignore:
Timestamp:
11/27/08 09:40:43 (1 year ago)
Author:
Jonathan.Wage
Message:

[1.2] fixed admin generator route generation when the primary key is not named id (closes #4966 closes #5082)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrinePlugin/trunk/lib/task/sfDoctrineGenerateAdminTask.class.php

    r13330 r13390  
    108108    if (!isset($routesArray[$name])) 
    109109    { 
     110      $databaseManager = new sfDatabaseManager($this->configuration); 
     111      $primaryKey = Doctrine::getTable($model)->getIdentifier(); 
    110112      $module = $options['module'] ? $options['module'] : $name; 
    111113      $content = sprintf(<<<EOF 
     
    116118    module:              %s 
    117119    prefix_path:         %s 
     120    column:              %s 
    118121    with_wildcard_routes: true 
    119122 
    120123 
    121124EOF 
    122       , $name, $model, $module, $module).$content; 
     125      , $name, $model, $module, $module, $primaryKey).$content; 
    123126 
    124127      file_put_contents($routing, $content); 

The Sensio Labs Network

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