Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/site/PhameBlogSite.php
| Show All 32 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) | |||||
| ->withStatuses( | |||||
| array( | |||||
| PhameBlog::STATUS_ACTIVE, | |||||
| )) | |||||
| ->executeOne(); | ->executeOne(); | ||||
| } catch (PhabricatorPolicyException $ex) { | } catch (PhabricatorPolicyException $ex) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'This blog is not visible to logged out users, so it can not be '. | 'This blog is not visible to logged out users, so it can not be '. | ||||
| 'visited from a custom domain.')); | 'visited from a custom domain.')); | ||||
| } | } | ||||
| Show All 18 Lines | |||||