Skip to content

Commit

Permalink
Add node ID to search and prettyDestination.
Browse files Browse the repository at this point in the history
  • Loading branch information
torotil committed Jan 18, 2018
1 parent b101e3c commit aac3863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion campaignion_action/src/Redirects/Redirect.php
Expand Up @@ -149,7 +149,7 @@ public function toArray() {
$data['prettyDestination'] = $data['destination'];
if (substr($data['destination'], 0, 5) == 'node/') {
if ($node = menu_get_object('node', 1, $data['destination'])) {
$data['prettyDestination'] = $node->title;
$data['prettyDestination'] = "{$node->title} [{$node->nid}]";
}
}

Expand Down
2 changes: 1 addition & 1 deletion campaignion_wizard/campaignion_wizard.module
Expand Up @@ -96,7 +96,7 @@ function campaignion_wizard_search_nodes() {
foreach ($result as $row) {
$data[] = [
'value' => 'node/' . $row->nid,
'label' => $row->title,
'label' => "{$row->title} [{$row->nid}]",
];
}
return ['values' => $data];
Expand Down

0 comments on commit aac3863

Please sign in to comment.