Commit 178c2853 authored by Dries's avatar Dries

- Patch #204900 by webernet: code style fixes. Likely my last patch of the...

- Patch #204900 by webernet: code style fixes.  Likely my last patch of the year.  Fiew.  Thanks all, and see you on the other side.  :)
parent f04d4d17
......@@ -85,7 +85,7 @@ function db_connect($url) {
_db_error_page(mysql_error());
}
/* On MySQL 4.1 and later, force UTF-8 */
// On MySQL 4.1 and later, force UTF-8.
if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
mysql_query('SET NAMES "utf8"', $connection);
}
......
......@@ -6,9 +6,8 @@
* Database interface code for MySQL database servers using the mysqli client libraries. mysqli is included in PHP 5 by default and allows developers to use the advanced features of MySQL 4.1.x, 5.0.x and beyond.
*/
/* Maintainers of this file should consult
* http://www.php.net/manual/en/ref.mysqli.php
*/
// Maintainers of this file should consult:
// http://www.php.net/manual/en/ref.mysqli.php
/**
* @ingroup database
......@@ -85,7 +84,7 @@ function db_connect($url) {
_db_error_page(mysqli_connect_error());
}
/* Force UTF-8 */
// Force UTF-8.
mysqli_query($connection, 'SET NAMES "utf8"');
return $connection;
......
......@@ -639,7 +639,7 @@ function _form_validate($elements, &$form_state, $form_id = NULL) {
_form_validate($elements[$key], $form_state);
}
}
/* Validate the current input */
// Validate the current input.
if (!isset($elements['#validated']) || !$elements['#validated']) {
if (isset($elements['#needs_validation'])) {
// An empty textfield returns '' so we use empty(). An empty checkbox
......@@ -817,7 +817,7 @@ function form_builder($form_id, $form, &$form_state) {
// Initialize as unprocessed.
$form['#processed'] = FALSE;
/* Use element defaults */
// Use element defaults.
if ((!empty($form['#type'])) && ($info = _element_info($form['#type']))) {
// Overlay $info onto $form, retaining preexisting keys in $form.
$form += $info;
......@@ -1525,7 +1525,7 @@ function theme_password_confirm($element) {
return theme('form_element', $element, $element['#children']);
}
/*
/**
* Expand a password_confirm field into two text boxes.
*/
function expand_password_confirm($element) {
......
......@@ -12,7 +12,7 @@
* @see themeable
*/
/**
/**
* @name Content markers
* @{
* Markers used by theme_mark() and node_mark() to designate content.
......
......@@ -163,11 +163,9 @@ function xmlrpc_message_parse(&$xmlrpc_message) {
return FALSE;
}
$xmlrpc_message->_parser = xml_parser_create();
// Set XML parser to take the case of tags into account
// Set XML parser to take the case of tags into account.
xml_parser_set_option($xmlrpc_message->_parser, XML_OPTION_CASE_FOLDING, FALSE);
// Set XML parser callback functions
/* Do not set object. $xmlrpc_message does not have member functions any more
xml_set_object($xmlrpc_message->_parser, $xmlrpc_message); */
xml_set_element_handler($xmlrpc_message->_parser, 'xmlrpc_message_tag_open', 'xmlrpc_message_tag_close');
xml_set_character_data_handler($xmlrpc_message->_parser, 'xmlrpc_message_cdata');
xmlrpc_message_set($xmlrpc_message);
......
......@@ -201,12 +201,7 @@ function xmlrpc_server_call($xmlrpc_server, $methodname, $args) {
}
}
}
/*
if (count($args) == 1) {
// If only one parameter just send that instead of the whole array
$args = $args[0];
}
*/
if (!function_exists($method)) {
return xmlrpc_error(-32601, t('Server error. Requested function %method does not exist.', array("%method" => $method)));
}
......
......@@ -396,12 +396,10 @@ function blogapi_metaweblog_get_recent_posts($blogid, $username, $password, $num
return blogapi_blogger_get_recent_posts('0123456789ABCDEF', $blogid, $username, $password, $number_of_posts, TRUE);
}
// see above
function blogapi_mt_get_recent_post_titles($blogid, $username, $password, $number_of_posts) {
return blogapi_blogger_get_recent_posts('0123456789ABCDEF', $blogid, $username, $password, $number_of_posts, FALSE);
}
/* **** */
function blogapi_mt_get_category_list($blogid, $username, $password) {
return blogapi_metaweblog_get_category_list($blogid, $username, $password);
}
......
......@@ -115,10 +115,8 @@ function node_form(&$form_state, $node) {
// Set the id of the top-level form tag
$form['#id'] = 'node-form';
/**
* Basic node information.
* These elements are just values so they are not even sent to the client.
*/
// Basic node information.
// These elements are just values so they are not even sent to the client.
foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {
$form[$key] = array(
'#type' => 'value',
......
......@@ -459,7 +459,7 @@ function profile_categories() {
return $data;
}
/*
/**
* Menu item access callback - check if a user has access to a profile category.
*/
function profile_category_access($category) {
......
......@@ -180,12 +180,12 @@ function statistics_cron() {
$statistics_timestamp = variable_get('statistics_day_timestamp', '');
if ((time() - $statistics_timestamp) >= 86400) {
/* reset day counts */
// Reset day counts.
db_query('UPDATE {node_counter} SET daycount = 0');
variable_set('statistics_day_timestamp', time());
}
/* clean expired access logs */
// Clean up expired access logs.
db_query('DELETE FROM {accesslog} WHERE timestamp < %d', time() - variable_get('statistics_flush_accesslog_timer', 259200));
}
......@@ -226,7 +226,7 @@ function statistics_title_list($dbfield, $dbrows) {
function statistics_get($nid) {
if ($nid > 0) {
/* retrieves an array with both totalcount and daycount */
// Retrieve an array with both totalcount and daycount.
$statistics = db_fetch_array(db_query('SELECT totalcount, daycount, timestamp FROM {node_counter} WHERE nid = %d', $nid));
}
......
......@@ -267,12 +267,12 @@ function system_requirements($phase) {
*/
function system_install() {
if ($GLOBALS['db_type'] == 'pgsql') {
/* create unsigned types */
// Create unsigned types.
db_query("CREATE DOMAIN int_unsigned integer CHECK (VALUE >= 0)");
db_query("CREATE DOMAIN smallint_unsigned smallint CHECK (VALUE >= 0)");
db_query("CREATE DOMAIN bigint_unsigned bigint CHECK (VALUE >= 0)");
/* create functions */
// Create functions.
db_query('CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS
\'SELECT CASE WHEN (($1 > $2) OR ($2 IS NULL)) THEN $1 ELSE $2 END;\'
LANGUAGE \'sql\''
......
......@@ -150,10 +150,9 @@ function user_view($account) {
drupal_set_title(check_plain($account->name));
// Retrieve all profile fields and attach to $account->content.
user_build_content($account);
/**
* To theme user profiles, copy modules/user/user_profile.tpl.php
* to your theme directory, and edit it as instructed in that file's comments.
*/
// To theme user profiles, copy modules/user/user_profile.tpl.php
// to your theme directory, and edit it as instructed in that file's comments.
return theme('user_profile', $account);
}
......
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