Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php |
— | — | @@ -63,13 +63,14 @@ |
64 | 64 | $captions = $this->getTypeCaptions(); |
65 | 65 | reset($captions); |
66 | 66 | foreach ($this->getTypeLabels() as $type) { |
67 | | - $caption = next($captions); |
| 67 | + $caption = current($captions); |
68 | 68 | if ($first) { |
69 | 69 | $first = false; |
70 | 70 | } else { |
71 | 71 | $result .= ', '; |
72 | 72 | } |
73 | 73 | $result .= '[[' . $typenamespace . ':' . $type . '|' . $caption . ']]'; |
| 74 | + next($captions); |
74 | 75 | } |
75 | 76 | return $result; |
76 | 77 | } |
— | — | @@ -93,14 +94,17 @@ |
94 | 95 | } |
95 | 96 | $result = ''; |
96 | 97 | $first = true; |
| 98 | + reset($captions); |
97 | 99 | foreach ($this->getTypeLabels() as $type) { |
| 100 | + $caption = current($captions); |
98 | 101 | if ($first) { |
99 | 102 | $first = false; |
100 | 103 | } else { |
101 | 104 | $result .= ', '; |
102 | 105 | } |
103 | 106 | $title = Title::newFromText($type, SMW_NS_TYPE); |
104 | | - $result .= $linker->makeLinkObj( $title, $type); |
| 107 | + $result .= $linker->makeLinkObj( $title, $caption); |
| 108 | + next($captions); |
105 | 109 | } |
106 | 110 | return $result; |
107 | 111 | } |