Commit 0e17d978 authored by alexpott's avatar alexpott

Issue #1160764 by Désiré, Dave Reid, SebCorbin, agentrickard: Fixed URL alias...

Issue #1160764 by Désiré, Dave Reid, SebCorbin, agentrickard: Fixed URL alias load is inconsistent if there are more then one aliases.
parent 8dfea8ef
......@@ -92,6 +92,8 @@ public function load($conditions) {
}
return $select
->fields('url_alias')
->orderBy('pid', 'DESC')
->range(0, 1)
->execute()
->fetchAssoc();
}
......
......@@ -50,6 +50,10 @@ function testCRUD() {
$this->assertEqual($loadedAlias, $alias, format_string('Loaded the expected path with pid %pid.', array('%pid' => $pid)));
}
// Load alias by source path.
$loadedAlias = $aliasStorage->load(array('source' => 'node/1'));
$this->assertEqual($loadedAlias['alias'], 'alias_for_node_1_und', format_string('The last created alias loaded by default.'));
//Update a few aliases
foreach ($aliases as $alias) {
$fields = $aliasStorage->save($alias['source'], $alias['alias'] . '_updated', $alias['langcode'], $alias['pid']);
......
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