-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11881 from yashodha/CRM-21854
CRM-21854 - Contribution start date and end dates are not respected
- Loading branch information
Showing
6 changed files
with
66 additions
and
21 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
CRM/Contribute/Exception/FutureContributionPageException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
class CRM_Contribute_Exception_FutureContributionPageException extends Exception { | ||
private $id; | ||
|
||
/** | ||
* @param string $message | ||
* @param int $id | ||
*/ | ||
public function __construct($message, $id) { | ||
parent::__construct(ts($message)); | ||
$this->id = $id; | ||
CRM_Core_Error::debug_log_message('Access to contribution page with start date in future attempted - page number ' . $id); | ||
} | ||
|
||
/** | ||
* Get Contribution page ID. | ||
* | ||
* @return int | ||
*/ | ||
public function getID() { | ||
return $this->id; | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
CRM/Contribute/Exception/PastContributionPageException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
class CRM_Contribute_Exception_PastContributionPageException extends Exception { | ||
private $id; | ||
|
||
/** | ||
* @param string $message | ||
* @param int $id | ||
*/ | ||
public function __construct($message, $id) { | ||
parent::__construct(ts($message)); | ||
$this->id = $id; | ||
CRM_Core_Error::debug_log_message('Access to contribution page with past end date attempted - page number ' . $id); | ||
} | ||
|
||
/** | ||
* Get Contribution page ID. | ||
* | ||
* @return int | ||
*/ | ||
public function getID() { | ||
return $this->id; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters