public $detail; } $ret_info = new ReturnInfo(); $ret_info->status = 'error'; $ret_info->detail = t('N/A'); if (!in_array($domain_handle, ProjectInfo::$mDomainList)) { $ret_info->detail = t('Bad domain'); echo $json->encode($ret_info); exit(0); } if (!preg_match("/^[a-f0-9]{32}\$/", $section_id)) { $ret_info->detail = t('Bad section'); echo $json->encode($ret_info); exit(0); } $comments = DocSectionManager::getEarlierComments($domain_handle, $section_id, $oldest_comment_id); if (count($comments) == 0) { $ret_info->status = 'nodata'; $ret_info->detail = ''; echo $json->encode($ret_info); exit(0); } $ret_info->status = 'success'; $ret_info->detail = ''; foreach ($comments as $comment) { $author_name_info = FSEInfo::getNameInfo($comment['author_id']); if ($author_name_info == false) { continue; } unset($replied_name_info); if (preg_match("/^[0-9a-f]{32}\$/", $comment['replied_author_id'])) {