comanage-dev - [comanage-dev] commit a change to help debugging/development
Subject: COmanage Developers List
List archive
- From: Scott Koranda <>
- To: comanage-dev <>
- Subject: [comanage-dev] commit a change to help debugging/development
- Date: Tue, 28 Aug 2012 13:26:15 -0500
Hi,
I would like to commit the following change. It is intended to
help with debugging/development by showing the old behavior
with invitations when debug is non-zero:
Any objections?
Scott
diff --git a/app/Controller/CoInvitesController.php
b/app/Controller/CoInvitesController.php
index 724902d..4bc72cb 100644
--- a/app/Controller/CoInvitesController.php
+++ b/app/Controller/CoInvitesController.php
@@ -483,10 +483,16 @@ class CoInvitesController extends AppController {
$this->Session->setFlash(_txt('er.cop.nf', array($cpid)), '',
array(), 'error');
}
- // Redirect to My Population
- $nextPage = array('controller' => 'co_people',
- 'action' => 'index',
- 'co' => $this->cur_co['Co']['id']);
- $this->redirect($nextPage);
+ $debug = Configure::read('debug');
+ if(!$debug) {
+ // Redirect to My Population when no debugging so that
+ // user sees flash message that email was sent with invitation.
+ // Otherwise when debugging user will see link to the invitation
+ // to help debugging and testing.
+ $nextPage = array('controller' => 'co_people',
+ 'action' => 'index',
+ 'co' => $this->cur_co['Co']['id']);
+ $this->redirect($nextPage);
+ }
}
}
diff --git a/app/View/CoInvites/send.ctp b/app/View/CoInvites/send.ctp
index 5c34eb2..76fcf4e 100644
--- a/app/View/CoInvites/send.ctp
+++ b/app/View/CoInvites/send.ctp
@@ -28,6 +28,9 @@
?>
<p>
+You are seeing this text because <b>debug</b> is true in the configuration
file <b>app/Config/core.php</b>.
+</p>
+<p>
Email would be sent to <b><?php echo $invite['CoInvite']['mail']; ?></b>
with the URL
<br />
<br />
- [comanage-dev] commit a change to help debugging/development, Scott Koranda, 08/28/2012
- Re: [comanage-dev] commit a change to help debugging/development, Benn Oshrin, 08/29/2012
- Re: [comanage-dev] commit a change to help debugging/development, Scott Koranda, 08/29/2012
- Re: [comanage-dev] commit a change to help debugging/development, Benn Oshrin, 08/29/2012
Archive powered by MHonArc 2.6.16.