summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-12-31 08:54:37 +0000
committerDries Buytaert <dries@buytaert.net>2007-12-31 08:54:37 +0000
commit178c28535b5ed1a693c9e9cf5de4c703bc2bf3c6 (patch)
treee0a029015f481bd2ce1a85b3b73396244d91caf1
parentf04d4d17dd6a7c94bf10b564930a4448d5449c3d (diff)
downloadbrdo-178c28535b5ed1a693c9e9cf5de4c703bc2bf3c6.tar.gz
brdo-178c28535b5ed1a693c9e9cf5de4c703bc2bf3c6.tar.bz2
- Patch #204900 by webernet: code style fixes. Likely my last patch of the year. Fiew. Thanks all, and see you on the other side. :)
-rw-r--r--includes/database.mysql.inc2
-rw-r--r--includes/database.mysqli.inc7
-rw-r--r--includes/form.inc6
-rw-r--r--includes/theme.inc2
-rw-r--r--includes/xmlrpc.inc4
-rw-r--r--includes/xmlrpcs.inc7
-rw-r--r--modules/blogapi/blogapi.module2
-rw-r--r--modules/node/node.pages.inc6
-rw-r--r--modules/profile/profile.module2
-rw-r--r--modules/statistics/statistics.module6
-rw-r--r--modules/system/system.install4
-rw-r--r--modules/user/user.pages.inc7
12 files changed, 21 insertions, 34 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index 2bb105161..a20486996 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -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);
}
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc
index d6fd3aeda..9cefafc6d 100644
--- a/includes/database.mysqli.inc
+++ b/includes/database.mysqli.inc
@@ -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;
diff --git a/includes/form.inc b/includes/form.inc
index 7b9d119e8..5ff0193fe 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -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) {
diff --git a/includes/theme.inc b/includes/theme.inc
index 0b75847bc..b9b1d2772 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -12,7 +12,7 @@
* @see themeable
*/
- /**
+/**
* @name Content markers
* @{
* Markers used by theme_mark() and node_mark() to designate content.
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index 59210a459..38704bc4a 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -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);
diff --git a/includes/xmlrpcs.inc b/includes/xmlrpcs.inc
index 9b455c639..11744a98e 100644
--- a/includes/xmlrpcs.inc
+++ b/includes/xmlrpcs.inc
@@ -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)));
}
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 926e4bc31..821c35f9f 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -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);
}
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 66f781aee..7c667498e 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -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',
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index c5aed1680..20d39547d 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -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) {
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index afcee9a53..831a0d5c7 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -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));
}
diff --git a/modules/system/system.install b/modules/system/system.install
index 8020c11a3..a7d343471 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -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\''
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index d326b43b5..9262e4271 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -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);
}