本文整理汇总了PHP中Note::getMessageIDbyID方法的典型用法代码示例。如果您正苦于以下问题:PHP Note::getMessageIDbyID方法的具体用法?PHP Note::getMessageIDbyID怎么用?PHP Note::getMessageIDbyID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getMessageIDbyID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getNote
/**
* Method used to get the details of a given note and issue.
*
* @param integer $issue_id The issue ID
* @param integer $note_id The note ID
* @return array The details of the note / issue
*/
public function getNote($issue_id, $note_id)
{
$stmt = 'SELECT
not_usr_id,
not_iss_id,
not_created_date,
not_note,
not_title,
not_unknown_user,
not_full_message,
not_message_id,
not_parent_id,
not_is_blocked,
usr_full_name
FROM
{{%note}},
{{%user}}
WHERE
not_id=? AND
not_usr_id=usr_id';
try {
$res = DB_Helper::getInstance()->getRow($stmt, array($note_id));
} catch (DbException $e) {
return '';
}
// if there is an unknown user, use instead of full name
if (!empty($res['not_unknown_user'])) {
$res['usr_full_name'] = $res['not_unknown_user'];
}
if (!empty($res['not_parent_id'])) {
$res['reference_msg_id'] = Note::getMessageIDbyID($res['not_parent_id']);
} else {
$res['reference_msg_id'] = false;
}
$data = Issue::getDetails($issue_id);
$data['note'] = $res;
return $data;
}
示例2: getNote
/**
* Method used to get the details of a given note and issue.
*
* @access public
* @param integer $issue_id The issue ID
* @param integer $note_id The note ID
* @return array The details of the note / issue
*/
function getNote($issue_id, $note_id)
{
$stmt = "SELECT\r\n not_usr_id,\r\n not_iss_id,\r\n not_created_date,\r\n not_note,\r\n not_title,\r\n not_unknown_user,\r\n not_blocked_message,\r\n not_message_id,\r\n not_parent_id,\r\n usr_full_name\r\n FROM\r\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "note,\r\n " . ETEL_USER_TABLE . "\r\n WHERE\r\n not_id=" . Misc::escapeInteger($note_id) . " AND\r\n not_usr_id=usr_id";
$res = $GLOBALS["db_api"]->dbh->getRow($stmt, DB_FETCHMODE_ASSOC);
if (PEAR::isError($res)) {
Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
return "";
} else {
// if there is an unknown user, use instead of full name
if (!empty($res["not_unknown_user"])) {
$res["usr_full_name"] = $res["not_unknown_user"];
}
if (!empty($res['not_parent_id'])) {
$res['reference_msg_id'] = Note::getMessageIDbyID($res['not_parent_id']);
} else {
$res['reference_msg_id'] = false;
}
$data = Notification::getIssueDetails($issue_id);
$data["note"] = $res;
return $data;
}
}