Created
July 18, 2012 00:11
-
-
Save slave2zeros/3133104 to your computer and use it in GitHub Desktop.
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
if ($response['status'] == 200) { | |
$pathInstanceId = $response['data']['PathInstance']['id']; | |
$this->_dataSource['PathInstance']['id'] = $pathInstanceId; // Needed for later saves. | |
if (array_key_exists('PathInstanceGoal', $_POST) && count($_POST['PathInstanceGoal']) > 0) { | |
$response = unserialize($this->apiCall(false, false, true, 'api/paths_api/addPathInstanceGoals', 'serialized')); | |
if($response['status'] == 200) { <--- Added this condition | |
if(array_key_exists('recipients', $_POST)) { | |
foreach ($_POST['recipients'] as $r) { | |
$this->_dataSource['PathInstanceUser'] = array( | |
'is_mentor' => Team::isMentorOfTeam($teamId, $r), | |
'User' => array( | |
'id' => $r | |
)); | |
$response = unserialize($this->apiCall(false, false, true, 'api/paths_api/addPathInstanceUser', 'serialized')); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment