fix CRM-12088
authorDonald A. Lobo <lobo@civicrm.org>
Mon, 11 Mar 2013 16:46:28 +0000 (09:46 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Mon, 11 Mar 2013 16:46:28 +0000 (09:46 -0700)
CRM/Member/Form/MembershipType.php

index e93140e3f3f78ec1b4751aa9e9f5a2a68150b83b..382cb73fd838066e10ff8f5674e5d21c47be9e49 100644 (file)
@@ -96,7 +96,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
 
         $defaults[$per] = array();
         if ($date > 31) {
-          $date                 = ($date < 999) ? '0' . $date : $date;
+          $date                = ($date < 999) ? '0' . $date : $date;
           $defaults[$per]['M'] = substr($date, 0, 2);
           $defaults[$per]['d'] = substr($date, 2, 3);
         }
@@ -146,7 +146,8 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
       CRM_Core_DAO::getAttribute('CRM_Member_DAO_MembershipType', 'duration_interval')
     );
 
-    $dataUrl = CRM_Utils_System::url("civicrm/ajax/rest",
+    $dataUrl = CRM_Utils_System::url(
+      "civicrm/ajax/rest",
       "className=CRM_Contact_Page_AJAX&fnName=getContactList&json=1&context=membershipType&reset=1&org=1",
       FALSE, NULL, FALSE
     );
@@ -432,10 +433,8 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form {
         ), ts('Saved'), 'success');
       $session = CRM_Core_Session::singleton();
       if ($buttonName == $this->getButtonName('upload', 'new')) {
-        CRM_Core_Session::setStatus(ts(' You can add another membership type.'), '', 'info');
-        $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin/member/membershipType',
-            'action=add&reset=1'
-          )
+        $session->replaceUserContext(
+          CRM_Utils_System::url('civicrm/admin/member/membershipType/add', 'action=add&reset=1')
         );
       }
     }