crud command with subdirectory

I noticed a small bug while using the crud command with a subdirectory. Following the example from the help, I ran “crud User admin/user”. After running it, I got a controller without .php extension:


>> crud User admin/user

      mkdir /path/to/protected/controllers/admin

  generate UserController

      mkdir /path/to/protected/views/admin

      mkdir /path/to/protected/views/admin/user

  generate create.php

  generate update.php

  generate list.php

  generate show.php

  generate admin.php

  generate _form.php

As you can see the .php is missing after UserController. This ofcourse resulted in a “Unable to resolve the request “admin/user”.” error, which had me confused for a while :)

Which version are you using?

the latest one (Version 1.0.7 July 5, 2009)

It's line 122 of CrudCommand.php:


Should be:


Thanks! Fixed.