diff --git a/INSTALL.txt b/INSTALL.txt index b4f3cfcf33162690da25abdd60f54205cd6945e5..66b416ec2b82292335d9ee1ff3ac1ad15643aff7 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -108,7 +108,7 @@ INSTALLATION The install script will attempt to create a files storage directory in the default location at sites/default/files (the location of the - files directory may be changed after Drupal is installed). In some + files directory may be changed after Drupal is installed). In some cases, you may need to create the directory and modify its permissions manually. Use the following commands (from the installation directory) to create the files directory and grant the web server write privileges to it: diff --git a/includes/menu.inc b/includes/menu.inc index b28c7c433c0eb5fa95cf06efc03bd330a8c23942..52bb2e9775841a99c06d1eb5f6d15013698e3056 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -607,7 +607,7 @@ function _menu_link_translate(&$item) { } // If the link title matches that of its router item, localize it. - if (!empty($item['title']) && ($item['title'] == $item['link_title'])){ + if (!empty($item['title']) && ($item['title'] == $item['link_title'])) { if (!empty($item['title_arguments']) && $item['title_callback'] == 't') { $item['title'] = t($item['title'], menu_unserialize($item['title_arguments'], $map)); } diff --git a/includes/unicode.inc b/includes/unicode.inc index c58e81bb5d971e75c79df1c3c08a031bb0b41d3c..19c74422bfcf67fd2dac8fd1cd0e923dfeb683b3 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -208,7 +208,7 @@ function drupal_convert_to_utf8($data, $encoding) { */ function drupal_truncate_bytes($string, $len) { if (strlen($string) <= $len) { - return $string; + return $string; } if ((ord($string[$len]) < 0x80) || (ord($string[$len]) >= 0xC0)) { return substr($string, 0, $len); diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 3dc172b2c0706f5f4464d1c57752e10f3a420c0d..0b7e5a420841cd296c295bc6c640ab3dcf13e991 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -716,15 +716,11 @@ function aggregator_parse_feed(&$data, $feed) { } xml_parser_free($xml_parser); - /* - ** We reverse the array such that we store the first item last, - ** and the last item first. In the database, the newest item - ** should be at the top. - */ - + // We reverse the array such that we store the first item last, and the last + // item first. In the database, the newest item should be at the top. $items = array_reverse($items); - // Initialize variables + // Initialize variables. $title = $link = $author = $description = $guid = NULL; foreach ($items as $item) { unset($title, $link, $author, $description, $guid); @@ -734,12 +730,9 @@ function aggregator_parse_feed(&$data, $feed) { $item[$key] = trim($value); } - /* - ** Resolve the item's title. If no title is found, we use - ** up to 40 characters of the description ending at a word - ** boundary but not splitting potential entities. - */ - + // Resolve the item's title. If no title is found, we use up to 40 + // characters of the description ending at a word boundary but not + // splitting potential entities. if (!empty($item['TITLE'])) { $title = $item['TITLE']; } @@ -750,10 +743,7 @@ function aggregator_parse_feed(&$data, $feed) { $title = ''; } - /* - ** Resolve the items link. - */ - + // Resolve the items link. if (!empty($item['LINK'])) { $link = $item['LINK']; } @@ -762,9 +752,7 @@ function aggregator_parse_feed(&$data, $feed) { } $guid = isset($item['GUID']) ? $item['GUID'] : ''; - /** - * Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag - */ + // Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag. if (!empty($item['CONTENT:ENCODED'])) { $item['DESCRIPTION'] = $item['CONTENT:ENCODED']; } @@ -775,11 +763,8 @@ function aggregator_parse_feed(&$data, $feed) { $item['DESCRIPTION'] = $item['CONTENT']; } - /* - ** Try to resolve and parse the item's publication date. If no - ** date is found, we use the current date instead. - */ - + // Try to resolve and parse the item's publication date. If no date is + // found, we use the current date instead. $date = 'now'; foreach (array('PUBDATE', 'DC:DATE', 'DCTERMS:ISSUED', 'DCTERMS:CREATED', 'DCTERMS:MODIFIED', 'ISSUED', 'CREATED', 'MODIFIED', 'PUBLISHED', 'UPDATED') as $key) { if (!empty($item[$key])) { @@ -796,12 +781,9 @@ function aggregator_parse_feed(&$data, $feed) { } } - /* - ** Save this item. Try to avoid duplicate entries as much as - ** possible. If we find a duplicate entry, we resolve it and - ** pass along its ID is such that we can update it if needed. - */ - + // Save this item. Try to avoid duplicate entries as much as possible. If + // we find a duplicate entry, we resolve it and pass along its ID is such + // that we can update it if needed. if (!empty($guid)) { $entry = db_fetch_object(db_query("SELECT iid FROM {aggregator_item} WHERE fid = %d AND guid = '%s'", $feed['fid'], $guid)); } @@ -815,10 +797,7 @@ function aggregator_parse_feed(&$data, $feed) { aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid: ''), 'fid' => $feed['fid'], 'timestamp' => $timestamp, 'title' => $title, 'link' => $link, 'author' => $item['AUTHOR'], 'description' => $item['DESCRIPTION'], 'guid' => $guid)); } - /* - ** Remove all items that are older than flush item timer: - */ - + // Remove all items that are older than flush item timer. $age = time() - variable_get('aggregator_clear', 9676800); $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = %d AND timestamp < %d', $feed['fid'], $age); diff --git a/modules/blog/blog.module b/modules/blog/blog.module index a35b250f954463ff7a5e7bfb174a26e39a4840ff..0f2987781d5ae986a19d329611ec16da1a45ca32 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -80,11 +80,8 @@ function blog_form(&$node) { if (empty($node->body)) { - /* - ** If the user clicked a "blog it" link, we load the data from the - ** database and quote it in the blog: - */ - + // If the user clicked a "blog it" link, we load the data from the + // database and quote it in the blog. if ($nid && $blog = node_load($nid)) { $node->body = '<em>'. $blog->body .'</em> ['. l($blog->name, "node/$nid") .']'; } diff --git a/modules/color/color.module b/modules/color/color.module index a65271ba50f6822babd630fcc818b0e460180c76..bdbdad550b28326c7f6cdc97e7e5fd6a2a160cea 100644 --- a/modules/color/color.module +++ b/modules/color/color.module @@ -32,22 +32,22 @@ function color_theme() { function color_form_alter(&$form, $form_state, $form_id) { // Insert the color changer into the theme settings page. if ($form_id == 'system_theme_settings' && color_get_info(arg(4)) && function_exists('gd_info')) { - if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) != FILE_DOWNLOADS_PUBLIC) { - // Disables the color changer when the private download method is used. - // TODO: This should be solved in a different way. See issue #181003. - drupal_set_message(t('The color picker only works if the <a href="@url">download method</a> is set to public.', array('@url' => url('admin/settings/file-system'))), 'warning'); - } - else { - $form['color'] = array( - '#type' => 'fieldset', - '#title' => t('Color scheme'), - '#weight' => -1, - '#attributes' => array('id' => 'color_scheme_form'), - '#theme' => 'color_scheme_form', - ); - $form['color'] += color_scheme_form($form_state, arg(4)); - $form['#submit'][] = 'color_scheme_form_submit'; - } + if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) != FILE_DOWNLOADS_PUBLIC) { + // Disables the color changer when the private download method is used. + // TODO: This should be solved in a different way. See issue #181003. + drupal_set_message(t('The color picker only works if the <a href="@url">download method</a> is set to public.', array('@url' => url('admin/settings/file-system'))), 'warning'); + } + else { + $form['color'] = array( + '#type' => 'fieldset', + '#title' => t('Color scheme'), + '#weight' => -1, + '#attributes' => array('id' => 'color_scheme_form'), + '#theme' => 'color_scheme_form', + ); + $form['color'] += color_scheme_form($form_state, arg(4)); + $form['#submit'][] = 'color_scheme_form_submit'; + } } // Use the generated screenshot in the theme list. diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 2d97e0ed2a129948e86ffa54ec81845f3c082461..0f820489c06772955517ed2bca6b8f167ef832e0 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -976,13 +976,9 @@ function comment_render($node, $cid = 0) { $query .= ' ORDER BY c.cid'; } else { - - /* - ** See comment above. Analysis learns that this doesn't cost - ** too much. It scales much much better than having the whole - ** comment structure. - */ - + // See comment above. Analysis reveals that this doesn't cost too + // much. It scales much much better than having the whole comment + // structure. $query .= ' ORDER BY SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))'; } } diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 251fc08760f73741264caed0e4ffcaa332fe388d..fd7c24953d5064f90dedf43c03b840702cc3c18b 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -43,14 +43,14 @@ function locale_help($path, $arg) { case 'admin/settings/language': $output = '<p>'. t("This page provides an overview of your site's enabled languages. If multiple languages are available and enabled, the text on your site interface may be translated, registered users may select their preferred language on the <em>My account</em> page, and site authors may indicate a specific language when creating posts. The site's default language is used for anonymous visitors and for users who have not selected a preferred language.") .'</p>'; $output .= '<p>'. t('For each language available on the site, use the <em>edit</em> link to configure language details, including name, an optional language-specific path or domain, and whether the language is natively presented either left-to-right or right-to-left. These languages also appear in the <em>Language</em> selection when creating a post of a content type with multilingual support.') .'</p>'; - $output .= '<p>' .t('Use the <a href="@add-language">add language page</a> to enable additional languages (and automatically import files from a translation package, if available), the <a href="@search">translate interface page</a> to locate strings for manual translation, or the <a href="@import">import page</a> to add translations from individual <em>.po</em> files. A number of contributed translation packages containing <em>.po</em> files are available on the <a href="@translations">Drupal.org translations page</a>.', array('@add-language' => url('admin/settings/language/add'), '@search' => url('admin/build/translate/search'), '@import' => url('admin/build/translate/import'), '@translations' => 'http://drupal.org/project/translations')) .'</p>'; + $output .= '<p>'. t('Use the <a href="@add-language">add language page</a> to enable additional languages (and automatically import files from a translation package, if available), the <a href="@search">translate interface page</a> to locate strings for manual translation, or the <a href="@import">import page</a> to add translations from individual <em>.po</em> files. A number of contributed translation packages containing <em>.po</em> files are available on the <a href="@translations">Drupal.org translations page</a>.', array('@add-language' => url('admin/settings/language/add'), '@search' => url('admin/build/translate/search'), '@import' => url('admin/build/translate/import'), '@translations' => 'http://drupal.org/project/translations')) .'</p>'; return $output; case 'admin/settings/language/add': return '<p>'. t('Add all languages to be supported by your site. If your desired language is not available in the <em>Language name</em> drop-down, click <em>Custom language</em> and provide a language code and other details manually. When providing a language code manually, be sure to enter a standardized language code, since this code may be used by browsers to determine an appropriate display language.') .'</p>'; case 'admin/settings/language/configure': $output = '<p>'. t("Language negotiation settings determine the site's presentation language. Available options include:") .'</p>'; - $output .= '<ul><li>' .t('<strong>None.</strong> The default language is used for site presentation, though users may (optionally) select a preferred language on the <em>My Account</em> page. (User language preferences will be used for site e-mails, if available.)'). '</li>'; - $output .= '<li>' .t('<strong>Path prefix only.</strong> The presentation language is determined by examining the path for a language code or other custom string that matches the path prefix (if any) specified for each language. If a suitable prefix is not identified, the default language is used. <em>Example: "example.com/de/contact" sets presentation language to German based on the use of "de" within the path.</em>') .'</li>'; + $output .= '<ul><li>'. t('<strong>None.</strong> The default language is used for site presentation, though users may (optionally) select a preferred language on the <em>My Account</em> page. (User language preferences will be used for site e-mails, if available.)') .'</li>'; + $output .= '<li>'. t('<strong>Path prefix only.</strong> The presentation language is determined by examining the path for a language code or other custom string that matches the path prefix (if any) specified for each language. If a suitable prefix is not identified, the default language is used. <em>Example: "example.com/de/contact" sets presentation language to German based on the use of "de" within the path.</em>') .'</li>'; $output .= '<li>'. t("<strong>Path prefix with language fallback.</strong> The presentation language is determined by examining the path for a language code or other custom string that matches the path prefix (if any) specified for each language. If a suitable prefix is not identified, the display language is determined by the user's language preferences from the <em>My Account</em> page, or by the browser's language settings. If a presentation language cannot be determined, the default language is used.") .'</t>'; $output .= '<li>'. t('<strong>Domain name only.</strong> The presentation language is determined by examining the domain used to access the site, and comparing it to the language domain (if any) specified for each language. If a match is not identified, the default language is used. <em>Example: "http://de.example.com/contact" sets presentation language to German based on the use of "http://de.example.com" in the domain.</em>') .'</li></ul>'; $output .= '<p>'. t('The path prefix or domain name for a language may be set by editing the <a href="@languages">available languages</a>. In the absence of an appropriate match, the site is displayed in the <a href="@languages">default language</a>.', array('@languages' => url('admin/settings/language'))) .'</p>'; diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index 3697b17c3024d455d76d2861a8ddb9d6a2aa0020..0c34f1b41cf7a75fb28bd8650afc6b25ef1db004 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -375,12 +375,12 @@ function node_mass_update($nodes, $updates) { 'error_message' => t('The update has encountered an error.'), // The operations do not live in the .module file, so we need to // tell the batch engine which file to load before calling them. - 'file' => drupal_get_path('module', 'node'). '/node.admin.inc', + 'file' => drupal_get_path('module', 'node') .'/node.admin.inc', ); batch_set($batch); } else { - foreach($nodes as $nid) { + foreach ($nodes as $nid) { _node_mass_update_helper($nid, $updates); } drupal_set_message(t('The update has been performed.')); diff --git a/modules/node/node.module b/modules/node/node.module index f936399e9edd3a130f670b4f230ae715fac6d04c..85a49cfedbb418639b0744cfb3b79d680e3afbec 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -35,7 +35,7 @@ function node_help($path, $arg) { case 'admin/help#node': $output = '<p>'. t('The node module manages content on your site, and stores all posts (regardless of type) as a "node". In addition to basic publishing settings, including whether the post has been published, promoted to the site front page, or should remain present (or sticky) at the top of lists, the node module also records basic information about the author of a post. Optional revision control over edits is available. For additional functionality, the node module is often extended by other modules.') .'</p>'; $output .= '<p>'. t('Though each post on your site is a node, each post is also of a particular <a href="@content-type">content type</a>. <a href="@content-type">Content types</a> are used to define the characteristics of a post, including the title and description of the fields displayed on its add and edit pages. Each content type may have different default settings for <em>Publishing options</em> and other workflow controls. By default, the two content types in a standard Drupal installation are <em>Page</em> and <em>Story</em>. Use the <a href="@content-type">content types page</a> to add new or edit existing content types. Additional content types also become available as you enable additional core, contributed and custom modules.', array('@content-type' => url('admin/content/types'))) .'</p>'; - $output .= '<p>'. t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The <a href="@post-settings">post settings page</a> sets certain options for the display of posts. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content/node'),'@post-settings' => url('admin/content/node-settings'), '@permissions' => url('admin/user/permissions'))) .'</p>'; + $output .= '<p>'. t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The <a href="@post-settings">post settings page</a> sets certain options for the display of posts. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content/node'), '@post-settings' => url('admin/content/node-settings'), '@permissions' => url('admin/user/permissions'))) .'</p>'; $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@node">Node module</a>.', array('@node' => 'http://drupal.org/handbook/modules/node/')) .'</p>'; return $output; case 'admin/content/node': diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index e7544593adc786fcd0c50d7d443b18202ec9a4a5..9ff4af5a2950d5b6f8aa6196a3772eceffe695b8 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -393,7 +393,7 @@ function _openid_fix_post(&$post) { $fixed_key = str_replace('openid.ns_', 'openid.ns.', $fixed_key); $fixed_key = str_replace('openid.sreg_', 'openid.sreg.', $fixed_key); foreach ($extensions as $ext) { - $fixed_key = str_replace('openid.'.$ext.'_', 'openid.'.$ext.'.', $fixed_key); + $fixed_key = str_replace('openid.'. $ext .'_', 'openid.'. $ext .'.', $fixed_key); } unset($post[$key]); $post[$fixed_key] = $value; @@ -417,4 +417,4 @@ function bcpowmod($base, $exp, $mod) { } return $result; } -} \ No newline at end of file +} diff --git a/modules/path/path.admin.inc b/modules/path/path.admin.inc index d63d26c620ef733a43a8f434871c69b6bc3ad095..71488639d874610165f7f7c8f1faa550aafe88c6 100644 --- a/modules/path/path.admin.inc +++ b/modules/path/path.admin.inc @@ -158,7 +158,7 @@ function path_admin_form_submit($form, &$form_state) { /** * Menu callback; confirms deleting an URL alias - **/ + */ function path_admin_delete_confirm($form_state, $pid) { $path = path_load($pid); if (user_access('administer url aliases')) { @@ -172,7 +172,7 @@ function path_admin_delete_confirm($form_state, $pid) { /** * Execute URL alias deletion - **/ + */ function path_admin_delete_confirm_submit($form, &$form_state) { if ($form_state['values']['confirm']) { path_admin_delete($form_state['values']['pid']); diff --git a/modules/trigger/trigger.admin.inc b/modules/trigger/trigger.admin.inc index 0573ac8afcb73b8be4b2669655ad796ca10d7d38..624982208eb07a4b5c2d46854d8f62659924e194 100644 --- a/modules/trigger/trigger.admin.inc +++ b/modules/trigger/trigger.admin.inc @@ -140,7 +140,7 @@ function trigger_assign_form($form_state, $hook, $op, $description) { $form[$op] = array( '#type' => 'fieldset', - '#title' => t('Trigger: '). $description, + '#title' => t('Trigger: ') . $description, '#theme' => 'trigger_display' ); // Retrieve actions that are already assigned to this hook-op combination. diff --git a/modules/trigger/trigger.install b/modules/trigger/trigger.install index bca11130ce5eebcc8fb2bf65d1f95f5ff203e53e..981ad5dbf065d1e50c7ee7a7912dfcc3553c022e 100644 --- a/modules/trigger/trigger.install +++ b/modules/trigger/trigger.install @@ -27,27 +27,27 @@ function trigger_schema() { $schema['trigger_assignments'] = array( 'description' => t('Maps trigger to hook and operation assignments from trigger.module.'), 'fields' => array( - 'hook' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => TRUE, - 'default' => '', - 'description' => t('Primary Key: The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.'), - ), - 'op' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => TRUE, - 'default' => '', - 'description' => t('Primary Key: The specific operation of the hook upon which an action is firing: for example, presave.'), - ), - 'aid' => array( - 'type' => 'varchar', - 'length' => 255, - 'not null' => TRUE, - 'default' => '', - 'description' => t("Primary Key: Action's {actions}.aid."), - ), + 'hook' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Primary Key: The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.'), + ), + 'op' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + 'description' => t('Primary Key: The specific operation of the hook upon which an action is firing: for example, presave.'), + ), + 'aid' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + 'description' => t("Primary Key: Action's {actions}.aid."), + ), 'weight' => array( 'type' => 'int', 'not null' => TRUE, diff --git a/modules/user/user.module b/modules/user/user.module index 0a0c5133211023663c6d293705246e2239a53a5d..05556aecddb58eabb997d2a117f26c424aa32e04 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -118,7 +118,7 @@ function user_external_login($account, $edit = array()) { // Invalid login. return FALSE; } - + // Valid login. global $user; $user = $account;