summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-05-12 12:27:55 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-05-12 12:28:21 +0000
commit56406e41211e7099bf7542c1504db941ca39f694 (patch)
tree693dce18020cc3f704325619f1c544193b6a4d79
parent8452c879249655aeb8284b849169176c087f0c79 (diff)
downloadapk_browser-56406e41211e7099bf7542c1504db941ca39f694.tar.bz2
apk_browser-56406e41211e7099bf7542c1504db941ca39f694.tar.xz
some small code cleanups
-rw-r--r--apk_browser.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/apk_browser.module b/apk_browser.module
index 3e89a62..6527fc0 100644
--- a/apk_browser.module
+++ b/apk_browser.module
@@ -593,7 +593,7 @@ function apk_browser_origin_list() {
//Get a loaded object from a router item.
$node = menu_get_object();
//Some older packages are missing origin field.
- if (isset($node->apk_origin)) {
+ if (isset($node->apk_origin['und'])) {
$rows = db_query("
SELECT node.title
FROM {node}
@@ -685,14 +685,14 @@ function apk_browser_block_view($delta = '') {
case 'apk_browser_origin':
$origin = apk_browser_origin_list();
if ($origin) {
- $block['subject'] = t('Same origin');
+ $block['subject'] = t('Subpackages');
$block['content'] = $origin;
}
break;
case 'apk_browser_reverse_depends':
$revdep = apk_browser_reverse_depends();
if ($revdep) {
- $block['subject'] = t('Reverse dependencies');
+ $block['subject'] = t('Required by');
$block['content'] = $revdep;
}
}
@@ -700,7 +700,7 @@ function apk_browser_block_view($delta = '') {
if ((isset($origin)) || (isset($revdep))) {
drupal_add_js($js, 'inline');
}
- return ($block['content']) ? $block : FALSE;
+ return (isset($block['content'])) ? $block : FALSE;
}
// If possible convert the maintainer field to a valid email address