From baaa21e1316354ada6d985a5b799ce17d6255590 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sun, 28 Dec 2003 10:47:33 +0000 Subject: [PATCH] - Tidied up some inconsistencies in the code: scripts/code-style.sh is your friend. --- modules/archive.module | 2 +- modules/archive/archive.module | 2 +- modules/block.module | 5 ++--- modules/block/block.module | 5 ++--- modules/blog.module | 8 ++++---- modules/blog/blog.module | 8 ++++---- modules/comment.module | 2 +- modules/comment/comment.module | 2 +- modules/forum.module | 6 +++--- modules/forum/forum.module | 6 +++--- modules/path.module | 6 +++--- modules/path/path.module | 6 +++--- modules/ping.module | 2 +- modules/ping/ping.module | 2 +- modules/profile.module | 4 ++-- modules/profile/profile.module | 4 ++-- modules/system.module | 2 +- modules/system/system.module | 2 +- modules/taxonomy.module | 12 ++++++++---- modules/taxonomy/taxonomy.module | 12 ++++++++---- modules/user.module | 18 +++++++++--------- modules/user/user.module | 18 +++++++++--------- 22 files changed, 70 insertions(+), 64 deletions(-) diff --git a/modules/archive.module b/modules/archive.module index 59fe4a6ffe0b..6c4218131461 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -253,7 +253,7 @@ function archive_page() { function archive_settings() { - $output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); + $output .= form_select(t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); return $output; } diff --git a/modules/archive/archive.module b/modules/archive/archive.module index 59fe4a6ffe0b..6c4218131461 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -253,7 +253,7 @@ function archive_page() { function archive_settings() { - $output .= form_select( t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); + $output .= form_select(t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered.")); return $output; } diff --git a/modules/block.module b/modules/block.module index 1fa5673ea4f4..9791267f87d8 100644 --- a/modules/block.module +++ b/modules/block.module @@ -168,7 +168,7 @@ function block_admin_display() { $delete = ""; } - $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_radios(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), + $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255), $edit, $delete); } @@ -376,8 +376,7 @@ function block_list($region) { $result = db_query("SELECT * FROM {blocks} WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = %d " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1); while ($result && ($block = db_fetch_array($result))) { - if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && - (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { + if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { /* ** Check the current throttle status and see if block should be displayed diff --git a/modules/block/block.module b/modules/block/block.module index 1fa5673ea4f4..9791267f87d8 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -168,7 +168,7 @@ function block_admin_display() { $delete = ""; } - $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_radios(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), + $rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][custom", 1, $block["custom"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"] ."][". $block["delta"] ."][throttle", 1, $block["throttle"], NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled")), "align" => "center"), form_weight(NULL, $block["module"] ."][". $block["delta"] ."][weight", $block["weight"]), form_radios(NULL, $block["module"] ."][". $block["delta"] ."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"] ."][". $block["delta"] ."][path", $block["path"], 10, 255), $edit, $delete); } @@ -376,8 +376,7 @@ function block_list($region) { $result = db_query("SELECT * FROM {blocks} WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = %d " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1); while ($result && ($block = db_fetch_array($result))) { - if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && - (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { + if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { /* ** Check the current throttle status and see if block should be displayed diff --git a/modules/blog.module b/modules/blog.module index e24f7cb97c83..478449ee173b 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -74,13 +74,13 @@ function blog_help($section) { $output .= "<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>"; $output .= "<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>"; $output .= "<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <b>(b)</b> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>"; - $output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" )); + $output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>")); break; case 'admin/system/modules#description': $output .= t("Enables keeping a blog or easily and regularly updated web page."); break; case 'admin/system/modules/blog': - $output .= t("A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form"); + $output .= t("A weblog is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form"); break; } @@ -123,7 +123,7 @@ function blog_page_user($uid) { $output .= node_view(node_load(array("nid" => $node->nid)), 1); } $output .= theme("pager", NULL, variable_get("default_nodes_main", 10)); - $output .= "<div class=\"xml-icon\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>"; + $output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>"; print theme("page", $output, $title); } @@ -250,7 +250,7 @@ function blog_link($type, $node = 0, $main) { menu("node/add/blog", t("blog entry"), "node_page", 0); } if (user_access("maintain personal blog")) { - menu("blog/" . $user->uid, t("my blog"), "blog_page", 1); + menu("blog/". $user->uid, t("my blog"), "blog_page", 1); } if (user_access("access content")) { menu("blog", t("blogs"), "blog_page", 0, MENU_HIDE); diff --git a/modules/blog/blog.module b/modules/blog/blog.module index e24f7cb97c83..478449ee173b 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -74,13 +74,13 @@ function blog_help($section) { $output .= "<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>"; $output .= "<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>"; $output .= "<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <b>(b)</b> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>"; - $output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>" )); + $output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>")); break; case 'admin/system/modules#description': $output .= t("Enables keeping a blog or easily and regularly updated web page."); break; case 'admin/system/modules/blog': - $output .= t("A weBLOG is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form"); + $output .= t("A weblog is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form"); break; } @@ -123,7 +123,7 @@ function blog_page_user($uid) { $output .= node_view(node_load(array("nid" => $node->nid)), 1); } $output .= theme("pager", NULL, variable_get("default_nodes_main", 10)); - $output .= "<div class=\"xml-icon\">" . l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>"; + $output .= "<div class=\"xml-icon\">". l("<img src=\"". theme("image", "xml.gif") ."\" width=\"36\" height=\"14\" style=\"border: 0px;\" alt=\"\" title=\"\" />", "blog/feed/$account->uid", array("title" => t("View the XML version of %username's blog", array("%username" => $account->name)))) . "</div>"; print theme("page", $output, $title); } @@ -250,7 +250,7 @@ function blog_link($type, $node = 0, $main) { menu("node/add/blog", t("blog entry"), "node_page", 0); } if (user_access("maintain personal blog")) { - menu("blog/" . $user->uid, t("my blog"), "blog_page", 1); + menu("blog/". $user->uid, t("my blog"), "blog_page", 1); } if (user_access("access content")) { menu("blog", t("blogs"), "blog_page", 0, MENU_HIDE); diff --git a/modules/comment.module b/modules/comment.module index 7a24114f4ee3..47ff9e2a6f4f 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -598,7 +598,7 @@ function comment_render($node, $cid = 0) { $result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users", $cid); if ($comment = db_fetch_object($result)) { - $output .= theme("comment_view",$comment, comment_links($comment)); + $output .= theme("comment_view", $comment, comment_links($comment)); } if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 7a24114f4ee3..47ff9e2a6f4f 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -598,7 +598,7 @@ function comment_render($node, $cid = 0) { $result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = 0 GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name, u.data, c.score, c.users", $cid); if ($comment = db_fetch_object($result)) { - $output .= theme("comment_view",$comment, comment_links($comment)); + $output .= theme("comment_view", $comment, comment_links($comment)); } if ((comment_user_can_moderate($node)) && $user->uid != $comment->uid && !(comment_already_moderated($user->uid, $comment->users))) { diff --git a/modules/forum.module b/modules/forum.module index 0fb1722b95ff..a6143cb0faa1 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -334,7 +334,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { $term = taxonomy_get_term($tid); $voc = taxonomy_get_vocabulary($term->vid); - $check_tid = $tid ? "'". check_query($tid). "'" : "NULL"; + $check_tid = $tid ? "'". check_query($tid) ."'" : "NULL"; // show topics with the correct tid, or in the forum but with shadow = 1 // @TODO: this is not ANSI SQL! ("user error: 'n.created' isn't in GROUP BY") @@ -557,7 +557,7 @@ function theme_forum_list($forums, $parents, $tid) { $rows[] = array( array("data" => $description, "class" => "description"), - array("data" => $forum->num_topics . ($new_topics ? "<br />(".t("%a new", array("%a" => $new_topics)).")" : ""), "class" => "topics"), + array("data" => $forum->num_topics . ($new_topics ? "<br />(". t("%a new", array("%a" => $new_topics)) .")" : ""), "class" => "topics"), array("data" => $forum->num_posts, "class" => "posts"), array("data" => ($forum->container ? "" : _forum_format($forum->last_post)), "class" => "last-reply") @@ -598,7 +598,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset $rows[] = array( array("data" => _forum_icon($topic->new, $topic->num_comments, $topic->comment_mode), "class" => "icon"), array("data" => l($topic->title, "node/view/$topic->nid"), "class" => "topic"), - array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(".t("%a new", array("%a" => $topic->new_replies)).")" : ""), "class" => "replies"), + array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(". t("%a new", array("%a" => $topic->new_replies)) .")" : ""), "class" => "replies"), array("data" => _forum_format($topic), "class" => "created"), array("data" => _forum_format($topic->last_reply), "class" => "last-reply") ); diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 0fb1722b95ff..a6143cb0faa1 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -334,7 +334,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { $term = taxonomy_get_term($tid); $voc = taxonomy_get_vocabulary($term->vid); - $check_tid = $tid ? "'". check_query($tid). "'" : "NULL"; + $check_tid = $tid ? "'". check_query($tid) ."'" : "NULL"; // show topics with the correct tid, or in the forum but with shadow = 1 // @TODO: this is not ANSI SQL! ("user error: 'n.created' isn't in GROUP BY") @@ -557,7 +557,7 @@ function theme_forum_list($forums, $parents, $tid) { $rows[] = array( array("data" => $description, "class" => "description"), - array("data" => $forum->num_topics . ($new_topics ? "<br />(".t("%a new", array("%a" => $new_topics)).")" : ""), "class" => "topics"), + array("data" => $forum->num_topics . ($new_topics ? "<br />(". t("%a new", array("%a" => $new_topics)) .")" : ""), "class" => "topics"), array("data" => $forum->num_posts, "class" => "posts"), array("data" => ($forum->container ? "" : _forum_format($forum->last_post)), "class" => "last-reply") @@ -598,7 +598,7 @@ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page, $offset $rows[] = array( array("data" => _forum_icon($topic->new, $topic->num_comments, $topic->comment_mode), "class" => "icon"), array("data" => l($topic->title, "node/view/$topic->nid"), "class" => "topic"), - array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(".t("%a new", array("%a" => $topic->new_replies)).")" : ""), "class" => "replies"), + array("data" => $topic->num_comments . ($topic->new_replies ? "<br />(". t("%a new", array("%a" => $topic->new_replies)) .")" : ""), "class" => "replies"), array("data" => _forum_format($topic), "class" => "created"), array("data" => _forum_format($topic->last_reply), "class" => "last-reply") ); diff --git a/modules/path.module b/modules/path.module index 81f4cd5e511b..29b322da1ffb 100644 --- a/modules/path.module +++ b/modules/path.module @@ -190,9 +190,9 @@ function path_perm() { function path_overview() { $sql = "SELECT * FROM {url_alias}"; $header = array( - array ("data" => t("alias"), "field" => "dst", "sort" => "asc"), - array ("data" => t("normal"), "field" => "src"), - array ("data" => t("operations"), "colspan" => 2) + array("data" => t("alias"), "field" => "dst", "sort" => "asc"), + array("data" => t("normal"), "field" => "src"), + array("data" => t("operations"), "colspan" => 2) ); $sql .= tablesort_sql($header); $result = pager_query($sql, 50); diff --git a/modules/path/path.module b/modules/path/path.module index 81f4cd5e511b..29b322da1ffb 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -190,9 +190,9 @@ function path_perm() { function path_overview() { $sql = "SELECT * FROM {url_alias}"; $header = array( - array ("data" => t("alias"), "field" => "dst", "sort" => "asc"), - array ("data" => t("normal"), "field" => "src"), - array ("data" => t("operations"), "colspan" => 2) + array("data" => t("alias"), "field" => "dst", "sort" => "asc"), + array("data" => t("normal"), "field" => "src"), + array("data" => t("operations"), "colspan" => 2) ); $sql .= tablesort_sql($header); $result = pager_query($sql, 50); diff --git a/modules/ping.module b/modules/ping.module index b2499e65ba9e..3389f0cd559e 100644 --- a/modules/ping.module +++ b/modules/ping.module @@ -4,7 +4,7 @@ function ping_help($section = "admin/help#ping") { $output = ""; - switch($section) { + switch ($section) { case 'admin/help#ping': $output .= "<p>Drupal can pings sites automatically to notify them that your site has changed. It can ping the following sites:</p>"; $output .= "<p>%weblogs, a web site that tracks and displays links to changed weblogs and news-oriented web sites. To get your Drupal site listed, weblogs.com must be informed about your site's updates. This is the job of the ping module and when installed, the administrator doesn't have to do anything to participate in the %weblogs system. The ping module automatically notifies weblogs.com when your site is updated. To do so, Drupal implements the %weblogs-XML.</p>"; diff --git a/modules/ping/ping.module b/modules/ping/ping.module index b2499e65ba9e..3389f0cd559e 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -4,7 +4,7 @@ function ping_help($section = "admin/help#ping") { $output = ""; - switch($section) { + switch ($section) { case 'admin/help#ping': $output .= "<p>Drupal can pings sites automatically to notify them that your site has changed. It can ping the following sites:</p>"; $output .= "<p>%weblogs, a web site that tracks and displays links to changed weblogs and news-oriented web sites. To get your Drupal site listed, weblogs.com must be informed about your site's updates. This is the job of the ping module and when installed, the administrator doesn't have to do anything to participate in the %weblogs system. The ping module automatically notifies weblogs.com when your site is updated. To do so, Drupal implements the %weblogs-XML.</p>"; diff --git a/modules/profile.module b/modules/profile.module index 215a57df9a0b..b91eb5d2942c 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -66,8 +66,8 @@ function profile_settings() { $profile_required_fields = variable_get("profile_required_fields", array()); $profile_register_fields = variable_get("profile_register_fields", array()); - $header = array (t("field"), t("enable"), t("public"), t("required"), t("show in registration form")); - $i=0; + $header = array(t("field"), t("enable"), t("public"), t("required"), t("show in registration form")); + $i = 0; foreach ($profile_fields as $key => $field) { $row[$i][] = $field[1]; $row[$i][] = form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields)); diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 215a57df9a0b..b91eb5d2942c 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -66,8 +66,8 @@ function profile_settings() { $profile_required_fields = variable_get("profile_required_fields", array()); $profile_register_fields = variable_get("profile_register_fields", array()); - $header = array (t("field"), t("enable"), t("public"), t("required"), t("show in registration form")); - $i=0; + $header = array(t("field"), t("enable"), t("public"), t("required"), t("show in registration form")); + $i = 0; foreach ($profile_fields as $key => $field) { $row[$i][] = $field[1]; $row[$i][] = form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields)); diff --git a/modules/system.module b/modules/system.module index af45d64f6abc..7baf4ecab7d7 100644 --- a/modules/system.module +++ b/modules/system.module @@ -327,7 +327,7 @@ function system_listing($type, $directory, $required = array()) { $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled"))), "align" => "center"); } else if ($type == "theme") { - $row[] = array("data" => form_radio("","theme_default",$info->name,(variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center"); + $row[] = array("data" => form_radio("", "theme_default", $info->name, (variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center"); } $rows[] = $row; } diff --git a/modules/system/system.module b/modules/system/system.module index af45d64f6abc..7baf4ecab7d7 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -327,7 +327,7 @@ function system_listing($type, $directory, $required = array()) { $row[] = array("data" => (in_array($filename, $throttle_required) ? form_hidden("throttle][$filename", 0) . t("required") : form_checkbox(NULL, "throttle][$filename", 1, $file->throttle, NULL, variable_get("throttle_enable", 0) ? NULL : array("disabled" => "disabled"))), "align" => "center"); } else if ($type == "theme") { - $row[] = array("data" => form_radio("","theme_default",$info->name,(variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center"); + $row[] = array("data" => form_radio("", "theme_default", $info->name, (variable_get("theme_default",0) == $info->name) ? 1 : 0), "align" => "center"); } $rows[] = $row; } diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 693bd36f84ca..889e24b5d407 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -772,16 +772,20 @@ function taxonomy_admin() { switch ($op) { case "add": - if (arg(3) == "vocabulary") + if (arg(3) == "vocabulary") { $output .= taxonomy_form_vocabulary(); - else if (arg(3) == "term") + } + else if (arg(3) == "term") { $output .= taxonomy_form_term(); + } break; case "edit": - if (arg(3) == "vocabulary") + if (arg(3) == "vocabulary") { $output .= taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); - else if (arg(3) == "term") + } + else if (arg(3) == "term") { $output .= taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + } break; case "preview": $output .= taxonomy_form(arg(4)); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 693bd36f84ca..889e24b5d407 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -772,16 +772,20 @@ function taxonomy_admin() { switch ($op) { case "add": - if (arg(3) == "vocabulary") + if (arg(3) == "vocabulary") { $output .= taxonomy_form_vocabulary(); - else if (arg(3) == "term") + } + else if (arg(3) == "term") { $output .= taxonomy_form_term(); + } break; case "edit": - if (arg(3) == "vocabulary") + if (arg(3) == "vocabulary") { $output .= taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); - else if (arg(3) == "term") + } + else if (arg(3) == "term") { $output .= taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + } break; case "preview": $output .= taxonomy_form(arg(4)); diff --git a/modules/user.module b/modules/user.module index d73206d5eca4..f3696ca90412 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1201,10 +1201,10 @@ function user_admin_access($edit = array()) { } else if ($op == t("Check")) { if (user_deny($type, $edit["test"])) { - drupal_set_message(t("<i>%test</i> is not allowed.", array ("%test" => $edit["test"]))); + drupal_set_message(t("<i>%test</i> is not allowed.", array("%test" => $edit["test"]))); } else { - drupal_set_message(t("<i>%test</i> is allowed.", array ("%test" => $edit["test"]))); + drupal_set_message(t("<i>%test</i> is allowed.", array("%test" => $edit["test"]))); } } else if ($id) { @@ -1223,7 +1223,7 @@ function user_admin_access($edit = array()) { $rows[] = array(t("Deny"), $rule->mask, l(t("delete rule"), "admin/user/access/$type/$rule->aid")); } - $options = array ("1" => t("Allow"), "0" => t("Deny")); + $options = array("1" => t("Allow"), "0" => t("Deny")); $rows[] = array(form_radios(NUll, "status", $edit["status"], $options), form_textfield(NULL, "mask", $edit["mask"], 32, 64), form_submit(t("Add rule"))); $output .= theme("table", $header, $rows); @@ -1477,18 +1477,18 @@ function user_admin_edit($edit = array()) { function user_admin_account() { $header = array( - array ("data" => t("ID"), "field" => "u.uid"), - array ("data" => t("username"), "field" => "u.name"), - array ("data" => t("status"), "field" => "u.status"), - array ("data" => t("role"), "field" => "u.rid"), - array ("data" => t("last access"), "field" => "u.timestamp", "sort" => "desc"), + array("data" => t("ID"), "field" => "u.uid"), + array("data" => t("username"), "field" => "u.name"), + array("data" => t("status"), "field" => "u.status"), + array("data" => t("role"), "field" => "u.rid"), + array("data" => t("last access"), "field" => "u.timestamp", "sort" => "desc"), t("operations") ); $sql = "SELECT u.uid, u.name, u.status, u.timestamp, r.name AS rolename FROM {role} r INNER JOIN {users} u ON r.rid = u.rid WHERE uid != 0"; $sql .= tablesort_sql($header); $result = pager_query($sql, 50); - $status = array (t("blocked"), t("active")); + $status = array(t("blocked"), t("active")); while ($account = db_fetch_object($result)) { $rows[] = array($account->uid, format_name($account), $status[$account->status], $account->rolename, format_date($account->timestamp, "small"), l(t("edit account"), "admin/user/edit/$account->uid")); } diff --git a/modules/user/user.module b/modules/user/user.module index d73206d5eca4..f3696ca90412 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1201,10 +1201,10 @@ function user_admin_access($edit = array()) { } else if ($op == t("Check")) { if (user_deny($type, $edit["test"])) { - drupal_set_message(t("<i>%test</i> is not allowed.", array ("%test" => $edit["test"]))); + drupal_set_message(t("<i>%test</i> is not allowed.", array("%test" => $edit["test"]))); } else { - drupal_set_message(t("<i>%test</i> is allowed.", array ("%test" => $edit["test"]))); + drupal_set_message(t("<i>%test</i> is allowed.", array("%test" => $edit["test"]))); } } else if ($id) { @@ -1223,7 +1223,7 @@ function user_admin_access($edit = array()) { $rows[] = array(t("Deny"), $rule->mask, l(t("delete rule"), "admin/user/access/$type/$rule->aid")); } - $options = array ("1" => t("Allow"), "0" => t("Deny")); + $options = array("1" => t("Allow"), "0" => t("Deny")); $rows[] = array(form_radios(NUll, "status", $edit["status"], $options), form_textfield(NULL, "mask", $edit["mask"], 32, 64), form_submit(t("Add rule"))); $output .= theme("table", $header, $rows); @@ -1477,18 +1477,18 @@ function user_admin_edit($edit = array()) { function user_admin_account() { $header = array( - array ("data" => t("ID"), "field" => "u.uid"), - array ("data" => t("username"), "field" => "u.name"), - array ("data" => t("status"), "field" => "u.status"), - array ("data" => t("role"), "field" => "u.rid"), - array ("data" => t("last access"), "field" => "u.timestamp", "sort" => "desc"), + array("data" => t("ID"), "field" => "u.uid"), + array("data" => t("username"), "field" => "u.name"), + array("data" => t("status"), "field" => "u.status"), + array("data" => t("role"), "field" => "u.rid"), + array("data" => t("last access"), "field" => "u.timestamp", "sort" => "desc"), t("operations") ); $sql = "SELECT u.uid, u.name, u.status, u.timestamp, r.name AS rolename FROM {role} r INNER JOIN {users} u ON r.rid = u.rid WHERE uid != 0"; $sql .= tablesort_sql($header); $result = pager_query($sql, 50); - $status = array (t("blocked"), t("active")); + $status = array(t("blocked"), t("active")); while ($account = db_fetch_object($result)) { $rows[] = array($account->uid, format_name($account), $status[$account->status], $account->rolename, format_date($account->timestamp, "small"), l(t("edit account"), "admin/user/edit/$account->uid")); } -- GitLab