Mercurial > hg > rr-repo
comparison sites/all/modules/link/link.diff.inc @ 4:ce11bbd8f642
added modules
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 19 Sep 2013 10:38:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:b28be78d8160 | 4:ce11bbd8f642 |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Provide diff field functions for the Link module. | |
6 */ | |
7 | |
8 /** | |
9 * Diff field callback for parsing link fields comparative values. | |
10 */ | |
11 function link_field_diff_view($items, $context) { | |
12 $diff_items = array(); | |
13 foreach ($items as $delta => $item) { | |
14 if ($item['url'] && $item['title']) { | |
15 $diff_items[$delta] = $item['title'] . ' (' . $item['url'] . ')'; | |
16 } | |
17 else { | |
18 $diff_items[$delta] = $item['title'] . $item['url']; | |
19 } | |
20 } | |
21 return $diff_items; | |
22 } |