summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-04-21 11:02:21 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2011-04-21 11:02:21 +0200
commita5e76d3d8583250a0e2047bb432ac47ea697ebdb (patch)
treed7c3c2c128ba962b75d8e88ac7dca21e14195cb7
parent333209b874dd4f1aaaed83f5df96e1ae8194d2e4 (diff)
downloadalpine_drupal_theme-a5e76d3d8583250a0e2047bb432ac47ea697ebdb.tar.bz2
alpine_drupal_theme-a5e76d3d8583250a0e2047bb432ac47ea697ebdb.tar.xz
package listing cleanup
remove operators from url of depends only show depends if they exist else show none
-rw-r--r--templates/node--apk.tpl.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/templates/node--apk.tpl.php b/templates/node--apk.tpl.php
index 7413e27..92b090e 100644
--- a/templates/node--apk.tpl.php
+++ b/templates/node--apk.tpl.php
@@ -35,17 +35,19 @@
<th>Dependencies</th>
<td>
<?php
- foreach ($node->apk_depends['und'] as $key => $depend) {
- print '<p>'.l($depend['value'],
- 'apk/'.
- $node->taxonomy_apk_repo['und']['0']['taxonomy_term']->name.'/'.
- $node->taxonomy_apk_arch['und']['0']['taxonomy_term']->name.'/'.
- $depend['value'],
- array()).'</p>';
+ if (isset($node->apk_depends['und'])) {
+ foreach ($node->apk_depends['und'] as $key => $depend) {
+ $value = trim($depend['value'], '!');
+ $value = preg_split("/[<>=]/", $value);
+ print '<p>' . l($depend['value'], 'apk/' .
+ $node->taxonomy_apk_repo['und']['0']['taxonomy_term']->name . '/' .
+ $node->taxonomy_apk_arch['und']['0']['taxonomy_term']->name . '/' .
+ $value[0], array()) . '</p>';
+ }
+ } else {
+ print '<p>None</p>';
}
?>
</td>
</tr>
</table>
-
-