diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-23 13:17:20 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-23 13:17:20 +0000 |
commit | e08abdd25259e8a2d8e4986a04e55ecd629f077d (patch) | |
tree | e585233eb19a629aa8c104a55b2273672ad5fb35 /modules | |
parent | 0d89694edbb2b280a28ed8f538683caddf72f168 (diff) | |
download | brdo-e08abdd25259e8a2d8e4986a04e55ecd629f077d.tar.gz brdo-e08abdd25259e8a2d8e4986a04e55ecd629f077d.tar.bz2 |
#194946 by dmitrig01, Pasqualle: christmas cleanup (some code style issues fixed)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/aggregator/aggregator.module | 21 | ||||
-rw-r--r-- | modules/color/color.module | 8 | ||||
-rw-r--r-- | modules/profile/profile.module | 16 | ||||
-rw-r--r-- | modules/user/user.admin.inc | 44 |
4 files changed, 43 insertions, 46 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index add89541a..3dc172b2c 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -606,21 +606,14 @@ function aggregator_refresh($feed) { case 307: // Filter the input data: if (aggregator_parse_feed($result->data, $feed)) { - $modified = empty($result->headers['Last-Modified']) ? 0 : strtotime($result->headers['Last-Modified']); - /* - ** Prepare the channel data: - */ - + // Prepare the channel data. foreach ($channel as $key => $value) { $channel[$key] = trim($value); } - /* - ** Prepare the image data (if any): - */ - + // Prepare the image data (if any). foreach ($image as $key => $value) { $image[$key] = trim($value); } @@ -634,16 +627,10 @@ function aggregator_refresh($feed) { } $etag = empty($result->headers['ETag']) ? '' : $result->headers['ETag']; - /* - ** Update the feed data: - */ - + // Update the feed data. db_query("UPDATE {aggregator_feed} SET url = '%s', checked = %d, link = '%s', description = '%s', image = '%s', etag = '%s', modified = %d WHERE fid = %d", $feed['url'], time(), $channel['LINK'], $channel['DESCRIPTION'], $image, $etag, $modified, $feed['fid']); - /* - ** Clear the cache: - */ - + // Clear the cache. cache_clear_all(); watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed['title'])); diff --git a/modules/color/color.module b/modules/color/color.module index 666c2f102..a65271ba5 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -627,9 +627,11 @@ function _color_hsl2rgb($hsl) { $l = $hsl[2]; $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l*$s; $m1 = $l * 2 - $m2; - return array(_color_hue2rgb($m1, $m2, $h + 0.33333), - _color_hue2rgb($m1, $m2, $h), - _color_hue2rgb($m1, $m2, $h - 0.33333)); + return array( + _color_hue2rgb($m1, $m2, $h + 0.33333), + _color_hue2rgb($m1, $m2, $h), + _color_hue2rgb($m1, $m2, $h - 0.33333), + ); } /** diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 297d6c0ab..229dc91b5 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -266,13 +266,15 @@ function profile_view_field($user, $field) { // Note: Avoid PHP's date() because it does not handle dates before // 1970 on Windows. This would make the date field useless for e.g. // birthdays. - $replace = array('d' => sprintf('%02d', $value['day']), - 'j' => $value['day'], - 'm' => sprintf('%02d', $value['month']), - 'M' => map_month($value['month']), - 'Y' => $value['year'], - 'H:i' => NULL, - 'g:ia' => NULL); + $replace = array( + 'd' => sprintf('%02d', $value['day']), + 'j' => $value['day'], + 'm' => sprintf('%02d', $value['month']), + 'M' => map_month($value['month']), + 'Y' => $value['year'], + 'H:i' => NULL, + 'g:ia' => NULL, + ); return strtr($format, $replace); case 'list': $values = split("[,\n\r]", $value); diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index 917a480cc..00607f1da 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -44,10 +44,11 @@ function user_filter_form() { $filters = user_filters(); $i = 0; - $form['filters'] = array('#type' => 'fieldset', - '#title' => t('Show only users where'), - '#theme' => 'user_filters', - ); + $form['filters'] = array( + '#type' => 'fieldset', + '#title' => t('Show only users where'), + '#theme' => 'user_filters', + ); foreach ($session as $filter) { list($type, $value) = $filter; // Merge an array of arrays into one if necessary. @@ -63,24 +64,29 @@ function user_filter_form() { foreach ($filters as $key => $filter) { $names[$key] = $filter['title']; - $form['filters']['status'][$key] = array('#type' => 'select', - '#options' => $filter['options'], - ); + $form['filters']['status'][$key] = array( + '#type' => 'select', + '#options' => $filter['options'], + ); } - $form['filters']['filter'] = array('#type' => 'radios', - '#options' => $names, - ); - $form['filters']['buttons']['submit'] = array('#type' => 'submit', - '#value' => (count($session) ? t('Refine') : t('Filter')) - ); + $form['filters']['filter'] = array( + '#type' => 'radios', + '#options' => $names, + ); + $form['filters']['buttons']['submit'] = array( + '#type' => 'submit', + '#value' => (count($session) ? t('Refine') : t('Filter')), + ); if (count($session)) { - $form['filters']['buttons']['undo'] = array('#type' => 'submit', - '#value' => t('Undo') - ); - $form['filters']['buttons']['reset'] = array('#type' => 'submit', - '#value' => t('Reset') - ); + $form['filters']['buttons']['undo'] = array( + '#type' => 'submit', + '#value' => t('Undo'), + ); + $form['filters']['buttons']['reset'] = array( + '#type' => 'submit', + '#value' => t('Reset'), + ); } drupal_add_js('misc/form.js', 'core'); |