comanage-dev - [comanage-dev] r257 - registry/trunk/app/Controller
Subject: COmanage Developers List
List archive
- From:
- To:
- Subject: [comanage-dev] r257 - registry/trunk/app/Controller
- Date: Mon, 12 Mar 2012 21:49:10 -0400
Author: marie
Date: 2012-03-12 21:49:10 -0400 (Mon, 12 Mar 2012)
New Revision: 257
Modified:
registry/trunk/app/Controller/CoNsfDemographicsController.php
Log:
co-256 warning on deletion of demographics
Modified: registry/trunk/app/Controller/CoNsfDemographicsController.php
===================================================================
--- registry/trunk/app/Controller/CoNsfDemographicsController.php
2012-03-13 00:43:35 UTC (rev 256)
+++ registry/trunk/app/Controller/CoNsfDemographicsController.php
2012-03-13 01:49:10 UTC (rev 257)
@@ -317,12 +317,25 @@
*/
function performRedirect() {
- $args = array(
- 'controller' => 'co_people',
- 'action' => 'edit',
- 'co' => $this->cur_co['Co']['id'],
-
Sanitize::html($this->params['data']['CoNsfDemographic']['co_person_id'])
- );
+ if(isset($this->params['data']['CoNsfDemographic']['co_person_id'])) {
+ // If person's id is available, redirect to the person's edit page
+ $args = array(
+ 'controller' => 'co_people',
+ 'action' => 'edit',
+ 'co' => $this->cur_co['Co']['id'],
+
Sanitize::html($this->params['data']['CoNsfDemographic']['co_person_id'])
+ );
+ } elseif($this->viewVars['permissions']['index'] == true) {
+ // If the id is not available and we have permission to view index, go
there
+ $args = array(
+ 'controller' => 'co_nsf_demographics',
+ 'action' => 'index',
+ 'co' => $this->cur_co['Co']['id']
+ );
+ } else {
+ // Otherwise, just go to front page
+ $args = '/';
+ }
$this->redirect($args);
}
- [comanage-dev] r257 - registry/trunk/app/Controller, svnlog, 03/12/2012
Archive powered by MHonArc 2.6.16.