? 371235-patched-benchmarks.txt
? 371235-unpatched-benchmarks.txt
? sites/all/modules/cvs
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.867
diff -u -p -r1.867 common.inc
--- includes/common.inc 13 Feb 2009 04:43:00 -0000 1.867
+++ includes/common.inc 15 Feb 2009 21:06:41 -0000
@@ -2917,7 +2917,7 @@ function drupal_get_token($value = '') {
*/
function drupal_valid_token($token, $value = '', $skip_anonymous = FALSE) {
global $user;
- return (($skip_anonymous && $user->uid == 0) || ($token == md5(session_id() . $value . variable_get('drupal_private_key', ''))));
+ return (($skip_anonymous && !$user->uid) || ($token == md5(session_id() . $value . variable_get('drupal_private_key', ''))));
}
/**
@@ -3254,7 +3254,7 @@ function drupal_render_page($page) {
*
* Recursively iterates over each of the array elements, generating HTML code.
*
- * HTML generation is controlled by two properties containing theme functions,
+ * HTML generation is controlled by two properties containing theme functions,
* #theme and #theme_wrapper.
*
* #theme is the theme function called first. If it is set and the element has any
@@ -3265,13 +3265,13 @@ function drupal_render_page($page) {
*
* The theme function in #theme_wrapper will be called after #theme has run. It
* can be used to add further markup around the rendered children, e.g. fieldsets
- * add the required markup for a fieldset around their rendered child elements.
+ * add the required markup for a fieldset around their rendered child elements.
* A wrapper theme function always has to include the element's #children property
- * in its output, as this contains the rendered children.
+ * in its output, as this contains the rendered children.
*
* For example, for the form element type, by default only the #theme_wrapper
* property is set, which adds the form markup around the rendered child elements
- * of the form. This allows you to set the #theme property on a specific form to
+ * of the form. This allows you to set the #theme property on a specific form to
* a custom theme function, giving you complete control over the placement of the
* form's children while not at all having to deal with the form markup itself.
*
@@ -3305,7 +3305,7 @@ function drupal_render(&$elements) {
else {
$elements += element_basic_defaults();
}
-
+
// If #markup is not empty and no theme function is set, use theme_markup.
// This allows to specify just #markup on an element without setting the #type.
if (!empty($elements['#markup']) && empty($elements['#theme'])) {
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.320
diff -u -p -r1.320 form.inc
--- includes/form.inc 3 Feb 2009 18:55:29 -0000 1.320
+++ includes/form.inc 15 Feb 2009 21:06:43 -0000
@@ -485,7 +485,7 @@ function drupal_prepare_form($form_id, &
// requested previously by the user and protects against cross site request
// forgeries.
if (isset($form['#token'])) {
- if ($form['#token'] === FALSE || $user->uid == 0 || $form['#programmed']) {
+ if ($form['#token'] === FALSE || !$user->uid || $form['#programmed']) {
unset($form['#token']);
}
else {
@@ -1972,7 +1972,7 @@ function theme_checkboxes($element) {
$class .= ' ' . $element['#attributes']['class'];
}
$element['#children'] = '
' . (!empty($element['#children']) ? $element['#children'] : '') . '
';
-
+
return $element['#children'];
}
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.65
diff -u -p -r1.65 session.inc
--- includes/session.inc 19 Jan 2009 10:46:50 -0000 1.65
+++ includes/session.inc 15 Feb 2009 21:06:43 -0000
@@ -128,7 +128,7 @@ function _sess_write($key, $value) {
// has been started, do nothing. This keeps anonymous users, including
// crawlers, out of the session table, unless they actually have something
// stored in $_SESSION.
- if (!drupal_save_session() || ($user->uid == 0 && empty($_COOKIE[session_name()]) && empty($value))) {
+ if (!drupal_save_session() || (!$user->uid && empty($_COOKIE[session_name()]) && empty($value))) {
return TRUE;
}
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.692
diff -u -p -r1.692 comment.module
--- modules/comment/comment.module 7 Feb 2009 20:10:40 -0000 1.692
+++ modules/comment/comment.module 15 Feb 2009 21:06:45 -0000
@@ -1662,7 +1662,7 @@ function comment_form_add_preview($form,
*/
function comment_form_validate($form, &$form_state) {
global $user;
- if ($user->uid === 0) {
+ if (!$user->uid) {
foreach (array('name', 'homepage', 'mail') as $field) {
// Set cookie for 365 days.
if (isset($form_state['values'][$field])) {
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1024
diff -u -p -r1.1024 node.module
--- modules/node/node.module 13 Feb 2009 02:27:59 -0000 1.1024
+++ modules/node/node.module 15 Feb 2009 21:06:50 -0000
@@ -1946,7 +1946,7 @@ function node_feed($nids = FALSE, $chann
$item->body = $content;
unset($item->teaser);
}
-
+
// Allow modules to modify the fully-built node.
node_invoke_nodeapi($item, 'alter', $teaser, FALSE);
}
@@ -2342,7 +2342,7 @@ function node_access($op, $node, $accoun
}
// Let authors view their own nodes.
- if ($op == 'view' && $account->uid == $node->uid && $account->uid != 0) {
+ if ($op == 'view' && $account->uid == $node->uid && $account->uid) {
return TRUE;
}
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.37
diff -u -p -r1.37 user.admin.inc
--- modules/user/user.admin.inc 3 Feb 2009 18:55:32 -0000 1.37
+++ modules/user/user.admin.inc 15 Feb 2009 21:06:55 -0000
@@ -146,7 +146,7 @@ function user_admin_account() {
$sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
$sql .= tablesort_sql($header);
- $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
+ $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid > 0 ' . $filter['where'];
$result = pager_query($sql, 50, 0, $query_count, $filter['args']);
$form['options'] = array(
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.28
diff -u -p -r1.28 user.test
--- modules/user/user.test 9 Feb 2009 07:36:15 -0000 1.28
+++ modules/user/user.test 15 Feb 2009 21:07:00 -0000
@@ -346,9 +346,9 @@ class UserCancelTestCase extends DrupalW
// Confirm that user's content has been attributed to anonymous user.
$test_node = node_load($node->nid, NULL, TRUE);
- $this->assertTrue(($test_node->uid == 0 && $test_node->status == 1), t('Node of the user has been attributed to anonymous user.'));
+ $this->assertTrue((!$test_node->uid && $test_node->status == 1), t('Node of the user has been attributed to anonymous user.'));
$test_node = node_load($revision_node->nid, $revision, TRUE);
- $this->assertTrue(($test_node->uid == 0 && $test_node->status == 1), t('Node revision of the user has been attributed to anonymous user.'));
+ $this->assertTrue((!$test_node->uid && $test_node->status == 1), t('Node revision of the user has been attributed to anonymous user.'));
$test_node = node_load($revision_node->nid, NULL, TRUE);
$this->assertTrue(($test_node->uid != 0 && $test_node->status == 1), t("Current revision of the user's node was not attributed to anonymous user."));