本文整理汇总了PHP中util_unconvert_htmlspecialchars函数的典型用法代码示例。如果您正苦于以下问题:PHP util_unconvert_htmlspecialchars函数的具体用法?PHP util_unconvert_htmlspecialchars怎么用?PHP util_unconvert_htmlspecialchars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了util_unconvert_htmlspecialchars函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Project $project, $count, $selected)
{
$this->label = util_unconvert_htmlspecialchars($project->getPublicName());
$this->count = $count;
$this->value = $project->getGroupId();
$this->selected = $selected;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchResultProjectsFacet.class.php
示例2: __construct
public function __construct(array $result)
{
$hp = Codendi_HTMLPurifier::instance();
$this->project_name = util_unconvert_htmlspecialchars($result['group_name']);
$this->project_unix_name = $result['unix_group_name'];
$this->project_description = $hp->purify($result['short_description'], CODENDI_PURIFIER_BASIC, $result['group_id']);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SearchProjectResultPresenter.php
示例3: __construct
public function __construct(array $hit, Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->has_highlight = !empty($this->highlight);
$this->display_permissions = isset($hit['fields']['permissions']);
if ($this->display_permissions) {
$this->permissions = implode(', ', $hit['fields']['permissions']);
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:SearchResult.class.php
示例4: getSummaryPageContent
/**
* getSummaryPageContent
*
* Return the text to display on the summary page
* @return arr[title], arr[content]
*/
function getSummaryPageContent()
{
$hp = Codendi_HTMLPurifier::instance();
$user = UserManager::instance()->getCurrentUser();
$ret = array('title' => $GLOBALS['Language']->getText('include_project_home', 'latest_file_releases'), 'content' => '');
$packages = $this->_getPackagesForUser($user->getId());
if (count($packages)) {
$ret['content'] .= '
<table cellspacing="1" cellpadding="5" width="100%" border="0">
<tr class="boxitem">
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'package') . '
</td>
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'version') . '
</td>
<td>
' . $GLOBALS['Language']->getText('include_project_home', 'download') . '
</td>
</tr>
';
require_once 'FileModuleMonitorFactory.class.php';
$fmmf = new FileModuleMonitorFactory();
foreach ($packages as $package) {
// the icon is different whether the package is monitored or not
if ($fmmf->isMonitoring($package['package_id'], $user, false)) {
$monitor_img = $GLOBALS['HTML']->getImage("ic/notification_stop.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'stop_monitoring'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'stop_monitoring')));
} else {
$monitor_img = $GLOBALS['HTML']->getImage("ic/notification_start.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'start_monitoring'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'start_monitoring')));
}
$ret['content'] .= '
<TR class="boxitem">
<TD>
<B>' . $hp->purify(util_unconvert_htmlspecialchars($package['package_name']), CODENDI_PURIFIER_CONVERT_HTML) . '</B>
<a HREF="/file/filemodule_monitor.php?filemodule_id=' . $package['package_id'] . '&group_id=' . $this->getGroupId() . '">' . $monitor_img . '
</a>
</TD>';
// Releases to display
$ret['content'] .= '<TD>' . $hp->purify($package['release_name'], CODENDI_PURIFIER_CONVERT_HTML) . ' <A href="/file/shownotes.php?group_id=' . $this->getGroupId() . '&release_id=' . $package['release_id'] . '">' . $GLOBALS['HTML']->getImage("ic/text.png", array('alt' => $GLOBALS['Language']->getText('include_project_home', 'release_notes'), 'title' => $GLOBALS['Language']->getText('include_project_home', 'release_notes'))) . '
</TD>
<TD><A HREF="/file/showfiles.php?group_id=' . $this->getGroupId() . '&release_id=' . $package['release_id'] . '">' . $GLOBALS['Language']->getText('include_project_home', 'download') . '</A></TD></TR>';
}
$ret['content'] .= '</table>';
} else {
$ret['content'] .= '<b>' . $GLOBALS['Language']->getText('include_project_home', 'no_files_released') . '</b>';
}
$ret['content'] .= '
<div align="center">
<a href="/file/showfiles.php?group_id=' . $this->getGroupId() . '">[' . $GLOBALS['Language']->getText('include_project_home', 'view_all_files') . ']</A>
</div>
';
return $ret;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:59,代码来源:ServiceFile.class.php
示例5: sendNotice
/**
* sendNotice - Notifies of document submissions
*/
function sendNotice($new = true)
{
$BCC = $this->Group->getDocEmailAddress();
if (strlen($BCC) > 0) {
$subject = '[' . $this->Group->getPublicName() . '] New document - ' . $this->getName();
$body = "Project: " . $this->Group->getPublicName() . "\n";
$body .= "Group: " . $groupname . "\n";
$body .= "Document title: " . $this->getName() . "\n";
$body .= "Document description: " . util_unconvert_htmlspecialchars($this->getDescription()) . "\n";
$body .= "Submitter: " . $this->getCreatorRealName() . " (" . $this->getCreatorUserName() . ") \n";
$body .= "\n\n-------------------------------------------------------" . "\nFor more info, visit:" . "\n\n" . util_make_url('/docman/index.php?group_id=' . $this->Group->getID());
util_send_message('', $subject, $body, '', $BCC);
}
return true;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:18,代码来源:Document.class.php
示例6: displayFollowupComment
/**
* Output the raw follow-up comment
*
* @param Integer $comment_id Id of the follow-up comment
*
* @return void
*/
function displayFollowupComment($comment_id)
{
echo util_unconvert_htmlspecialchars($this->getFollowup($comment_id));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:ArtifactHtml.class.php
示例7: formatFollowUp
/**
* Format the comment text to a given format according to parameters
*
* @param Integer $groupId Project id
* @param Boolean $commentFormat $value's format
* @param String $value Comment content
* @param Boolean $output Output format
*
* @return String
*/
public function formatFollowUp($groupId, $commentFormat, $value, $output)
{
$commentText = '';
if ($output == self::OUTPUT_EXPORT) {
return util_unconvert_htmlspecialchars($value);
} else {
$hp = $this->getHTMLPurifier();
if ($output == self::OUTPUT_MAIL_TEXT) {
if ($commentFormat == self::FORMAT_HTML) {
$commentText = $hp->purify(util_unconvert_htmlspecialchars($value), CODENDI_PURIFIER_STRIP_HTML);
} else {
$commentText = $value;
}
$commentText = util_unconvert_htmlspecialchars($commentText);
} else {
if ($commentFormat == self::FORMAT_HTML) {
$level = CODENDI_PURIFIER_LIGHT;
} else {
$level = CODENDI_PURIFIER_BASIC;
}
$commentText = $hp->purify(util_unconvert_htmlspecialchars($value), $level, $groupId);
}
return $commentText;
}
}
开发者ID:nterray,项目名称:tuleap,代码行数:35,代码来源:Artifact.class.php
示例8: exit_error
if (permission_exist('DOCUMENT_READ', $docid)) {
if (!permission_is_authorized('DOCUMENT_READ', $docid, user_getid(), $object_group_id)) {
exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
}
} else {
if (!permission_is_authorized('DOCGROUP_READ', $row['doc_group'], user_getid(), $object_group_id)) {
exit_error($Language->getText('global', 'perm_denied'), $Language->getText('global', 'error_perm_denied'));
}
}
if (user_isloggedin()) {
//Insert a new entry in the doc_log table only for restricted documents
$sql = "INSERT INTO doc_log(user_id,docid,time) " . "VALUES ('" . user_getid() . "','" . $docid . "','" . time() . "')";
$res_insert = db_query($sql);
}
// HTML or text files that were copy/pasted are displayed in a Codendi-formatted page.
// Uploaded files are always displayed as-is.
if (($row['filetype'] == 'text/html' || $row['filetype'] == 'text/plain') && $row['filesize'] == 0) {
docman_header(array('title' => $row['title'], 'help' => 'DocumentManager.html'));
if ($object_group_id != $from_group_id) {
$group_name = util_get_group_name_from_id($object_group_id);
print '<H3><span class="feedback">' . $Language->getText('docman_display_doc', 'warning_different_group', array($group_name)) . '</span></H3>';
}
// Document data can now contain HTML tags but not php code
print util_unconvert_htmlspecialchars($row['data']);
docman_footer($params);
} else {
session_redirect("/docman/download.php?docid=" . $docid);
}
} else {
exit_error($Language->getText('global', 'error'), $Language->getText('docman_display_doc', 'error_wrongid'));
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:display_doc.php
示例9: frs_display_release_form
//.........这里部分代码省略.........
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="<? echo $GLOBALS['sys_max_size_upload']; ?>">
<input type="hidden" name="postReceived" value="" />
<?php
if ($release->getReleaseId()) {
echo '<input type="hidden" id="release_id" name="release[release_id]" value="' . $release->getReleaseId() . '" />';
}
?>
<TABLE BORDER="0" width="100%">
<TR><TD><FIELDSET><LEGEND><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'fieldset_properties');
?>
</LEGEND>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editpackages', 'p_name');
?>
:</B>
</TD>
<TD>
<?php
$res =& $frspf->getFRSPackagesFromDb($group_id);
$rows = count($res);
if (!$res || $rows < 1) {
echo '<p class="highlight">' . $GLOBALS['Language']->getText('file_admin_qrs', 'no_p_available') . '</p>';
} else {
echo '<SELECT NAME="release[package_id]" id="package_id">';
for ($i = 0; $i < $rows; $i++) {
echo '<OPTION VALUE="' . $res[$i]->getPackageID() . '"';
if ($res[$i]->getPackageID() == $release->getPackageId()) {
echo ' selected';
}
echo '>' . $hp->purify(util_unconvert_htmlspecialchars($res[$i]->getName()), CODENDI_PURIFIER_CONVERT_HTML) . '</OPTION>';
}
echo '</SELECT>';
}
?>
</TD><td></td>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'release_name');
?>
: <span class="highlight"><strong>*</strong></span></B>
</TD>
<TD>
<INPUT TYPE="TEXT" id="release_name" name="release[name]" onBlur="update_news()" value="<?php
echo $hp->purify($release->getName());
?>
">
</TD>
</TR>
<TR>
<TD>
<B><?php
echo $GLOBALS['Language']->getText('file_admin_editreleases', 'release_date');
?>
:</B>
</TD>
<TD>
<?php
echo $GLOBALS['HTML']->getDatePicker('release_date', 'release[date]', isset($release_date) ? $hp->purify($release_date) : format_date('Y-m-d', $release->getReleaseDate()));
?>
</TD>
<td></td>
<TD>
开发者ID:rinodung,项目名称:tuleap,代码行数:67,代码来源:file_utils.php
示例10: unconvertHTMLSpecialChars
/**
* Retrieves the converted HTML special characters
*
* @param String $name
*
* @return String
*/
function unconvertHTMLSpecialChars($name)
{
return util_unconvert_htmlspecialchars($this->convertName($name));
}
开发者ID:nterray,项目名称:tuleap,代码行数:11,代码来源:WebDAVUtils.class.php
示例11: __construct
public function __construct(Project $project)
{
$this->project_name = util_unconvert_htmlspecialchars($project->getPublicName());
$this->project_uri = '/projects/' . $project->getUnixName();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:NavBarProjectPresenter.class.php
示例12: Graph
$ydata2[$i] = 0;
$i = 1;
$xdata[$i] = $i;
$xlabel[$i] = $month . "-" . $day + 1;
$ydata1[$i] = 0;
$ydata2[$i] = 0;
$i = 2;
}
$graph = new Graph(600, 350);
$graph->addDebug("We appended {$i} rows of data to the graphing set.");
$graph->addDebug("{$begin_time}");
$graph->addDebug("{$sql}");
$data1 = $graph->AddData($xdata, $ydata1, $xlabel);
$data2 = $graph->AddData($xdata, $ydata2, $xlabel);
$graph->DrawGrid('gray');
$graph->LineGraph($data1, 'red');
$graph->LineGraph($data2, 'blue');
$pm = ProjectManager::instance();
$graph->SetTitle("Codendi Statistics: " . util_unconvert_htmlspecialchars($pm->getProject($group_id)->getPublicName()));
$graph->SetSubTitle("Page Views (red) and Downloads (blue) for the past {$i} days");
$graph->SetxTitle('Date');
$graph->SetyTitle('Views (red) / Downloads (blue)');
$graph->DrawAxis();
//$graph->showDebug();
// If PHP3 then assume GD library < 1.6 with only GIF Support
// if PHP4 then we have GD library >= 1.6 with only PNG Support
if (substr(phpversion(), 0, 1) == "3") {
$graph->ShowGraph('gif');
} else {
$graph->ShowGraph('png');
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:stats_graph.php
示例13: getUnconvertedPublicName
public function getUnconvertedPublicName()
{
return util_unconvert_htmlspecialchars($this->data_array['group_name']);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:Group.class.php
示例14: _set_doesnot_belong_to_project_error
function _set_doesnot_belong_to_project_error($item, $group)
{
$this->feedback->log('warning', $GLOBALS['Language']->getText('plugin_docman', 'item_does_not_belong', array($item->getId(), util_unconvert_htmlspecialchars($group->getPublicName()))));
$this->_viewParams['redirect_to'] = str_replace('group_id=' . $this->request->get('group_id'), 'group_id=' . $item->getGroupId(), $_SERVER['REQUEST_URI']);
$this->view = 'Redirect';
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:6,代码来源:Docman_HTTPController.class.php
示例15: projectName
public function projectName()
{
return util_unconvert_htmlspecialchars($this->project_name);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:ContainerPresenter.class.php
示例16: displayCreateTrackerFromTemplate
/**
*
*
*/
function displayCreateTrackerFromTemplate($requested_create_mode, Project $project, Tracker $tracker_template = null)
{
$hp = Codendi_HTMLPurifier::instance();
$GLOBALS['Response']->includeFooterJavascriptFile(TRACKER_BASE_URL . '/scripts/TrackerTemplateSelector.js');
$GLOBALS['Response']->includeFooterJavascriptFile(TRACKER_BASE_URL . '/scripts/TrackerCheckUgroupConsistency.js');
$js = '';
$trackers = $this->getTrackerFactory()->getTrackersByGroupId(100);
foreach ($trackers as $tracker) {
$js .= '<option value="' . $tracker->getId() . '">' . $hp->purify($tracker->getName()) . '</option>';
}
$js = "codendi.tracker.defaultTemplates = '" . $hp->purify($js, CODENDI_PURIFIER_JS_QUOTE) . "';";
$GLOBALS['Response']->includeFooterJavascriptSnippet($js);
$gf = new GroupFactory();
$radio = $this->getCreateTrackerRadio('gallery', $requested_create_mode);
echo '<h3><label>' . $radio . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'from_tmpl') . '</label></h3>';
//
echo '<div class="tracker_create_mode">';
echo '<noscript>Project Id: <input type="text" name="group_id_template" value=""><br/>Tracker Id: <input type="text" name="atid_template" value=""></noscript>';
echo '<table>';
echo '<tr>';
echo '<th align="left">' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_prj') . '</th>';
echo '<th align="left">' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_trk') . '</th>';
echo '</tr>';
echo '<tr>';
echo '<td valign="top">';
$group_id_template = 100;
$atid_template = -1;
if ($tracker_template) {
$group_id_template = $tracker_template->getProject()->getID();
$atid_template = $tracker_template->getId();
}
$selectedHtml = 'selected="selected"';
echo '<select name="group_id_template" size="15" id="tracker_new_project_list" autocomplete="off">';
echo '<option value="100" ' . ($group_id_template == 100 ? $selectedHtml : '') . '>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_prj_default') . '</option>';
echo '<optgroup label="' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_prj_my') . '">';
$project_selected = false;
$results = $gf->getMemberGroups();
while ($row = db_fetch_array($results)) {
$selected = '';
if ($group_id_template == $row['group_id']) {
$selected = $selectedHtml;
$project_selected = true;
}
echo '<option value="' . $hp->purify($row['group_id']) . '" ' . ($group_id_template == $row['group_id'] ? $selectedHtml : '') . '>' . $hp->purify(util_unconvert_htmlspecialchars($row['group_name'])) . '</option>';
}
echo '</optgroup>';
$hide = 'style="display:none;"';
$other = '';
if ($tracker_template && !$project_selected) {
$hide = '';
$other .= '<option value="' . (int) $tracker_template->getProject()->getID() . '" ' . $selectedHtml . '>';
$other .= $hp->purify(util_unconvert_htmlspecialchars($tracker_template->getProject()->getPublicName()), CODENDI_PURIFIER_CONVERT_HTML);
$other .= '</option>';
}
echo '<optgroup id="tracker_new_other" ' . $hide . ' label="' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_prj_other') . '">';
echo $other;
echo '</optgroup>';
echo '</select>';
echo '<br/>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_autocomplete_desc') . '<br /><input type="text" name="tracker_new_prjname" id="tracker_new_prjname" placeholder="' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_autocomplete_hint') . '" />';
echo '</td>';
echo '<td valign="top">';
echo '<select name="atid_template" size="15" id="tracker_list_trackers_from_project">';
$trackers = $this->getTrackerFactory()->getTrackersByGroupId($group_id_template);
if (count($trackers) > 0) {
foreach ($trackers as $tracker) {
echo '<option value="' . $tracker->getId() . '" ' . ($atid_template == $tracker->getId() ? $selectedHtml : '') . '>' . $hp->purify($tracker->getName()) . '</option>';
}
} else {
echo '<option>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tmpl_src_no_trk') . '</option>';
}
echo '</select>';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
}
开发者ID:blestab,项目名称:tuleap,代码行数:80,代码来源:TrackerManager.class.php
示例17: htmlentities
$no_rows = 1;
echo '<H2>' . $Language->getText('search_index', 'no_match_found', htmlentities(stripslashes($words), ENT_QUOTES, 'UTF-8')) . '</H2>';
echo db_error();
// echo $sql;
} else {
if ($rows_returned > 25) {
$rows = 25;
}
echo '<H3>' . $Language->getText('search_index', 'search_res', array(htmlentities(stripslashes($words), ENT_QUOTES, 'UTF-8'), $rows_returned)) . "</H3><P>\n\n";
$title_arr = array();
$title_arr[] = $Language->getText('search_index', 'project_name');
$title_arr[] = $Language->getText('search_index', 'description');
echo html_build_list_table_top($title_arr);
echo "\n";
for ($i = 0; $i < $rows; $i++) {
print "<TR class=\"" . html_get_alt_row_color($i) . "\"><TD><A HREF=\"/projects/" . db_result($result, $i, 'unix_group_name') . "/\">" . "<IMG SRC=\"" . util_get_image_theme('msg.png') . "\" BORDER=0 HEIGHT=12 WIDTH=10> " . db_result($result, $i, 'group_name') . "</A></TD>" . "<TD>" . $hp->purify(util_unconvert_htmlspecialchars(db_result($result, $i, 'short_description')), CODENDI_PURIFIER_LIGHT) . "</TD></TR>\n";
}
echo "</TABLE>\n";
}
} else {
if ($type_of_search == "people") {
/*
If multiple words, separate them and put LIKE in between
*/
$array = explode(" ", $words);
$words1 = implode($array, "%' {$crit} user_name LIKE '%");
$words2 = implode($array, "%' {$crit} realname LIKE '%");
/*
Query to find users
*/
$sql = "SELECT user_name,user_id,realname " . "FROM user " . "WHERE ((user_name LIKE '%{$words1}%') OR (realname LIKE '%{$words2}%')) AND ((status='A') OR (status='R')) ORDER BY user_name LIMIT {$offset},26";
开发者ID:nickl-,项目名称:tuleap,代码行数:31,代码来源:index.php
示例18: mailFollowup
/**
* mailFollowup - send out an email update for this artifact.
*
* @param int (1) initial/creation (2) update.
* @param array Array of additional addresses to mail to.
* @param array Array of fields changed in this update .
* @access private.
* @return boolean success.
*/
function mailFollowup($type, $more_addresses = false, $changes = '')
{
if (!$changes) {
$changes = array();
}
$sess = session_get_user();
if ($type == 1) {
// Initial opening
if ($sess) {
$body = $this->ArtifactType->getName() . " item #" . $this->getID() . ", was opened at " . date(_('Y-m-d H:i'), $this->getOpenDate()) . " by " . $sess->getRealName();
} else {
$body = $this->ArtifactType->getName() . " item #" . $this->getID() . ", was opened at " . date(_('Y-m-d H:i'), $this->getOpenDate());
}
} else {
if ($sess) {
$body = $this->ArtifactType->getName() . " item #" . $this->getID() . ", was changed at " . date(_('Y-m-d H:i'), $this->getOpenDate()) . " by " . $sess->getRealName();
} else {
$body = $this->ArtifactType->getName() . " item #" . $this->getID() . ", was changed at " . date(_('Y-m-d H:i'), $this->getOpenDate());
}
}
$body .= "\nYou can respond by visiting: " . "\n" . util_make_url('/tracker/?func=detail&atid=' . $this->ArtifactType->getID() . "&aid=" . $this->getID() . "&group_id=" . $this->ArtifactType->Group->getID()) . "\nOr by replying to this e-mail entering your response between the following markers: " . "\n" . ARTIFACT_MAIL_MARKER . "\n(enter your response here)" . "\n" . ARTIFACT_MAIL_MARKER . "\n\n" . $this->marker('status', $changes) . "Status: " . $this->getStatusName() . "\n" . $this->marker('priority', $changes) . "Priority: " . $this->getPriority() . "\n" . "Submitted By: " . $this->getSubmittedRealName() . " (" . $this->getSubmittedUnixName() . ")" . "\n" . $this->marker('assigned_to', $changes) . "Assigned to: " . $this->getAssignedRealName() . " (" . $this->getAssignedUnixName() . ")" . "\n" . $this->marker('summary', $changes) . "Summary: " . util_unconvert_htmlspecialchars($this->getSummary()) . " \n";
// Now display the extra fields
$efd = $this->getExtraFieldDataText();
foreach ($efd as $efid => $ef) {
$body .= $this->marker('extra_fields', $changes, $efid);
$body .= $ef["name"] . ": " . $ef["value"] . "\n";
}
$subject = '[' . $this->ArtifactType->Group->getUnixName() . '-' . $this->ArtifactType->getName() . '][' . $this->getID() . '] ' . util_unconvert_htmlspecialchars($this->getSummary());
if ($type > 1) {
// get all the email addresses that are monitoring this request or the ArtifactType
$monitor_ids =& $this->getMonitorIds();
} else {
// initial creation, we just get the users monitoring the ArtifactType
$monitor_ids =& $this->ArtifactType->getMonitorIds();
}
$emails = array();
if ($more_addresses) {
$emails[] = $more_addresses;
}
//we don't email the current user
if ($this->getAssignedTo() != user_getid()) {
$monitor_ids[] = $this->getAssignedTo();
}
if ($this->getSubmittedBy() != user_getid()) {
$monitor_ids[] = $this->getSubmittedBy();
}
//initial submission
if ($type == 1) {
//if an email is set for this ArtifactType
//add that address to the BCC: list
if ($this->ArtifactType->getEmailAddress()) {
$emails[] = $this->ArtifactType->getEmailAddress();
}
} else {
//update
if ($this->ArtifactType->emailAll()) {
$emails[] = $this->ArtifactType->getEmailAddress();
}
}
$body .= "\n\nInitial Comment:" . "\n" . util_unconvert_htmlspecialchars($this->getDetails()) . "\n\n----------------------------------------------------------------------";
if ($type > 1) {
/*
Now include the followups
*/
$result2 = $this->getMessages();
$rows = db_numrows($result2);
if ($result2 && $rows > 0) {
for ($i = 0; $i < $rows; $i++) {
//
// for messages posted by non-logged-in users,
// we grab the email they gave us
//
// otherwise we use the confirmed one from the users table
//
if (db_result($result2, $i, 'user_id') == 100) {
$emails[] = db_result($result2, $i, 'from_email');
} else {
$monitor_ids[] = db_result($result2, $i, 'user_id');
}
$body .= "\n\n";
if ($i == 0) {
$body .= $this->marker('details', $changes);
}
$body .= "Comment By: " . db_result($result2, $i, 'realname') . " (" . db_result($result2, $i, 'user_name') . ")" . "\nDate: " . date(_('Y-m-d H:i'), db_result($result2, $i, 'adddate')) . "\n\nMessage:" . "\n" . util_unconvert_htmlspecialchars(db_result($result2, $i, 'body')) . "\n\n----------------------------------------------------------------------";
}
}
}
$body .= "\n\nYou can respond by visiting: " . "\n" . util_make_url('/tracker/?func=detail&atid=' . $this->ArtifactType->getID() . "&aid=" . $this->getID() . "&group_id=" . $this->ArtifactType->Group->getID());
//only send if some recipients were found
if (count($emails) < 1 && count($monitor_ids) < 1) {
return true;
//.........这里部分代码省略.........
开发者ID:neymanna,项目名称:fusionforge,代码行数:101,代码来源:Artifact.class.php
示例19: prepare_textarea
function prepare_textarea($textarea)
{
// Turn all HTML entities in ASCII and remove all \r characters
// because even MS Office apps don't like it in text cells (Excel)
return str_replace(chr(13), "", util_unconvert_htmlspecialchars($textarea));
}
开发者ID:rinodung,项目名称:tuleap,代码行数:6,代码来源:project_export_utils.php
示例20: project_backlog
public function project_backlog()
{
return $GLOBALS['Language']->getText('plugin_agiledashboard', 'project_backlog', util_unconvert_htmlspecialchars($this->project_name));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:HomePresenter.class.php
注:本文中的util_unconvert_htmlspecialchars函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论