summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-09-05 08:42:02 +0000
committerDries Buytaert <dries@buytaert.net>2007-09-05 08:42:02 +0000
commitab1715750a9aa2157cd117fa6b98399bb3bf6512 (patch)
treeb7287d0c047febac5de50db36868d06c5aee32d9
parentf655adcf9785376c760dea3ae681653e26ebf0fe (diff)
downloadbrdo-ab1715750a9aa2157cd117fa6b98399bb3bf6512.tar.gz
brdo-ab1715750a9aa2157cd117fa6b98399bb3bf6512.tar.bz2
- Patch #172961 by webernet: code style cleanup.
-rw-r--r--modules/blogapi/blogapi.module6
-rw-r--r--modules/book/book.module6
-rw-r--r--modules/comment/comment.module6
-rw-r--r--modules/dblog/dblog.admin.inc2
-rw-r--r--modules/filter/filter.module6
-rw-r--r--modules/locale/locale.module4
-rw-r--r--modules/node/node.module38
-rw-r--r--modules/system/system.module2
-rw-r--r--modules/translation/translation.module4
-rw-r--r--modules/upload/upload.module4
-rw-r--r--themes/bluemarine/page.tpl.php4
-rw-r--r--themes/pushbutton/page.tpl.php2
12 files changed, 42 insertions, 42 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 33656ccd6..28539e2ff 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -631,7 +631,7 @@ function _blogapi_mt_extra(&$node, $struct) {
// merge the 3 body sections (description, mt_excerpt, mt_text_more) into
// one body
if ($struct['mt_excerpt']) {
- $node->body = $struct['mt_excerpt'] .'<!--break-->'.$node->body;
+ $node->body = $struct['mt_excerpt'] .'<!--break-->'. $node->body;
}
if ($struct['mt_text_more']) {
$node->body = $node->body .'<!--extended-->'. $struct['mt_text_more'];
@@ -658,8 +658,8 @@ function _blogapi_get_post($node, $bodies = TRUE) {
'dateCreated' => xmlrpc_date($node->created),
'title' => $node->title,
'postid' => $node->nid,
- 'link' => url('node/'.$node->nid, array('absolute' => TRUE)),
- 'permaLink' => url('node/'.$node->nid, array('absolute' => TRUE)),
+ 'link' => url('node/'. $node->nid, array('absolute' => TRUE)),
+ 'permaLink' => url('node/'. $node->nid, array('absolute' => TRUE)),
);
if ($bodies) {
if ($node->comment == 1) {
diff --git a/modules/book/book.module b/modules/book/book.module
index 2a7c7acfe..a8e7cd195 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -264,7 +264,7 @@ function book_get_books() {
$nids[] = $book['bid'];
}
if ($nids) {
- $result2 = db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (". implode(',', $nids). ") AND n.status = 1 ORDER BY ml.weight, ml.link_title"));
+ $result2 = db_query(db_rewrite_sql("SELECT n.type, n.title, b.*, ml.* FROM {book} b INNER JOIN {node} n on b.nid = n.nid INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE n.nid IN (". implode(',', $nids) .") AND n.status = 1 ORDER BY ml.weight, ml.link_title"));
while ($link = db_fetch_array($result2)) {
$link['href'] = $link['link_path'];
$link['options'] = unserialize($link['options']);
@@ -404,7 +404,7 @@ function _book_add_form_elements(&$form, $node) {
$settings['book']['formCallback'] = url('book-form-update' , array());
$settings['book']['formId'] = $form['#id'];
drupal_add_js($settings, 'setting');
- drupal_add_js(drupal_get_path('module', 'book'). '/book.js');
+ drupal_add_js(drupal_get_path('module', 'book') .'/book.js');
drupal_add_js('misc/progress.js');
// Need this for AJAX.
@@ -1415,7 +1415,7 @@ function book_admin_settings_validate($form, &$form_state) {
*/
function book_node_type($op, $type) {
- switch ($op){
+ switch ($op) {
case 'update':
if (!empty($type->old_type) && $type->old_type != $type->type) {
// Update the list of node types that are allowed to be added to books.
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 59693b29d..e0acfcede 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -341,13 +341,13 @@ function comment_new_page_count($num_comments, $new_replies, $nid) {
// Newest first: find the last thread with new comment
$result = db_query('(SELECT thread FROM {comments} WHERE nid = %d AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY thread DESC LIMIT 1', $nid, $new_replies);
$thread = db_result($result);
- $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND thread > '" . $thread . "'", $nid);
+ $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND thread > '". $thread ."'", $nid);
}
else {
// Oldest first: find the first thread with new comment
$result = db_query('(SELECT thread FROM {comments} WHERE nid = %d AND status = 0 ORDER BY timestamp DESC LIMIT %d) ORDER BY SUBSTRING(thread, 1, (LENGTH(thread) - 1)) LIMIT 1', $nid, $new_replies);
$thread = substr(db_result($result), 0, -1);
- $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < '" . $thread . "'", $nid);
+ $result_count = db_query("SELECT COUNT(*) FROM {comments} WHERE nid = %d AND status = 0 AND SUBSTRING(thread, 1, (LENGTH(thread) - 1)) < '". $thread ."'", $nid);
}
$count = db_result($result_count);
}
@@ -1490,7 +1490,7 @@ function comment_form(&$form_state, $edit, $title = NULL) {
$op = isset($_POST['op']) ? $_POST['op'] : '';
if (!$user->uid && variable_get('comment_anonymous', COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
- drupal_add_js(drupal_get_path('module', 'comment') . '/comment.js');
+ drupal_add_js(drupal_get_path('module', 'comment') .'/comment.js');
}
if ($user->uid) {
diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc
index 2a763f8bf..076e05242 100644
--- a/modules/dblog/dblog.admin.inc
+++ b/modules/dblog/dblog.admin.inc
@@ -204,7 +204,7 @@ function dblog_build_filter_query() {
function dblog_filters() {
$filters = array();
- foreach(_dblog_get_message_types() as $type) {
+ foreach (_dblog_get_message_types() as $type) {
$types[$type] = $type;
}
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 4f8694b61..445def4e7 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -1162,7 +1162,7 @@ function _filter_htmlcorrector($text) {
}
// Add trailing slash to single-use tags as per X(HT)ML.
else {
- $value = rtrim($value, ' /') . ' /';
+ $value = rtrim($value, ' /') .' /';
}
$output .= '<'. $value .'>';
}
@@ -1187,7 +1187,7 @@ function _filter_url_parse_full_links($match) {
$match[2] = decode_entities($match[2]);
$caption = check_plain(_filter_url_trim($match[2]));
$match[2] = check_url($match[2]);
- return $match[1] . '<a href="'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[5];
+ return $match[1] .'<a href="'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[5];
}
/**
@@ -1197,7 +1197,7 @@ function _filter_url_parse_partial_links($match) {
$match[2] = decode_entities($match[2]);
$caption = check_plain(_filter_url_trim($match[2]));
$match[2] = check_plain($match[2]);
- return $match[1] . '<a href="http://'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[3];
+ return $match[1] .'<a href="http://'. $match[2] .'" title="'. $match[2] .'">'. $caption .'</a>'. $match[3];
}
/**
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 28ff60ff2..e4e23a941 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -46,7 +46,7 @@ function locale_help($path, $arg) {
return '<p>'. t('The language used to display a web page is determined with a negotiation algorithm. You can choose how this algorithm should work. By default, there is no negotiation and the default language is used. You can use path prefixes (like "de" and "it" for German and Italian content) with different fallback options, so you can have web addresses like /de/contact and /it/contact. Alternatively you can use custom domains like de.example.com and it.example.com. Customize path prefixes and set domain names on the <a href="@languages">language editing pages</a>.', array('@languages' => url('admin/settings/language'))) .'</p>';
case 'admin/build/translate':
- return '<p>'. t("This page provides an overview of interface translation on the site. Drupal groups all translatable strings in so called 'text groups'. Text groups are useful, because you can focus your translation efforts on the groups of text you care most about. For example, a translation team could choose not to fully translate the text group that includes all the long help texts on the administration pages. Similarly, text groups are useful to ensure that certain aspects of the site are always fully translated.") . '</p>';
+ return '<p>'. t("This page provides an overview of interface translation on the site. Drupal groups all translatable strings in so called 'text groups'. Text groups are useful, because you can focus your translation efforts on the groups of text you care most about. For example, a translation team could choose not to fully translate the text group that includes all the long help texts on the administration pages. Similarly, text groups are useful to ensure that certain aspects of the site are always fully translated.") .'</p>';
case 'admin/build/translate/import':
return '<p>'. t("This page allows you to import a translation provided in the gettext Portable Object (.po) format. The easiest way to get your site translated is to obtain an existing Drupal translation and to import it. You can find existing translations on the <a href=\"@url\">Drupal translation page</a>. Note that importing a translation file might take a while.", array('@url' => 'http://drupal.org/project/translations')) .'</p>';
case 'admin/build/translate/export':
@@ -256,7 +256,7 @@ function locale_form_alter(&$form, $form_state, $form_id) {
// Language field for nodes
default:
if (isset($form['#id']) && $form['#id'] == 'node-form') {
- if (isset($form['#node']->type) && variable_get('language_' . $form['#node']->type, 0)) {
+ if (isset($form['#node']->type) && variable_get('language_'. $form['#node']->type, 0)) {
$form['language'] = array(
'#type' => 'select',
'#title' => t('Language'),
diff --git a/modules/node/node.module b/modules/node/node.module
index 00297cea0..741a64c20 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -821,7 +821,7 @@ function node_save(&$node) {
'promote' => $node->promote, 'sticky' => $node->sticky);
$node_table_types = array(
'title' => "'%s'", 'type' => "'%s'", 'uid' => '%d',
- 'status' => '%d', 'language' => "'%s'",'created' => '%d',
+ 'status' => '%d', 'language' => "'%s'", 'created' => '%d',
'changed' => '%d', 'comment' => '%d',
'promote' => '%d', 'sticky' => '%d');
$update_node = TRUE;
@@ -2337,8 +2337,8 @@ function node_action_info() {
'description' => t('Publish post'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_unpublish_action' => array(
@@ -2346,8 +2346,8 @@ function node_action_info() {
'description' => t('Unpublish post'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_make_sticky_action' => array(
@@ -2355,8 +2355,8 @@ function node_action_info() {
'description' => t('Make post sticky'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_make_unsticky_action' => array(
@@ -2364,8 +2364,8 @@ function node_action_info() {
'description' => t('Make post unsticky'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_promote_action' => array(
@@ -2373,8 +2373,8 @@ function node_action_info() {
'description' => t('Promote post to front page'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
'user' => array('login'),
),
),
@@ -2383,8 +2383,8 @@ function node_action_info() {
'description' => t('Remove post from front page'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_assign_owner_action' => array(
@@ -2393,8 +2393,8 @@ function node_action_info() {
'configurable' => TRUE,
'hooks' => array(
'any' => TRUE,
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
'node_save_action' => array(
@@ -2402,8 +2402,8 @@ function node_action_info() {
'description' => t('Save post'),
'configurable' => FALSE,
'hooks' => array(
- 'nodeapi' => array('delete','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('delete', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
'user' => array('login'),
),
),
@@ -2412,8 +2412,8 @@ function node_action_info() {
'description' => t('Unpublish post containing keyword(s)'),
'configurable' => TRUE,
'hooks' => array(
- 'nodeapi' => array('presave','insert','update', 'view'),
- 'comment' => array('delete','insert','update', 'view'),
+ 'nodeapi' => array('presave', 'insert', 'update', 'view'),
+ 'comment' => array('delete', 'insert', 'update', 'view'),
),
),
);
diff --git a/modules/system/system.module b/modules/system/system.module
index 73509726f..6b65c0b44 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -122,7 +122,7 @@ function system_elements() {
// Inputs
$type['submit'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => TRUE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah'));
$type['button'] = array('#input' => TRUE, '#name' => 'op', '#button_type' => 'submit', '#executes_submit_callback' => FALSE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah'));
- $type['image_button'] = array('#input' => TRUE, '#button_type' => 'submit','#executes_submit_callback' => TRUE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah'), '#return_value' => TRUE, '#has_garbage_value' => TRUE, '#src' => NULL);
+ $type['image_button'] = array('#input' => TRUE, '#button_type' => 'submit', '#executes_submit_callback' => TRUE, '#ahah_event' => 'submit', '#process' => array('form_expand_ahah'), '#return_value' => TRUE, '#has_garbage_value' => TRUE, '#src' => NULL);
$type['textfield'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128, '#autocomplete_path' => FALSE);
$type['password'] = array('#input' => TRUE, '#size' => 60, '#maxlength' => 128);
$type['password_confirm'] = array('#input' => TRUE, '#process' => array('expand_password_confirm'));
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index a965b0cad..22b4690f9 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -199,7 +199,7 @@ function translation_node_overview($node) {
$status = $translation_node->status ? t('Published') : t('Not published');
$status .= $translation_node->translate ? ' - <span class="marker">'. t('outdated') .'</span>' : '';
if ($translation_node->nid == $tnid) {
- $language_name = '<strong>'. $language_name . '</strong> (source)';
+ $language_name = '<strong>'. $language_name .'</strong> (source)';
}
}
else {
@@ -334,7 +334,7 @@ function translation_node_get_translations($tnid) {
* Boolean value.
*/
function translation_supported_type($type) {
- return variable_get('language_' . $type, 0) == TRANSLATION_ENABLED;
+ return variable_get('language_'. $type, 0) == TRANSLATION_ENABLED;
}
/**
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index b10d99631..9f3c983bb 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -184,7 +184,7 @@ function upload_node_form_submit($form, &$form_state) {
// Save new file uploads.
if (($user->uid != 1 || user_access('upload files')) && ($file = file_save_upload('upload', $validators))) {
- $file->list = variable_get('upload_list_default',1);
+ $file->list = variable_get('upload_list_default', 1);
$file->description = $file->filename;
$_SESSION['upload_current_file'] = $file->fid;
$_SESSION['upload_files'][$file->fid] = $file;
@@ -192,7 +192,7 @@ function upload_node_form_submit($form, &$form_state) {
// attach session files to node.
if (!empty($_SESSION['upload_files'])) {
- foreach($_SESSION['upload_files'] as $fid => $file) {
+ foreach ($_SESSION['upload_files'] as $fid => $file) {
$form_state['values']['files'][$fid] = $file;
}
}
diff --git a/themes/bluemarine/page.tpl.php b/themes/bluemarine/page.tpl.php
index 01c35d9a8..a75fa744a 100644
--- a/themes/bluemarine/page.tpl.php
+++ b/themes/bluemarine/page.tpl.php
@@ -21,8 +21,8 @@
<?php if ($site_slogan) { ?><div class='site-slogan'><?php print $site_slogan ?></div><?php } ?>
</td>
<td id="menu">
- <?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' =>'links', 'id' => 'subnavlist')) ?><?php } ?>
- <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist')) ?><?php } ?>
+ <?php if (isset($secondary_links)) { ?><?php print theme('links', $secondary_links, array('class' => 'links', 'id' => 'subnavlist')) ?><?php } ?>
+ <?php if (isset($primary_links)) { ?><?php print theme('links', $primary_links, array('class' => 'links', 'id' => 'navlist')) ?><?php } ?>
<?php print $search_box ?>
</td>
</tr>
diff --git a/themes/pushbutton/page.tpl.php b/themes/pushbutton/page.tpl.php
index 0de34808c..c2a07d1ed 100644
--- a/themes/pushbutton/page.tpl.php
+++ b/themes/pushbutton/page.tpl.php
@@ -104,7 +104,7 @@
<?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?>
<?php endif; ?>
<?php if (isset($secondary_links)) : ?>
- <?php print theme('links', $secondary_links, array('class' => 'links secondary-links',)) ?>
+ <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')) ?>
<?php endif; ?>
</td>
</tr>