Skip to content

Commit

Permalink
#211 - fixed a re-direct issue affecting the creation of a new Article
Browse files Browse the repository at this point in the history
  • Loading branch information
alphadevx committed Sep 13, 2015
1 parent 10f64e4 commit 33beb44
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Alpha/Controller/ArticleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,12 @@ public function before_displayPageFoot_callback()
$params = $this->request->getParams();

// this will ensure that direct requests to ActiveRecordController will be re-directed here.
$this->setName($config->get('app.url').$this->request->getURI());
$this->setUnitOfWork(array($config->get('app.url').$this->request->getURI(), $config->get('app.url').$this->request->getURI()));
if (isset($this->record) && !$this->record->isTransient()) {
$this->setName($config->get('app.url').$this->request->getURI());
$this->setUnitOfWork(array($config->get('app.url').$this->request->getURI(), $config->get('app.url').$this->request->getURI()));
} else {
$this->setUnitOfWork(array());
}

if ($this->record != null) {
if (isset($params['view']) && $params['view'] == 'detailed') {
Expand Down

0 comments on commit 33beb44

Please sign in to comment.