Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] r387 - registry/trunk/app/Controller

Subject: COmanage Developers List

List archive

Re: [comanage-dev] r387 - registry/trunk/app/Controller


Chronological Thread 
  • From: Scott Koranda <>
  • To: Benn Oshrin <>
  • Cc:
  • Subject: Re: [comanage-dev] r387 - registry/trunk/app/Controller
  • Date: Mon, 22 Oct 2012 17:27:45 -0500

Hi,

> This ended up being pretty easy.
>
> performRedirect() is a StandardController function that tries to
> figure out what redirect to issue after an operation completes.
> Marie recently modified it to add support for passing a tab to
> select on CoPerson or OrgIdentity views, for Models that
> requires_person.
>
> Basically, the check for the redirect variable should have been done
> within the requires_person check, but instead that check was
> happening later. As such, when a Controller that did not
> requires_person triggered a StandardController::performRedirect,
> viewVars['redirect'] wouldn't have been set.
>
> You can see the details in the diff.

Thanks. I did a rebase and that worked.

I am now, however, getting another error when I try to add an
email for an org person:

Notice (8): Undefined variable: email_addresses
[APP/View/EmailAddresses/fields.inc, line 99]
Code Context
</td>
<td>
<?php print
($email_addresses[0]['EmailAddress']['verified'] ?
_txt('fd.yes') : _txt('fd.no')); ?>
include - APP/View/EmailAddresses/fields.inc, line 99
include - APP/View/Standard/add.ctp, line 67
View::_render() - CORE/Cake/View/View.php, line 595
View::render() - CORE/Cake/View/View.php, line 362
Controller::render() - CORE/Cake/Controller/Controller.php,
line 900
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line
111
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php,
line 86
[main] - APP/webroot/index.php, line 96

Any takers?

Thanks,

Scott

>
> -Benn-
>
> On 10/22/12 2:58 PM,
>
> wrote:
> >Author: benno
> >Date: 2012-10-22 14:58:05 -0400 (Mon, 22 Oct 2012)
> >New Revision: 387
> >
> >Modified:
> > registry/trunk/app/Controller/StandardController.php
> >Log:
> >Fix redirect expectations (CO-493)
> >
> >Modified: registry/trunk/app/Controller/StandardController.php
> >===================================================================
> >--- registry/trunk/app/Controller/StandardController.php 2012-10-16
> >19:16:11 UTC (rev 386)
> >+++ registry/trunk/app/Controller/StandardController.php 2012-10-22
> >18:58:05 UTC (rev 387)
> >@@ -682,24 +682,23 @@
> > */
> >
> > function performRedirect() {
> >- $redirect = $this->viewVars['redirect'];
> >-
> >- // Sets tab to be opened by co_people page via jquery
> >- if($this->viewVars['redirect']['controller'] == 'co_people'
> >- || $this->viewVars['redirect']['controller'] == 'org_identities') {
> >- if($this->redirectTab)
> >- $redirect['tab'] = $this->redirectTab;
> >- }
> >-
> > if($this->requires_person) {
> >+ $redirect = $this->viewVars['redirect'];
> >+
> >+ // Sets tab to be opened by co_people page via jquery
> >+ if($this->viewVars['redirect']['controller'] == 'co_people'
> >+ || $this->viewVars['redirect']['controller'] ==
> >'org_identities') {
> >+ if($this->redirectTab)
> >+ $redirect['tab'] = $this->redirectTab;
> >+ }
> >+
> > $this->set('redirect', $redirect);
> > $this->redirect($redirect);
> >- }
> >-
> >- if(isset($this->cur_co))
> >+ } elseif(isset($this->cur_co)) {
> > $this->redirect(array('action' => 'index', 'co' =>
> > Sanitize::html($this->cur_co['Co']['id'])));
> >- else
> >+ } else {
> > $this->redirect(array('action' => 'index'));
> >+ }
> > }
> >
> > /**
> >
>



Archive powered by MHonArc 2.6.16.

Top of Page