forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use deprected "1" value to cURL CURLOPT_SSL_VERIFYHOST
Summary: Fixes T2962. That task discusses this issue. Test Plan: Read php-curl documentation to verify this change makes sense. Sent an email with SES. Reviewers: btrahan, garoevans Reviewed By: garoevans CC: aran Maniphest Tasks: T2962 Differential Revision: https://secure.phabricator.com/D5669
- Loading branch information
epriestley
committed
Apr 12, 2013
1 parent
649f5cc
commit 1e6deff
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
75 changes: 75 additions & 0 deletions
75
src/applications/phortune/controller/PhortuneAccountBuyController.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
|
||
final class PhortuneAccountBuyController | ||
extends PhortuneController { | ||
|
||
private $accountID; | ||
private $id; | ||
|
||
public function willProcessRequest(array $data) { | ||
$this->accountID = $data['accountID']; | ||
$this->id = $data['id']; | ||
} | ||
|
||
public function processRequest() { | ||
$request = $this->getRequest(); | ||
$user = $request->getUser(); | ||
|
||
$account = id(new PhortuneAccountQuery()) | ||
->setViewer($user) | ||
->withIDs(array($this->accountID)) | ||
->executeOne(); | ||
if (!$account) { | ||
return new Aphront404Response(); | ||
} | ||
|
||
$account_uri = $this->getApplicationURI($account->getID().'/'); | ||
|
||
$product = id(new PhortuneProductQuery()) | ||
->setViewer($user) | ||
->withIDs(array($this->id)) | ||
->executeOne(); | ||
if (!$product) { | ||
return new Aphront404Response(); | ||
} | ||
|
||
$title = pht('Buy %s', $product->getProductName()); | ||
|
||
$payment_method_uri = $this->getApplicationURI( | ||
$account->getID().'/paymentmethod/edit/'); | ||
|
||
$new_method = phutil_tag( | ||
'a', | ||
array( | ||
'href' => $payment_method_uri, | ||
'sigil' => 'workflow', | ||
), | ||
pht('Add New Payment Method')); | ||
|
||
|
||
$form = id(new AphrontFormView()) | ||
->setUser($user) | ||
->appendChild( | ||
id(new AphrontFormStaticControl()) | ||
->setLabel(pht('Stuff')) | ||
->setValue($product->getProductName())) | ||
->appendChild( | ||
id(new AphrontFormRadioButtonControl()) | ||
->setLabel(pht('Payment Method'))) | ||
->appendChild( | ||
id(new AphrontFormMarkupControl()) | ||
->setValue($new_method)) | ||
->appendChild( | ||
id(new AphrontFormSubmitControl()) | ||
->setValue(pht("Dolla Dolla Bill Y'all"))); | ||
|
||
return $this->buildApplicationPage( | ||
$form, | ||
array( | ||
'title' => $title, | ||
'device' => true, | ||
'dust' => true, | ||
)); | ||
|
||
} | ||
} |
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