Commit e08abdd2 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#194946 by dmitrig01, Pasqualle: christmas cleanup (some code style issues fixed)

parent 0d89694e
...@@ -754,7 +754,7 @@ function drupal_find_theme_functions($cache, $prefixes) { ...@@ -754,7 +754,7 @@ function drupal_find_theme_functions($cache, $prefixes) {
function drupal_find_theme_templates($cache, $extension, $path) { function drupal_find_theme_templates($cache, $extension, $path) {
$templates = array(); $templates = array();
// Escape the dots in the extension. // Escape the periods in the extension.
$regex = str_replace('.', '\.', $extension) .'$'; $regex = str_replace('.', '\.', $extension) .'$';
// Because drupal_system_listing works the way it does, we check for real // Because drupal_system_listing works the way it does, we check for real
......
<?php <?php
// $Id$ // $Id$
/* /**
Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005 * @file
Version 1.7 (beta) - Simon Willison, 23rd May 2005 * Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
Site: http://scripts.incutio.com/xmlrpc/ * Version 1.7 (beta) - Simon Willison, 23rd May 2005
Manual: http://scripts.incutio.com/xmlrpc/manual.php * Site: http://scripts.incutio.com/xmlrpc/
This version is made available under the GNU GPL License * Manual: http://scripts.incutio.com/xmlrpc/manual.php
* This version is made available under the GNU GPL License
*/ */
/** /**
......
...@@ -606,21 +606,14 @@ function aggregator_refresh($feed) { ...@@ -606,21 +606,14 @@ function aggregator_refresh($feed) {
case 307: case 307:
// Filter the input data: // Filter the input data:
if (aggregator_parse_feed($result->data, $feed)) { if (aggregator_parse_feed($result->data, $feed)) {
$modified = empty($result->headers['Last-Modified']) ? 0 : strtotime($result->headers['Last-Modified']); $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) { foreach ($channel as $key => $value) {
$channel[$key] = trim($value); $channel[$key] = trim($value);
} }
/* // Prepare the image data (if any).
** Prepare the image data (if any):
*/
foreach ($image as $key => $value) { foreach ($image as $key => $value) {
$image[$key] = trim($value); $image[$key] = trim($value);
} }
...@@ -634,16 +627,10 @@ function aggregator_refresh($feed) { ...@@ -634,16 +627,10 @@ function aggregator_refresh($feed) {
} }
$etag = empty($result->headers['ETag']) ? '' : $result->headers['ETag']; $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']); 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(); cache_clear_all();
watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed['title'])); watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed['title']));
......
...@@ -627,9 +627,11 @@ function _color_hsl2rgb($hsl) { ...@@ -627,9 +627,11 @@ function _color_hsl2rgb($hsl) {
$l = $hsl[2]; $l = $hsl[2];
$m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l*$s; $m2 = ($l <= 0.5) ? $l * ($s + 1) : $l + $s - $l*$s;
$m1 = $l * 2 - $m2; $m1 = $l * 2 - $m2;
return array(_color_hue2rgb($m1, $m2, $h + 0.33333), return array(
_color_hue2rgb($m1, $m2, $h), _color_hue2rgb($m1, $m2, $h + 0.33333),
_color_hue2rgb($m1, $m2, $h - 0.33333)); _color_hue2rgb($m1, $m2, $h),
_color_hue2rgb($m1, $m2, $h - 0.33333),
);
} }
/** /**
......
...@@ -266,13 +266,15 @@ function profile_view_field($user, $field) { ...@@ -266,13 +266,15 @@ function profile_view_field($user, $field) {
// Note: Avoid PHP's date() because it does not handle dates before // 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. // 1970 on Windows. This would make the date field useless for e.g.
// birthdays. // birthdays.
$replace = array('d' => sprintf('%02d', $value['day']), $replace = array(
'j' => $value['day'], 'd' => sprintf('%02d', $value['day']),
'm' => sprintf('%02d', $value['month']), 'j' => $value['day'],
'M' => map_month($value['month']), 'm' => sprintf('%02d', $value['month']),
'Y' => $value['year'], 'M' => map_month($value['month']),
'H:i' => NULL, 'Y' => $value['year'],
'g:ia' => NULL); 'H:i' => NULL,
'g:ia' => NULL,
);
return strtr($format, $replace); return strtr($format, $replace);
case 'list': case 'list':
$values = split("[,\n\r]", $value); $values = split("[,\n\r]", $value);
......
...@@ -44,10 +44,11 @@ function user_filter_form() { ...@@ -44,10 +44,11 @@ function user_filter_form() {
$filters = user_filters(); $filters = user_filters();
$i = 0; $i = 0;
$form['filters'] = array('#type' => 'fieldset', $form['filters'] = array(
'#title' => t('Show only users where'), '#type' => 'fieldset',
'#theme' => 'user_filters', '#title' => t('Show only users where'),
); '#theme' => 'user_filters',
);
foreach ($session as $filter) { foreach ($session as $filter) {
list($type, $value) = $filter; list($type, $value) = $filter;
// Merge an array of arrays into one if necessary. // Merge an array of arrays into one if necessary.
...@@ -63,24 +64,29 @@ function user_filter_form() { ...@@ -63,24 +64,29 @@ function user_filter_form() {
foreach ($filters as $key => $filter) { foreach ($filters as $key => $filter) {
$names[$key] = $filter['title']; $names[$key] = $filter['title'];
$form['filters']['status'][$key] = array('#type' => 'select', $form['filters']['status'][$key] = array(
'#options' => $filter['options'], '#type' => 'select',
); '#options' => $filter['options'],
);
} }
$form['filters']['filter'] = array('#type' => 'radios', $form['filters']['filter'] = array(
'#options' => $names, '#type' => 'radios',
); '#options' => $names,
$form['filters']['buttons']['submit'] = array('#type' => 'submit', );
'#value' => (count($session) ? t('Refine') : t('Filter')) $form['filters']['buttons']['submit'] = array(
); '#type' => 'submit',
'#value' => (count($session) ? t('Refine') : t('Filter')),
);
if (count($session)) { if (count($session)) {
$form['filters']['buttons']['undo'] = array('#type' => 'submit', $form['filters']['buttons']['undo'] = array(
'#value' => t('Undo') '#type' => 'submit',
); '#value' => t('Undo'),
$form['filters']['buttons']['reset'] = array('#type' => 'submit', );
'#value' => t('Reset') $form['filters']['buttons']['reset'] = array(
); '#type' => 'submit',
'#value' => t('Reset'),
);
} }
drupal_add_js('misc/form.js', 'core'); drupal_add_js('misc/form.js', 'core');
......
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