<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
$this->assign('has_related', FALSE);
// if membership can be granted, and we are the owner of the membership
- if (CRM_Utils_Array::value('relationship_type_id', $membershipType)
- && !CRM_Utils_Array::value('owner_membership_id', $values)
- ) {
+ if (!empty($membershipType['relationship_type_id']) && empty($values['owner_membership_id'])) {
// display related contacts/membership block
$this->assign('has_related', TRUE);
$this->assign('max_related', CRM_Utils_Array::value('max_related', $values, ts('Unlimited')));
'id' => CRM_Utils_Request::retrieve('id', 'Positive', $this),
'cid' => $row['cid'],
'mid' => $row['mid'],
- )
+ ),
+ ts('more'),
+ FALSE,
+ 'membership.relationship.action',
+ 'Relationship',
+ CRM_Utils_Request::retrieve('id', 'Positive', $this)
);
}
else {
'id' => CRM_Utils_Request::retrieve('id', 'Positive', $this),
'cid' => $row['cid'],
'rid' => $row['cid'],
- )
+ ),
+ ts('more'),
+ FALSE,
+ 'membership.relationship.action',
+ 'Relationship',
+ CRM_Utils_Request::retrieve('id', 'Positive', $this)
);
}
}
$autoRenew = $isRecur ? TRUE : FALSE;
}
- if (CRM_Utils_Array::value('is_test', $values)) {
+ if (!empty($values['is_test'])) {
$values['membership_type'] .= ' (test) ';
}
/**
* Function to build the form
*
- * @return None
+ * @return void
* @access public
*/
public function buildQuickForm() {