Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.770
diff -u -p -r1.770 common.inc
--- includes/common.inc	30 May 2008 17:41:51 -0000	1.770
+++ includes/common.inc	7 Jun 2008 18:30:07 -0000
@@ -114,7 +114,7 @@ function drupal_set_html_head($data = NU
  * Retrieve output to be displayed in the head tag of the HTML page.
  */
 function drupal_get_html_head() {
-  $output = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
+  $output = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
   return $output . drupal_set_html_head();
 }
 
@@ -479,7 +479,7 @@ function drupal_http_request($url, $head
 
   // If the server url has a user then attempt to use basic authentication
   if (isset($uri['user'])) {
-    $defaults['Authorization'] = 'Authorization: Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : ''));
+    $defaults['Authorization'] = 'Authorization: Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ':' . $uri['pass'] : ''));
   }
 
   foreach ($headers as $header => $value) {
@@ -968,7 +968,7 @@ function format_xml_elements($array) {
       }
     }
     else {
-      $output .= ' <' . $key . '>' . (is_array($value) ? format_xml_elements($value) : check_plain($value)) . "</$key>\n";
+      $output .= ' <' . $key . '>' . (is_array($value) ? format_xml_elements($value) : check_plain($value)) . '</' . $key . ">\n";
     }
   }
   return $output;
@@ -1034,9 +1034,9 @@ function format_plural($count, $singular
   }
   else {
     switch ($index) {
-      case "0":
+      case '0':
         return t($singular, $args, $langcode);
-      case "1":
+      case '1':
         return t($plural, $args, $langcode);
       default:
         unset($args['@count']);
@@ -1378,7 +1378,7 @@ function drupal_attributes($attributes =
   if (is_array($attributes)) {
     $t = '';
     foreach ($attributes as $key => $value) {
-      $t .= " $key=" . '"' . check_plain($value) . '"';
+      $t .= ' ' . $key . '="' . check_plain($value) . '"';
     }
     return $t;
   }
@@ -2262,7 +2262,7 @@ function drupal_clear_js_cache() {
  */
 function drupal_to_js($var) {
   // json_encode() does not escape <, > and &, so we do it with str_replace()
-  return str_replace(array("<", ">", "&"), array('\x3c', '\x3e', '\x26'), json_encode($var));
+  return str_replace(array('<', '>', '&'), array('\x3c', '\x3e', '\x26'), json_encode($var));
 }
 
 /**
@@ -2609,12 +2609,12 @@ function drupal_system_listing($mask, $d
   // themes as organized by a distribution.  It is pristine in the same way
   // that /modules is pristine for core; users should avoid changing anything
   // there in favor of sites/all or sites/<domain> directories.
-  if (file_exists("profiles/$profile/$directory")) {
-    $searchdir[] = "profiles/$profile/$directory";
+  if (file_exists('profiles/' . $profile . '/' . $directory)) {
+    $searchdir[] = 'profiles/' . $profile . '/' . $directory;
   }
 
-  if (file_exists("$config/$directory")) {
-    $searchdir[] = "$config/$directory";
+  if (file_exists($config . '/' . $directory)) {
+    $searchdir[] = $config . '/' . $directory;
   }
 
   // Get current list of items
@@ -2715,7 +2715,7 @@ function drupal_render(&$elements) {
   // Either the elements did not go through form_builder or one of the children
   // has a #weight.
   if (!isset($elements['#sorted'])) {
-    uasort($elements, "element_sort");
+    uasort($elements, 'element_sort');
   }
   $elements += array('#title' => NULL, '#description' => NULL);
   if (!isset($elements['#children'])) {
@@ -3195,7 +3195,7 @@ function drupal_schema_fields_sql($table
   if ($prefix) {
     $columns = array();
     foreach ($fields as $field) {
-      $columns[] = "$prefix.$field";
+      $columns[] = $prefix . '.' . $field;
     }
     return $columns;
   }
@@ -3298,7 +3298,7 @@ function drupal_write_record($table, &$o
   // Build the SQL.
   $query = '';
   if (!count($update)) {
-    $query = "INSERT INTO {" . $table . "} (" . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')';
+    $query = 'INSERT INTO {' . $table . '} (' . implode(', ', $fields) . ') VALUES (' . implode(', ', $placeholders) . ')';
     $return = SAVED_NEW;
   }
   else {
@@ -3310,12 +3310,12 @@ function drupal_write_record($table, &$o
       $query .= $field . ' = ' . $placeholders[$id];
     }
 
-    foreach ($update as $key){
-      $conditions[] = "$key = " . db_type_placeholder($schema['fields'][$key]['type']);
+    foreach ($update as $key) {
+      $conditions[] = $key . ' = ' . db_type_placeholder($schema['fields'][$key]['type']);
       $values[] = $object->$key;
     }
 
-    $query = "UPDATE {" . $table . "} SET $query WHERE " . implode(' AND ', $conditions);
+    $query = 'UPDATE {' . $table . '} SET $query WHERE ' . implode(' AND ', $conditions);
     $return = SAVED_UPDATED;
   }
 
@@ -3502,7 +3502,7 @@ function drupal_explode_tags($tags) {
     // or includes a comma or quote character), we remove the escape
     // formatting so to save the term into the database as the user intends.
     $tag = trim(str_replace('""', '"', preg_replace('/^"(.*)"$/', '\1', $tag)));
-    if ($tag != "") {
+    if ($tag != '') {
       $tags[] = $tag;
     }
   }
