Commit 89a813c7 authored by Crell's avatar Crell
Browse files

Merge branch '8.x' into 1400748-namespaces

parents 808c88bd b989d0cc
......@@ -928,6 +928,6 @@ class FeedParserTestCase extends AggregatorTestCase {
aggregator_refresh($feed);
$this->drupalGet('aggregator/sources/' . $feed->fid);
$this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
$this->assertText("Quote" Amp&");
$this->assertRaw("Quote" Amp&");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<rss version="0.91">
<channel>
<title>Example with Entities</title>
<link>http://example.com</link>
<description>Example RSS Feed With HTML Entities in Title</description>
<language>en-us</language>
<item>
<title>Quote&quot; Amp&amp;</title>
<link>http://example.com/example-turns-one</link>
<description>Some text.</description>
</item>
</channel>
</rss>
......@@ -1672,7 +1672,7 @@ function comment_forms() {
* @ingroup forms
*/
function comment_form($form, &$form_state, $comment) {
global $user;
global $user, $language_content;
// During initial form build, add the comment entity to the form state for
// use during form building and processing. During a rebuild, use what is in
......@@ -1833,11 +1833,22 @@ function comment_form($form, &$form_state, $comment) {
);
// Add internal comment properties.
foreach (array('cid', 'pid', 'nid', 'language', 'uid') as $key) {
foreach (array('cid', 'pid', 'nid', 'uid') as $key) {
$form[$key] = array('#type' => 'value', '#value' => $comment->$key);
}
$form['node_type'] = array('#type' => 'value', '#value' => 'comment_node_' . $node->type);
// If a content type has multilingual support we set the comment to inherit the
// content language. Otherwise mark the comment as language neutral.
$comment_langcode = $comment->language;
if (($comment_langcode == LANGUAGE_NONE) && variable_get('language_content_type_' . $node->type, 0)) {
$comment_langcode = $language_content->langcode;
}
$form['language'] = array(
'#type' => 'value',
'#value' => $comment_langcode,
);
// Only show the save button if comment previews are optional or if we are
// already previewing the submission.
$form['actions'] = array('#type' => 'actions');
......
......@@ -977,13 +977,12 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
$negotiation = variable_get("language_negotiation_$type", array());
foreach ($negotiation as $id => $provider) {
if (isset($provider['callbacks']['url_rewrite'])) {
if (isset($provider['file'])) {
require_once DRUPAL_ROOT . '/' . $provider['file'];
}
// Avoid duplicate callback entries.
if (isset($provider['callbacks']['url_rewrite'])) {
$callbacks[$provider['callbacks']['url_rewrite']] = NULL;
$callbacks[$provider['callbacks']['url_rewrite']] = TRUE;
}
}
}
......@@ -1002,18 +1001,6 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function locale_form_comment_form_alter(&$form, &$form_state, $form_id) {
// If a content type has multilingual support we set the content language as
// comment language.
if ($form['language']['#value'] == LANGUAGE_NONE && locale_multilingual_node_type($form['#node']->type)) {
global $language_content;
$form['language']['#value'] = $language_content->langcode;
}
}
/**
* Implements hook_form_FORM_ID_alter() for language_admin_overview_form().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment