public function Status($pData = null) { if ($this->_Source != 'Component') { return false; } $this->_Focus = $this->Talk('User', 'Focus'); $this->_Current = $this->Talk('User', 'Current'); include ASD_PATH . 'components/page/models/post.php'; $Posts = new cPagePostModel(); include ASD_PATH . 'components/page/models/references.php'; $References = new cPageReferencesModel(); $Posts->RetrieveCurrent($this->_Focus->Id); if ($Posts->Get("Total") == 0) { return false; } $Posts->Fetch(); $References->Retrieve(array("Identifier" => $Posts->Get("Identifier"))); if ($References->Get("Total") == 0) { return false; } $References->Fetch(); $return = array(); $Identifier = $References->Get('Identifier'); $Access = $this->Talk('Privacy', 'Check', array('Type' => 'Post', 'Identifier' => $Identifier)); $return['Content'] = $Posts->Get('Content'); $return['Stamp'] = $References->Get('Stamp'); if ($Access) { return $return; } else { // If the person viewing is the focus user, grant access if ($this->_Focus->Account == $this->_Current->Account) { return $return; } else { return false; } } return false; }