summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-10-16 13:18:32 +0000
committerDries Buytaert <dries@buytaert.net>2009-10-16 13:18:32 +0000
commitf0a8150b1160e47d7d2865836240f973292ac68d (patch)
tree5895bd79a526c26f4dd6a43f1be639791ef144ce
parent9dda515bbc8007685d523f7d202ea01588dd085e (diff)
downloadbrdo-f0a8150b1160e47d7d2865836240f973292ac68d.tar.gz
brdo-f0a8150b1160e47d7d2865836240f973292ac68d.tar.bz2
- Patch #604618 by axyjo, sun: archiver code clean-up.
-rw-r--r--includes/archiver.inc1
-rw-r--r--includes/common.inc28
-rw-r--r--modules/system/system.api.php20
-rw-r--r--modules/system/system.archiver.inc1
4 files changed, 25 insertions, 25 deletions
diff --git a/includes/archiver.inc b/includes/archiver.inc
index 8d514794a..caf0a0ca0 100644
--- a/includes/archiver.inc
+++ b/includes/archiver.inc
@@ -1,4 +1,5 @@
<?php
+// $Id$
/**
* @file
diff --git a/includes/common.inc b/includes/common.inc
index bcc2cbd22..a1c47c3da 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2595,7 +2595,7 @@ function l($text, $path, array $options = array()) {
*
* In order for page callbacks to be reusable in different delivery formats,
* they should not issue any "print" or "echo" statements, but instead just
- * return content.
+ * return content.
*
* @param $page_callback_result
* The result of a page callback. Can be one of:
@@ -2608,7 +2608,7 @@ function l($text, $path, array $options = array()) {
* to be appropriate for the page request as determined by the calling
* function (e.g., menu_execute_active_handler()). If not given, it is
* determined from the menu router information of the current page. In either
- * case, modules have a final chance to alter which function is called.
+ * case, modules have a final chance to alter which function is called.
*
* @see menu_execute_active_handler()
* @see hook_menu()
@@ -2655,7 +2655,7 @@ function drupal_deliver_html_page($page_callback_result) {
// Menu status constants are integers; page content is a string or array.
if (is_int($page_callback_result)) {
// @todo: Break these up into separate functions?
- switch ($page_callback_result) {
+ switch ($page_callback_result) {
case MENU_NOT_FOUND:
// Print a 404 page.
drupal_add_http_header('404 Not Found');
@@ -2719,7 +2719,7 @@ function drupal_deliver_html_page($page_callback_result) {
drupal_add_http_header('503 Service unavailable');
drupal_set_title(t('Site under maintenance'));
print theme('maintenance_page', array('content' => filter_xss_admin(variable_get('maintenance_mode_message',
- t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))))));
+ t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')))))));
break;
}
}
@@ -5983,16 +5983,16 @@ function archiver_get_archiver($file) {
$archiver_info = archiver_get_info();
foreach ($archiver_info as $implementation) {
- foreach ($implementation['extensions'] as $extension) {
- // Because extensions may be multi-part, such as .tar.gz,
- // we cannot use simpler approaches like substr() or pathinfo().
- // This method isn't quite as clean but gets the job done.
- // Also note that the file may not yet exist, so we cannot rely
- // on fileinfo() or other disk-level utilities.
- if (strrpos($file, '.' . $extension) === strlen($file) - strlen('.' . $extension)) {
- return new $implementation['class']($file);
- }
- }
+ foreach ($implementation['extensions'] as $extension) {
+ // Because extensions may be multi-part, such as .tar.gz,
+ // we cannot use simpler approaches like substr() or pathinfo().
+ // This method isn't quite as clean but gets the job done.
+ // Also note that the file may not yet exist, so we cannot rely
+ // on fileinfo() or other disk-level utilities.
+ if (strrpos($file, '.' . $extension) === strlen($file) - strlen('.' . $extension)) {
+ return new $implementation['class']($file);
+ }
+ }
}
}
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index f6b9be1ef..3a619a95b 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -2333,7 +2333,7 @@ function hook_drupal_goto_alter(&$path, &$options, &$http_response_code) {
* the Drupal installation process that occurs after the installation profile
* is selected.
* @param $install_state
- * An array of information about the current installation state.
+ * An array of information about the current installation state.
*/
function hook_install_tasks_alter(&$tasks, $install_state) {
// Replace the "Choose language" installation task provided by Drupal core
@@ -2455,17 +2455,15 @@ function hook_action_info_alter(&$actions) {
* zip files and tar.gz files. All archiver classes must implement
* ArchiverInterface.
*
- * When mapping a
- *
* Each entry should be keyed on a unique value, and specify three
* additional keys:
- * - class: The name of the PHP class for this archiver.
- * - extensions: An array of file extensions that this archiver supports.
- * - weight: This optional key specifies the weight of this archiver.
- * When mapping file extensions to archivers, the first archiver by
- * weight found that supports the requested extension will be used.
+ * - class: The name of the PHP class for this archiver.
+ * - extensions: An array of file extensions that this archiver supports.
+ * - weight: This optional key specifies the weight of this archiver.
+ * When mapping file extensions to archivers, the first archiver by
+ * weight found that supports the requested extension will be used.
*/
-function system_archiver_info() {
+function hook_archiver_info() {
return array(
'tar' => array(
'class' => 'ArchiverTar',
@@ -2508,7 +2506,7 @@ function hook_date_format_types() {
* module can define additional types that can be used when displaying dates. A
* date type is a key which can be passed to format_date() to return a date in
* the configured displayed format. A date format is a string defining the date
- * and time elements to use. For example, a date type could be
+ * and time elements to use. For example, a date type could be
* 'mymodule_extra_long', while a date format is like 'Y-m-d'.
*
* New date types must first be declared using hook_date_format_types(). It is
@@ -2536,7 +2534,7 @@ function hook_date_format_types() {
* 'short', 'mymodule_extra_long'. It must first be declared in
* hook_date_format_types() unless extending a type provided by another
* module.
- * - 'format': a string defining the date and time elements to use. It
+ * - 'format': a string defining the date and time elements to use. It
* can contain any of the formatting options described at
* http://php.net/manual/en/function.date.php
* - 'locales': (optional) an array of 2 and 5 character language codes, for
diff --git a/modules/system/system.archiver.inc b/modules/system/system.archiver.inc
index 65bf63e3a..557a27d80 100644
--- a/modules/system/system.archiver.inc
+++ b/modules/system/system.archiver.inc
@@ -1,4 +1,5 @@
<?php
+// $Id$
/**
* @file