diff options
Diffstat (limited to 'modules/rdf')
-rw-r--r-- | modules/rdf/rdf.module | 2 | ||||
-rw-r--r-- | modules/rdf/rdf.test | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/rdf/rdf.module b/modules/rdf/rdf.module index ebe427724..edd4f1007 100644 --- a/modules/rdf/rdf.module +++ b/modules/rdf/rdf.module @@ -423,6 +423,7 @@ function rdf_preprocess_node(&$variables) { if (isset($variables['content']['links']['comment']['#links']['comment_comments'])) { $comment_count_attributes['property'] = $variables['node']->rdf_mapping['comment_count']['predicates']; $comment_count_attributes['content'] = $variables['node']->comment_count; + $comment_count_attributes['datatype'] = $variables['node']->rdf_mapping['comment_count']['datatype']; $variables['content']['links']['comment']['#links']['comment_comments']['attributes'] += $comment_count_attributes; } // In full node view, the number of comments is not displayed by @@ -434,6 +435,7 @@ function rdf_preprocess_node(&$variables) { 'about' => $variables['node_url'], 'property' => $variables['node']->rdf_mapping['comment_count']['predicates'], 'content' => $variables['node']->comment_count, + 'datatype' => $variables['node']->rdf_mapping['comment_count']['datatype'], ), ); drupal_add_html_head($element, 'rdf_node_comment_count'); diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test index 1a41b96cf..e507e3f31 100644 --- a/modules/rdf/rdf.test +++ b/modules/rdf/rdf.test @@ -400,7 +400,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase { } // Tests whether the property has been set for number of comments. - $tracker_replies = $this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '0')]"); + $tracker_replies = $this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '0') and @datatype='xsd:integer']"); $this->assertTrue($tracker_replies, t('Num replies property and content attributes found on @user content.', array('@user'=> $user))); // Tests that the appropriate RDFa markup to annotate the latest activity |