Skip to content

Commit

Permalink
Merge pull request civicrm#18 from dlobo/FormattingFixes
Browse files Browse the repository at this point in the history
Fix formatting
  • Loading branch information
dlobo committed May 15, 2013
2 parents 3d1a37b + 8f2a674 commit 083998a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions civicrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,7 @@ function civicrm_check_permission($args) {
$arg3 = CRM_Utils_Array::value(3, $args);

// allow editing of related contacts
if ($arg1 == 'contact' &&
$arg2 == 'relatedcontact'
) {
if ($arg1 == 'contact' && $arg2 == 'relatedcontact') {
return TRUE;
}

Expand Down Expand Up @@ -520,29 +518,32 @@ function civicrm_check_permission($args) {
return TRUE;
}

if ($arg1 == 'pcp' &&
if (
$arg1 == 'pcp' &&
(!$arg2 || in_array($arg2, array('info')))
) {
return TRUE;
}
}

// allow mailing urls to be processed
if ($arg1 == 'mailing' &&
if (
$arg1 == 'mailing' &&
in_array('CiviMail', $config->enableComponents)
) {
if (in_array($arg2,
if (
in_array(
$arg2,
array('forward', 'unsubscribe', 'resubscribe', 'optout', 'subscribe', 'confirm', 'view')
)) {
)
) {
return TRUE;
}
}

// allow petition sign in, CRM-7401
if (in_array('CiviCampaign', $config->enableComponents)) {
if ($arg1 == 'petition' &&
$arg2 == 'sign'
) {
if ($arg1 == 'petition' && $arg2 == 'sign') {
return TRUE;
}
}
Expand All @@ -564,7 +565,7 @@ function wp_civicrm_capability() {
if (
is_object($roleObj) &&
is_array($roleObj->capabilities) &&
! array_key_exists('access_civicrm', $wp_roles->get_role($role)->capabilities )
!array_key_exists('access_civicrm', $wp_roles->get_role($role)->capabilities )
) {
$wp_roles->add_cap($role, 'access_civicrm');
}
Expand Down Expand Up @@ -605,7 +606,7 @@ function civicrm_wp_main() {

add_shortcode('civicrm', 'civicrm_shortcode_handler');

if (! $isAdmin) {
if (!$isAdmin) {
add_action('wp_head', 'civicrm_wp_head');
add_filter('get_header', 'civicrm_wp_shortcode_includes');
}
Expand Down

0 comments on commit 083998a

Please sign in to comment.