Commit eb9e6bc9 authored by Joakim Schramm's avatar Joakim Schramm

Mostly cosmetic, ran module through Coder.

parent e305895a
......@@ -63,8 +63,8 @@ function bloginfo_block($op = 'list', $delta = 0, $edit = array()) {
return $blocks;
}
else if ($op == 'view') {
switch($delta) {
case 'bloginfo':
switch ($delta) {
case 'bloginfo':
if ($node = menu_get_object());
if (((arg(0) == 'blog' && is_numeric(arg(1))) || $node->type == 'blog')) {
if (arg(0) == 'blog') $authorid = arg(1);
......@@ -79,7 +79,7 @@ function bloginfo_block($op = 'list', $delta = 0, $edit = array()) {
}
}
break;
case 'blogroll':
case 'blogroll':
$results = db_query("SELECT uid, title FROM {bloginfo} WHERE title <> '' ORDER BY title ASC");
while ($item = db_fetch_array($results)) {
$output[] = l($item['title'], 'blog/'. $item['uid']);
......@@ -87,7 +87,7 @@ function bloginfo_block($op = 'list', $delta = 0, $edit = array()) {
$block['subject'] = t('Blog Listing');
$block['content'] = theme('item_list', $output);
return $block;
break;
break;
}
}
}
......@@ -102,14 +102,14 @@ function bloginfo_link_alter(&$links, $node) {
if ($count == 1) {
$results = db_query("SELECT title, description, format FROM {bloginfo} WHERE uid = %d", $node->uid);
$bloginfo = db_fetch_object($results);
$link['title'] = strlen($bloginfo->title) ? $bloginfo->title : $link['title'];
$link['title'] = drupal_strlen($bloginfo->title) ? $bloginfo->title : $link['title'];
}
}
}
}
/**
* Implementation of hook_theme()
* Implementation of hook_theme().
*/
function bloginfo_theme() {
return array(
......@@ -189,7 +189,7 @@ function bloginfo_page_user($account) {
$results = db_query("SELECT title, description, format FROM {bloginfo} WHERE uid = %d", $account->uid);
$bloginfo = db_fetch_object($results);
if (strlen($bloginfo->title)) {
if (drupal_strlen($bloginfo->title)) {
drupal_set_title($bloginfo->title);
}
}
......@@ -217,7 +217,7 @@ function bloginfo_feed_user($account) {
$results = db_query("SELECT title, description, format FROM {bloginfo} WHERE uid = %d", $account->uid);
$bloginfo = db_fetch_object($results);
$channel['title'] = strlen($bloginfo->title) ? $bloginfo->title : $channel['title'];
$channel['title'] = drupal_strlen($bloginfo->title) ? $bloginfo->title : $channel['title'];
$channel['description'] = $bloginfo->description;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment