Skip to content

Commit

Permalink
Compute the controller name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Sep 22, 2017
1 parent 10e6dd4 commit 48a009d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @since 1.6
*/
class FeaturedController extends Articles
class FeaturedController extends ArticlesController
{
/**
* Removes an item.
Expand Down
2 changes: 1 addition & 1 deletion libraries/src/MVC/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu
{
$reflect = new \ReflectionClass($this);

$r = array(0 => '', 1 => '', 2 => $reflect->getShortName());
$r = array(0 => '', 1 => '', 2 => str_replace('Controller', '', $reflect->getShortName()));

if (!$reflect->getNamespaceName() && !preg_match('/(.*)Controller(.*)/i', $reflect->getShortName(), $r))
{
Expand Down

0 comments on commit 48a009d

Please sign in to comment.