60287dfdaa3b217e1e27019ca593393288189835

Author: Mark Story

Date: 2009-07-21 14:24:14 -0400

Fixing routes and use of undefined method.

diff --git a/vendors/shells/api_index.php b/vendors/shells/api_index.php index 45f16da..1159384 100644 --- a/vendors/shells/api_index.php +++ b/vendors/shells/api_index.php @@ -86,10 +86,12 @@ class ApiIndexShell extends Shell { $add = array( "Router::connect('/classes', array('plugin' => 'api_generator', 'controller' => 'api_classes', 'action' => 'index'));", "Router::connect('/class/*', array('plugin' => 'api_generator', 'controller' => 'api_classes', 'action' => 'view_class'));", - "Router::connect('/source', array('plugin' => 'api_generator', 'controller' => 'api_files', 'action' => 'source'));", - "Router::connect('/files', array('plugin' => 'api_generator', 'controller' => 'api_files', 'action' => 'files'));", + "Router::connect('/source/*', array('plugin' => 'api_generator', 'controller' => 'api_files', 'action' => 'source'));", + "Router::connect('/files/*', array('plugin' => 'api_generator', 'controller' => 'api_files', 'action' => 'files'));", "Router::connect('/packages', array('plugin' => 'api_generator', 'controller' => 'api_packages', 'action' => 'index'));", - "Router::connect('/package/*', array('plugin' => 'api_generator', 'controller' => 'api_packages', 'action' => 'view'));" + "Router::connect('/package/*', array('plugin' => 'api_generator', 'controller' => 'api_packages', 'action' => 'view'));", + "Router::connect('/file/*', array('plugin' => 'api_generator', 'controller' => 'api_files', 'action' => 'view_file'));", + "Router::connect('/view_source/*', array('plugin' => 'api_generator', 'controller' => 'api_classes', 'action' => 'view_source'));" ); $currentRoutes = trim($Routes->read()); $new = array(); diff --git a/views/elements/method_detail.ctp b/views/elements/method_detail.ctp index 50ff779..0f87494 100644 --- a/views/elements/method_detail.ctp +++ b/views/elements/method_detail.ctp @@ -53,7 +53,7 @@ echo $html->link($method['startLine'], array( 'controller' => 'api_classes', 'action' => 'view_source', - $apiDoc->slugClassName($method['declaredInClass']), + $apiDoc->slug($method['declaredInClass']), '#line-'. $method['startLine'] )); endif; diff --git a/views/elements/method_summary.ctp b/views/elements/method_summary.ctp index ed75afd..0bcec02 100644 --- a/views/elements/method_summary.ctp +++ b/views/elements/method_summary.ctp @@ -37,7 +37,7 @@ $title = (empty($isSearch)) ? __('Method Summary:', true) : __('Methods:', true) ); else: echo $html->link($method['signature'], - array('action' => 'view_class', $apiDoc->slugClassName($doc->name), + array('action' => 'view_class', $apiDoc->slug($doc->name), '#' => 'method-' . $doc->name . $method['name']), array('class' => 'scroll-link') );