예제 #1
0
             $errors[] = 'Incorrect Captcha';
         }
         if (count($errors)) {
             throw new Exception('');
         }
     } catch (Exception $e) {
         $pulls = $pullinfo->listPulls($bug_id);
         include "{$ROOT_DIR}/templates/addghpull.php";
         exit;
     }
 } else {
     $email = $auth_user->email;
 }
 if (!count($errors)) {
     PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
     $newpr = $pullinfo->attach($bug_id, $_POST['repository'], $_POST['pull_id'], $email);
     PEAR::popErrorHandling();
     if (PEAR::isError($newpr)) {
         $errors = array($newpr->getMessage(), 'Could not attach pull request to Bug #' . $bug_id);
     }
 }
 if (count($errors)) {
     $pulls = $pullinfo->listPulls($bug_id);
     include "{$ROOT_DIR}/templates/addghpull.php";
     exit;
 }
 /*
 	// Add a comment to the bug report.
 	$text = <<<TXT
 The following pull request has been associated: