Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php (revision 8625)
+++ /trunk/admin/configuration.php (revision 8626)
@@ -247,4 +247,9 @@
'CONF_PAGE_BANNER' => htmlspecialchars($conf['page_banner']),
'CONF_GALLERY_URL' => $conf['gallery_url'],
+ 'week_starts_on_options' => array(
+ 'sunday' => $lang['day'][0],
+ 'monday' => $lang['day'][1],
+ ),
+ 'week_starts_on_options_selected' => $conf['week_starts_on'],
));
Index: /trunk/admin/themes/default/template/configuration.tpl
===================================================================
--- /trunk/admin/themes/default/template/configuration.tpl (revision 8625)
+++ /trunk/admin/themes/default/template/configuration.tpl (revision 8626)
@@ -86,4 +86,13 @@
{'Email admins when a new user registers'|@translate}
+
+
+
+
+
Index: /trunk/include/calendar_monthly.class.php
===================================================================
--- /trunk/include/calendar_monthly.class.php (revision 8625)
+++ /trunk/include/calendar_monthly.class.php (revision 8626)
@@ -331,5 +331,5 @@
function build_month_calendar(&$tpl_var)
{
- global $page;
+ global $page, $lang, $conf;
$query='SELECT '.pwg_db_get_dayofmonth($this->date_field).' as period,
@@ -369,7 +369,10 @@
$items[$day]['height'] = $row['height'];
$items[$day]['dow'] = $row['dow'];
- }
-
- global $lang, $conf;
+
+ if ('sunday' == $conf['week_starts_on'])
+ {
+ $items[$day]['dow']++;
+ }
+ }
if ( !empty($items)
@@ -396,5 +399,9 @@
$first_day_dow -= 1;
}
- array_push( $wday_labels, array_shift($wday_labels) );
+
+ if ('monday' == $conf['week_starts_on'])
+ {
+ array_push( $wday_labels, array_shift($wday_labels) );
+ }
// END - pass now in week starting Monday
Index: /trunk/install/config.sql
===================================================================
--- /trunk/install/config.sql (revision 8625)
+++ /trunk/install/config.sql (revision 8626)
@@ -52,2 +52,3 @@
'Information displayed on picture page'
);
+INSERT INTO piwigo_config (param,value,comment) VALUES ('week_starts_on','monday','Monday may not be the first day of the week');
Index: /trunk/install/db/93-database.php
===================================================================
--- /trunk/install/db/93-database.php (revision 8626)
+++ /trunk/install/db/93-database.php (revision 8626)
@@ -0,0 +1,42 @@
+
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php (revision 8625)
+++ /trunk/language/en_UK/admin.lang.php (revision 8626)
@@ -800,3 +800,4 @@
$lang['with no album'] = 'with no album';
$lang['with no tag'] = 'with no tag';
+$lang['Week starts on'] = 'Week starts on';
?>
Index: /trunk/language/fr_FR/admin.lang.php
===================================================================
--- /trunk/language/fr_FR/admin.lang.php (revision 8625)
+++ /trunk/language/fr_FR/admin.lang.php (revision 8626)
@@ -804,3 +804,4 @@
$lang['with no album'] = 'sans album';
$lang['with no tag'] = 'sans tag';
+$lang['Week starts on'] = 'La semaine commence le';
?>