commit 021a708929d8ce829c6933c622bfb3b27bd7299f Author: fago Date: Mon Dec 3 14:44:43 2012 +0100 Test fixes diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php index 7dfb02e..60cb474 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php @@ -99,6 +99,7 @@ protected function getNewEntityValues($langcode) { * Tests translate link on comment content admin page. */ function testTranslateLinkCommentAdminPage() { + $this->drupalCreateContentType(array('type' => 'page', 'name' => 'page')); $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer comments', 'translate any entity')); $this->drupalLogin($this->admin_user); diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index 906a2c9..182d63c 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -627,28 +627,30 @@ function rdf_preprocess_user_profile(&$variables) { $variables['attributes']['typeof'] = $account->rdf_mapping['rdftype']; $variables['attributes']['about'] = url($uri['path'], $uri['options']); } - // Adds the relationship between the sioc:UserAccount and the foaf:Person who - // holds the account. - $account_holder_meta = array( - '#tag' => 'meta', - '#attributes' => array( - 'about' => url($uri['path'], array_merge($uri['options'], array('fragment' => 'me'))), - 'typeof' => array('foaf:Person'), - 'rel' => array('foaf:account'), - 'resource' => url($uri['path'], $uri['options']), - ), - ); - // Adds the markup for username. - $username_meta = array( - '#tag' => 'meta', - '#attributes' => array( - 'about' => url($uri['path'], $uri['options']), - 'property' => $account->rdf_mapping['name']['predicates'], - 'content' => $account->name, - ) - ); - drupal_add_html_head($account_holder_meta, 'rdf_user_account_holder'); - drupal_add_html_head($username_meta, 'rdf_user_username'); + // If we are on the user account page, add the relationship between the + // sioc:UserAccount and the foaf:Person who holds the account. + if (current_path() == $uri['path']) { + $account_holder_meta = array( + '#tag' => 'meta', + '#attributes' => array( + 'about' => url($uri['path'], array_merge($uri['options'], array('fragment' => 'me'))), + 'typeof' => array('foaf:Person'), + 'rel' => array('foaf:account'), + 'resource' => url($uri['path'], $uri['options']), + ), + ); + // Adds the markup for username. + $username_meta = array( + '#tag' => 'meta', + '#attributes' => array( + 'about' => url($uri['path'], $uri['options']), + 'property' => $account->rdf_mapping['name']['predicates'], + 'content' => $account->name, + ) + ); + drupal_add_html_head($account_holder_meta, 'rdf_user_account_holder'); + drupal_add_html_head($username_meta, 'rdf_user_username'); + } } /** diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php index 538bb06..07e19c1 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php @@ -47,8 +47,8 @@ protected function buildPropertyQuery(QueryInterface $entity_query, array $value * @return array * An array of entity objects implementing the EntityInterface. */ - protected function mapFromStorageRecords(array $records) { - $property_values = $this->getPropertyValues($records); + protected function mapFromStorageRecords(array $records, $load_revision = FALSE) { + $property_values = $this->getPropertyValues($records, $load_revision); foreach ($records as $id => $record) { $values = $property_values[$id];