projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3874 from rohankatkar/CRM-15136
[civicrm-core.git]
/
CRM
/
Contribute
/
Page
/
ContributionPage.php
diff --git
a/CRM/Contribute/Page/ContributionPage.php
b/CRM/Contribute/Page/ContributionPage.php
index 54a29025936c7b20a9a5def5fd36fe94cf0c522a..f0c2417699440eb482f58a492a82775537d73bb2 100644
(file)
--- a/
CRM/Contribute/Page/ContributionPage.php
+++ b/
CRM/Contribute/Page/ContributionPage.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-228,10
+228,9
@@
class CRM_Contribute_Page_ContributionPage extends CRM_Core_Page {
if (!isset(self::$_contributionLinks)) {
//get contribution dates.
$dates = CRM_Contribute_BAO_Contribution::getContributionDates();
if (!isset(self::$_contributionLinks)) {
//get contribution dates.
$dates = CRM_Contribute_BAO_Contribution::getContributionDates();
- foreach (array(
- 'now', 'yearDate', 'monthDate') as $date) {
- $$date = $dates[$date];
- }
+ $now = $dates['now'];
+ $yearDate = $dates['yearDate'];
+ $monthDate = $dates['monthDate'];
$yearNow = $yearDate + 10000;
$urlString = 'civicrm/contribute/search';
$yearNow = $yearDate + 10000;
$urlString = 'civicrm/contribute/search';
@@
-387,6
+386,8
@@
AND cp.page_type = 'contribute'
/**
* Browse all contribution pages
*
/**
* Browse all contribution pages
*
+ * @param null $action
+ *
* @return void
* @access public
* @static
* @return void
* @access public
* @static
@@
-553,6
+554,12
@@
ORDER BY title asc
$form->run();
}
$form->run();
}
+ /**
+ * @param $params
+ * @param bool $sortBy
+ *
+ * @return int|string
+ */
function whereClause(&$params, $sortBy = TRUE) {
$values = $clauses = array();
$title = $this->get('title');
function whereClause(&$params, $sortBy = TRUE) {
$values = $clauses = array();
$title = $this->get('title');
@@
-613,6
+620,10
@@
ORDER BY title asc
return implode(' AND ', $clauses);
}
return implode(' AND ', $clauses);
}
+ /**
+ * @param $whereClause
+ * @param $whereParams
+ */
function pager($whereClause, $whereParams) {
$params['status'] = ts('Contribution %%StatusMessage%%');
function pager($whereClause, $whereParams) {
$params['status'] = ts('Contribution %%StatusMessage%%');
@@
-635,6
+646,10
@@
SELECT count(id)
$this->assign_by_ref('pager', $this->_pager);
}
$this->assign_by_ref('pager', $this->_pager);
}
+ /**
+ * @param $whereClause
+ * @param $whereParams
+ */
function pagerAtoZ($whereClause, $whereParams) {
$query = "
function pagerAtoZ($whereClause, $whereParams) {
$query = "
@@
-649,6
+664,11
@@
SELECT count(id)
$this->assign('aToZ', $aToZBar);
}
$this->assign('aToZ', $aToZBar);
}
+ /**
+ * @param $sectionsInfo
+ *
+ * @return array
+ */
function formatConfigureLinks($sectionsInfo) {
//build the formatted configure links.
$formattedConfLinks = self::configureActionLinks();
function formatConfigureLinks($sectionsInfo) {
//build the formatted configure links.
$formattedConfLinks = self::configureActionLinks();
@@
-663,7
+683,7
@@
SELECT count(id)
$classes = $link['class'];
}
$classes = $link['class'];
}
- if (
!CRM_Utils_Array::value($sectionName, $sectionsInfo
)) {
+ if (
empty($sectionsInfo[$sectionName]
)) {
$classes = array();
if (isset($link['class'])) {
$classes = $link['class'];
$classes = array();
if (isset($link['class'])) {
$classes = $link['class'];