diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-09-12 17:16:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-09-12 17:16:17 +0000 |
commit | d186dcc8c8ba9c6abb0e8db22e4259d17909b38b (patch) | |
tree | b76f5e14cae3c73e9eea0578a867d7e5422cbd6e /modules | |
parent | 8c07aaa9c776c080bdd925c2efd2cb4ec655cdba (diff) | |
download | brdo-d186dcc8c8ba9c6abb0e8db22e4259d17909b38b.tar.gz brdo-d186dcc8c8ba9c6abb0e8db22e4259d17909b38b.tar.bz2 |
- Patch #10668 by drumm: moved the 'first day of week' settings to the system module for other modules to reuse. This is considered to be a usability improvement because it simplifies some pages/workflow.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/archive.module | 16 | ||||
-rw-r--r-- | modules/archive/archive.module | 16 | ||||
-rw-r--r-- | modules/system.module | 1 | ||||
-rw-r--r-- | modules/system/system.module | 1 |
4 files changed, 2 insertions, 32 deletions
diff --git a/modules/archive.module b/modules/archive.module index abc8148ad..b9347202b 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -213,12 +213,6 @@ function archive_menu() { 'access' => user_access('access content'), 'callback' => 'archive_page', 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'archive/browse', 'title' => t('browse'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'archive/configure', 'title' => t('configure'), - 'access' => user_access('administer site configuration'), - 'callback' => 'archive_configure', - 'type' => MENU_LOCAL_TASK); return $items; } @@ -262,14 +256,4 @@ function archive_page($year = 0, $month = 0, $day = 0) { print theme('page', $output); } -function archive_configure() { - if ($_POST) { - system_settings_save(); - } - - $output = form_select(t('First day of week'), 'default_firstday', variable_get('default_firstday', 0), array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), t('The first day of the week. By changing this value you choose how the calendar block is rendered.')); - - print theme('page', system_settings_form($output)); -} - ?> diff --git a/modules/archive/archive.module b/modules/archive/archive.module index abc8148ad..b9347202b 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -213,12 +213,6 @@ function archive_menu() { 'access' => user_access('access content'), 'callback' => 'archive_page', 'type' => MENU_SUGGESTED_ITEM); - $items[] = array('path' => 'archive/browse', 'title' => t('browse'), - 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); - $items[] = array('path' => 'archive/configure', 'title' => t('configure'), - 'access' => user_access('administer site configuration'), - 'callback' => 'archive_configure', - 'type' => MENU_LOCAL_TASK); return $items; } @@ -262,14 +256,4 @@ function archive_page($year = 0, $month = 0, $day = 0) { print theme('page', $output); } -function archive_configure() { - if ($_POST) { - system_settings_save(); - } - - $output = form_select(t('First day of week'), 'default_firstday', variable_get('default_firstday', 0), array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), t('The first day of the week. By changing this value you choose how the calendar block is rendered.')); - - print theme('page', system_settings_form($output)); -} - ?> diff --git a/modules/system.module b/modules/system.module index 073b5a561..e909c2762 100644 --- a/modules/system.module +++ b/modules/system.module @@ -241,6 +241,7 @@ function system_view_general() { $group .= form_select(t('Short date format'), 'date_format_short', variable_get('date_format_short', $dateshort[0]), $dateshortchoices, t('The short format of date display.')); $group .= form_select(t('Medium date format'), 'date_format_medium', variable_get('date_format_medium', $datemedium[0]), $datemediumchoices, t('The medium sized date display.')); $group .= form_select(t('Long date format'), 'date_format_long', variable_get('date_format_long', $datelong[0]), $datelongchoices, t('Longer date format used for detailed display.')); + $group .= form_select(t('First day of week'), 'default_firstday', variable_get('default_firstday', 0), array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), t('The first day of the week for calendar views.')); $output .= form_group(t('Date settings'), $group); diff --git a/modules/system/system.module b/modules/system/system.module index 073b5a561..e909c2762 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -241,6 +241,7 @@ function system_view_general() { $group .= form_select(t('Short date format'), 'date_format_short', variable_get('date_format_short', $dateshort[0]), $dateshortchoices, t('The short format of date display.')); $group .= form_select(t('Medium date format'), 'date_format_medium', variable_get('date_format_medium', $datemedium[0]), $datemediumchoices, t('The medium sized date display.')); $group .= form_select(t('Long date format'), 'date_format_long', variable_get('date_format_long', $datelong[0]), $datelongchoices, t('Longer date format used for detailed display.')); + $group .= form_select(t('First day of week'), 'default_firstday', variable_get('default_firstday', 0), array(0 => t('Sunday'), 1 => t('Monday'), 2 => t('Tuesday'), 3 => t('Wednesday'), 4 => t('Thursday'), 5 => t('Friday'), 6 => t('Saturday')), t('The first day of the week for calendar views.')); $output .= form_group(t('Date settings'), $group); |