Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/site/PhameBlogSite.php
Show All 33 Lines | public function newSiteForRequest(AphrontRequest $request) { | ||||
$host = $request->getHost(); | $host = $request->getHost(); | ||||
try { | try { | ||||
$blog = id(new PhameBlogQuery()) | $blog = id(new PhameBlogQuery()) | ||||
->setViewer(new PhabricatorUser()) | ->setViewer(new PhabricatorUser()) | ||||
->withDomain($host) | ->withDomain($host) | ||||
->needProfileImage(true) | ->needProfileImage(true) | ||||
->needHeaderImage(true) | |||||
->withStatuses( | ->withStatuses( | ||||
array( | array( | ||||
PhameBlog::STATUS_ACTIVE, | PhameBlog::STATUS_ACTIVE, | ||||
)) | )) | ||||
->executeOne(); | ->executeOne(); | ||||
} catch (PhabricatorPolicyException $ex) { | } catch (PhabricatorPolicyException $ex) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
Show All 22 Lines |