~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to phabricator/src/applications/phortune/controller/PhortuneCartUpdateController.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-04-28 03:01:19 UTC
  • mfrom: (0.22.1) (0.21.1) (0.17.2) (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20150428030119-36t1maxz1gh3ojyg
Tags: 0~git20150428-1
* New snapshot release
* fixed nginx configuration (closes: #779705)
* start mysql before phd daemons, if available (closes: #780260, #780265)
* fixed log files permissions (closes: #781825)
* added spanish translation (closes: #783566)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    $request = $this->getRequest();
14
14
    $viewer = $request->getUser();
15
15
 
16
 
    $cart = id(new PhortuneCartQuery())
 
16
    $authority = $this->loadMerchantAuthority();
 
17
 
 
18
    $cart_query = id(new PhortuneCartQuery())
17
19
      ->setViewer($viewer)
18
20
      ->withIDs(array($this->id))
19
 
      ->needPurchases(true)
20
 
      ->executeOne();
 
21
      ->needPurchases(true);
 
22
 
 
23
    if ($authority) {
 
24
      $cart_query->withMerchantPHIDs(array($authority->getPHID()));
 
25
    }
 
26
 
 
27
    $cart = $cart_query->executeOne();
21
28
    if (!$cart) {
22
29
      return new Aphront404Response();
23
30
    }
59
66
    }
60
67
 
61
68
    return id(new AphrontRedirectResponse())
62
 
      ->setURI($cart->getDetailURI());
 
69
      ->setURI($cart->getDetailURI($authority));
63
70
  }
64
71
 
65
72
}