Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/controller/PhameLiveController.php
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | if ($site instanceof PhameBlogSite) { | ||||
$is_external = false; | $is_external = false; | ||||
$is_live = false; | $is_live = false; | ||||
$blog = null; | $blog = null; | ||||
} | } | ||||
$this->isExternal = $is_external; | $this->isExternal = $is_external; | ||||
$this->isLive = $is_live; | $this->isLive = $is_live; | ||||
if (strlen($post_id)) { | if (phutil_nonempty_string($post_id)) { | ||||
valerio.bozzolan: ✅ I verified the above line
The `$post_id` comes from getURIData() that just returns null or a… | |||||
$post_query = id(new PhamePostQuery()) | $post_query = id(new PhamePostQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->needHeaderImage(true) | ->needHeaderImage(true) | ||||
->withIDs(array($post_id)); | ->withIDs(array($post_id)); | ||||
// Only show published posts on external domains. | // Only show published posts on external domains. | ||||
if ($is_external) { | if ($is_external) { | ||||
$post_query->withVisibility( | $post_query->withVisibility( | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I verified the above line
The $post_id comes from getURIData() that just returns null or a string.
The function phutil_nonempty_string() will report alien types, and that is OK.