From 0de067312e375fae00d63b99d280aa796f043c22 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 26 Jan 2010 19:59:44 -0800 Subject: Add a routing that allow add and edit form requests to be routed the same way as non admin forms. i.e. a uri of /form/add/admin//parms gets routed as admin/ --- modules/gallery/config/routes.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gallery/config') diff --git a/modules/gallery/config/routes.php b/modules/gallery/config/routes.php index 63cc6150..8ccd5a01 100644 --- a/modules/gallery/config/routes.php +++ b/modules/gallery/config/routes.php @@ -21,6 +21,10 @@ // Admin controllers are not available, except via /admin $config["^admin_.*"] = null; +// Redirect /form/add/admin/controller and /form/edit/admin/controller to +// admin/controller/form_(add|edit)/parms. provides the same as below for admin pages +$config["^form/(edit|add)/admin/(\w+)/(.*)$"] = "admin/$2/form_$1/$3"; + // Redirect /form/add and /form/edit to the module/form_(add|edit)/parms. $config["^form/(edit|add)/(\w+)/(.*)$"] = "$2/form_$1/$3"; -- cgit v1.2.3 From dad537effedc51d7544e32a1b7b0ca70896d43af Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 31 Jan 2010 11:24:00 -0800 Subject: Update the timezone field to match the setting in system/config/locale.php. This fixes the "date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID '' is invalid" error. --- modules/gallery/config/locale.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/config') diff --git a/modules/gallery/config/locale.php b/modules/gallery/config/locale.php index 4789dc2b..2d401758 100644 --- a/modules/gallery/config/locale.php +++ b/modules/gallery/config/locale.php @@ -32,7 +32,7 @@ $config['language'] = array('en_US', 'English_United States'); * Locale timezone. Defaults to use the server timezone. * @see http://php.net/timezones */ -$config['timezone'] = ''; +$config['timezone'] = ini_get('date.timezone'); // i18n settings -- cgit v1.2.3 From 4cd5c4cebbe80f90dd781336f9206be10113575b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 31 Jan 2010 11:27:54 -0800 Subject: Second attempt to fix the timezone issue. If the timezone is not set in phpinfo(), then force it to America/Los_Angeles for now. --- modules/gallery/config/locale.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/gallery/config') diff --git a/modules/gallery/config/locale.php b/modules/gallery/config/locale.php index 2d401758..f8241444 100644 --- a/modules/gallery/config/locale.php +++ b/modules/gallery/config/locale.php @@ -33,6 +33,10 @@ $config['language'] = array('en_US', 'English_United States'); * @see http://php.net/timezones */ $config['timezone'] = ini_get('date.timezone'); +if (empty($config['timezone'])) { + // This is a required field. Pick something as a default. + $config['timezone'] = "America/Los_Angeles"; +} // i18n settings -- cgit v1.2.3