aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2009-10-16 11:36:01 -0300
committerSilvio <silvio@socioambiental.org>2009-10-16 11:36:01 -0300
commitbd01eb22beb0996c2da7df622afe48279a22a82c (patch)
treecb2591013f73d7e179fe1805e576922a593a0347
parent065685c0f38240ae2c8e0bc7bdcfc1b66350b07d (diff)
downloadjquery_drawer-bd01eb22beb0996c2da7df622afe48279a22a82c.tar.gz
jquery_drawer-bd01eb22beb0996c2da7df622afe48279a22a82c.tar.bz2
Coding standards
-rw-r--r--jquery_drawer.module19
1 files changed, 10 insertions, 9 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module
index a0a4b01..d03b4b8 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -104,7 +104,7 @@ function theme_jquery_drawer($menu) {
foreach ($menu as $item) {
$link['title'] = $item->name;
- $link['href'] = 'jquery_drawer/' . $item->tid;
+ $link['href'] = 'jquery_drawer/'. $item->tid;
$output .= theme('jquery_drawer_link', $link);
}
@@ -118,7 +118,7 @@ function theme_jquery_drawer($menu) {
/**
* Menu callback.
*/
-function jquery_drawer_page($tid = null) {
+function jquery_drawer_page($tid = NULL) {
// First render all nodes whose parent is $term
$output = '';
@@ -126,7 +126,7 @@ function jquery_drawer_page($tid = null) {
while ($node = db_fetch_object($nodes)) {
$link['title'] = $node->title;
- $link['href'] = 'node/' . $node->nid;
+ $link['href'] = 'node/'. $node->nid;
$output .= theme('jquery_drawer_link', $link);
}
@@ -169,7 +169,7 @@ function jquery_drawer_menu_build($term) {
global $_jquery_drawer_id;
- if ($_jquery_drawer_id == null) {
+ if ($_jquery_drawer_id == NULL) {
$_jquery_drawer_id = 0;
}
@@ -179,16 +179,17 @@ function jquery_drawer_menu_build($term) {
$output .= '<li>';
$output .= $term->name;
if (isset($term->below)) {
- $output .= '<ul id="jquery_drawer[ul][' . $_jquery_drawer_id . ']" class="hidden">';
- foreach($term->below as $child) {
+ $output .= '<ul id="jquery_drawer[ul]['. $_jquery_drawer_id .']" class="hidden">';
+ foreach ($term->below as $child) {
$output .= jquery_drawer_menu_build($child);
}
$output .= '</ul>';
- } else if (isset($term->nodes)) {
- $output .= '<ul id="jquery_drawer[ul][' . $_jquery_drawer_id . ']" class="hidden">';
+ }
+ else if (isset($term->nodes)) {
+ $output .= '<ul id="jquery_drawer[ul]['. $_jquery_drawer_id .']" class="hidden">';
foreach ($term->nodes as $node) {
$output .= '<li>';
- $output .= '<a href="' . $GLOBALS['base_url'] . '/node/' . $node->nid . '">' . $node->title . '</a>';
+ $output .= '<a href="'. $GLOBALS['base_url'] .'/node/'. $node->nid .'">'. $node->title .'</a>';
}
$output .= '</ul>';
$output .= '</li>';