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) {
function drupal_find_theme_templates($cache, $extension, $path) {
$templates = array();
// Escape the dots in the extension.
// Escape the periods in the extension.
$regex = str_replace('.', '\.', $extension) .'$';
// Because drupal_system_listing works the way it does, we check for real
......
<?php
// $Id$
/*
Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
Version 1.7 (beta) - Simon Willison, 23rd May 2005
Site: http://scripts.incutio.com/xmlrpc/
Manual: http://scripts.incutio.com/xmlrpc/manual.php
This version is made available under the GNU GPL License
/**
* @file
* Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
* Version 1.7 (beta) - Simon Willison, 23rd May 2005
* Site: http://scripts.incutio.com/xmlrpc/
* 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) {
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']));
......
......@@ -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),
return array(
_color_hue2rgb($m1, $m2, $h + 0.33333),
_color_hue2rgb($m1, $m2, $h),
_color_hue2rgb($m1, $m2, $h - 0.33333));
_color_hue2rgb($m1, $m2, $h - 0.33333),
);
}
/**
......
......@@ -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']),
$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);
'g:ia' => NULL,
);
return strtr($format, $replace);
case 'list':
$values = split("[,\n\r]", $value);
......
......@@ -44,7 +44,8 @@ function user_filter_form() {
$filters = user_filters();
$i = 0;
$form['filters'] = array('#type' => 'fieldset',
$form['filters'] = array(
'#type' => 'fieldset',
'#title' => t('Show only users where'),
'#theme' => 'user_filters',
);
......@@ -63,23 +64,28 @@ function user_filter_form() {
foreach ($filters as $key => $filter) {
$names[$key] = $filter['title'];
$form['filters']['status'][$key] = array('#type' => 'select',
$form['filters']['status'][$key] = array(
'#type' => 'select',
'#options' => $filter['options'],
);
}
$form['filters']['filter'] = array('#type' => 'radios',
$form['filters']['filter'] = array(
'#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)) {
$form['filters']['buttons']['undo'] = array('#type' => 'submit',
'#value' => t('Undo')
$form['filters']['buttons']['undo'] = array(
'#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'),
);
}
......
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