diff -r 6358f769ecb1 -r 745200a9cc2a plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Wed Aug 19 01:28:47 2009 -0400 +++ b/plugins/SpecialUserPrefs.php Thu Aug 20 20:01:55 2009 -0400 @@ -12,8 +12,7 @@ /* * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between - * Version 1.1.6 (Caoineag beta 1) - * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2006-2009 Dan Fuhry * * This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -454,6 +453,9 @@ $hobbies = htmlspecialchars($_POST['hobbies']); $hobbies = $db->escape($hobbies); + $date_format = $db->escape(htmlspecialchars($_POST['date_format'])); + $time_format = $db->escape(htmlspecialchars($_POST['time_format'])); + $email_public = ( isset($_POST['email_public']) ) ? '1' : '0'; $disable_js_fx = ( isset($_POST['disable_js_fx']) ) ? '1' : '0'; @@ -483,6 +485,8 @@ $session->user_extra['user_job'] = $occupation; $session->user_extra['user_hobbies'] = $hobbies; $session->user_extra['email_public'] = intval($email_public); + $session->date_format = $date_format; + $session->time_format = $time_format; // user title $user_title_col = ''; @@ -536,7 +540,8 @@ $q = $db->sql_query('UPDATE '.table_prefix."users_extra SET user_aim='$imaddr_aim',user_yahoo='$imaddr_yahoo',user_msn='$imaddr_msn', user_xmpp='$imaddr_xmpp',user_homepage='$homepage',user_location='$location',user_job='$occupation', - user_hobbies='$hobbies',email_public=$email_public,disable_js_fx=$disable_js_fx + user_hobbies='$hobbies',email_public=$email_public,disable_js_fx=$disable_js_fx,date_format='$date_format', + time_format='$time_format' WHERE user_id=$session->user_id;"); if ( !$q ) @@ -632,6 +637,34 @@ get('usercp_publicinfo_field_changetheme_hint'); ?> get('usercp_publicinfo_field_changetheme'); ?> + get('usercp_publicinfo_field_dateformat'); ?> + + + + + + get('usercp_publicinfo_field_timeformat'); ?> + + + + + get('usercp_publicinfo_field_timezone'); ?>
get('usercp_publicinfo_field_timezone_hint'); ?>