Attached Files |
site_timezone_core.patch [^] (43,221 bytes) 2010-05-23 10:43
[Show Content]
Index: admin_templates/config/config_general.tpl
===================================================================
--- admin_templates/config/config_general.tpl (revision 13557)
+++ admin_templates/config/config_general.tpl (working copy)
@@ -114,7 +114,7 @@
</tr>
<!-- module root category selector: end -->
- <inp2:conf_PrintList block="config_block" per_page="-1" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
+ <inp2:conf_PrintList block="config_block" per_page="-1" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<script type="text/javascript">
Index: admin_templates/config/config_universal.tpl
===================================================================
--- admin_templates/config/config_universal.tpl (revision 13557)
+++ admin_templates/config/config_universal.tpl (working copy)
@@ -8,72 +8,85 @@
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
- <td>
- <script type="text/javascript">
+ <td>
+ <script type="text/javascript">
+ function ValidatePassFld(fieldId) {
+ var passFld=document.getElementById(fieldId);
+ var passVerifyFld=document.getElementById('verify_'+fieldId);
+ if (passFld && passVerifyFld && passFld.value == passVerifyFld.value) {
+ return true;
+ }
+ else {
+ var passErrorCell=document.getElementById('error_'+fieldId);
+ if (passErrorCell){
+ passErrorCell.innerHTML='<inp2:m_phrase name="la_error_PasswordMatch" />';
+ }
+ return false;
+ }
+ }
- function ValidatePassFld(fieldId){
- var passFld=document.getElementById(fieldId);
- var passVerifyFld=document.getElementById('verify_'+fieldId);
- if (passFld && passVerifyFld && passFld.value == passVerifyFld.value) {
- return true;
- }
- else {
- var passErrorCell=document.getElementById('error_'+fieldId);
- if (passErrorCell){
- passErrorCell.innerHTML='<inp2:m_phrase name="la_error_PasswordMatch" />';
- }
- return false;
- }
- }
+ function ValidatePassFields() {
+ var el=false;
+ var validated=true;
+ for (var i=0; i<document.forms.kernel_form.elements.length; i++){
+ el=document.forms.kernel_form.elements[i];
+ if (el.getAttribute('primarytype')=='password'){
+ if (!ValidatePassFld(el.id)){
+ validated=false;
+ }
+ }
+ }
+ return validated;
+ }
- function ValidatePassFields(){
- var el=false;
- var validated=true;
- for (var i=0; i<document.forms.kernel_form.elements.length; i++){
- el=document.forms.kernel_form.elements[i];
- if (el.getAttribute('primarytype')=='password'){
- if (!ValidatePassFld(el.id)){
- validated=false;
- }
- }
- }
- return validated;
- }
+ function toggle_section($label) {
+ var $table = document.getElementById('config_table');
+ var $row = null;
+ var $is_visible = false;
- function toggle_section($label) {
- var $table = document.getElementById('config_table');
- var $row = null;
- var $is_visible = false;
+ for (var $i = 0; $i < $table.rows.length; $i++) {
+ $row = $table.rows[$i];
+ if ($row.getAttribute('header_label') != $label) {
+ continue;
+ }
- for (var $i = 0; $i < $table.rows.length; $i++) {
- $row = $table.rows[$i];
- if ($row.getAttribute('header_label') != $label) {
- continue;
- }
+ if (!$row.style.display) {
+ $row.style.display = document.all ? 'block' : 'table-row';
+ }
- if (!$row.style.display) {
- $row.style.display = document.all ? 'block' : 'table-row';
- }
+ $is_visible = !($row.style.display == 'none');
+ $row.style.display = $is_visible ? 'none' : (document.all ? 'block' : 'table-row');
- $is_visible = !($row.style.display == 'none');
- $row.style.display = $is_visible ? 'none' : (document.all ? 'block' : 'table-row');
+ document.getElementById('toggle_mark['+$label+']').innerHTML = '[' + ($is_visible ? '+' : '-') + ']';
+ }
+ }
- document.getElementById('toggle_mark['+$label+']').innerHTML = '[' + ($is_visible ? '+' : '-') + ']';
- }
- }
+ var a_toolbar = new ToolBar();
- var a_toolbar = new ToolBar();
- a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
- if (ValidatePassFields()){
- submit_event('conf','<inp2:conf_SaveEvent/>');
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'select',
+ '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>',
+ function() {
+ if (ValidatePassFields()) {
+ submit_event('conf', '<inp2:conf_SaveEvent/>');
}
}
- ) );
- a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
- submit_event('conf','OnCancel');
+ )
+ );
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'cancel',
+ '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
+ function() {
+ submit_event('conf', 'OnCancel');
}
- ) );
+ )
+ );
+ <inp2:m_ModuleInclude template="config/custom_toolbar"/>
+
a_toolbar.Render();
</script>
</td>
@@ -85,7 +98,7 @@
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<script type="text/javascript">
Index: admin_templates/config/custom_variables.tpl
===================================================================
--- admin_templates/config/custom_variables.tpl (revision 0)
+++ admin_templates/config/custom_variables.tpl (revision 0)
@@ -0,0 +1,80 @@
+<inp2:m_DefineElement name="cf_Config_Site_Time_value">
+ <script type="text/javascript">
+ var $timezones = {
+ 'Africa': ['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek'],
+ 'America': ['America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife'],
+ 'Antarctica': ['Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Vostok'],
+ 'Arctic': ['Arctic/Longyearbyen'],
+ 'Asia': ['Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan'],
+ 'Atlantic': ['Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley'],
+ 'Australia': ['Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/North', 'Australia/NSW', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna'],
+ 'Europe': ['Europe/Amsterdam', 'Europe/Andorra', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich'],
+ 'Indian': ['Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion'],
+ 'Pacific': ['Pacific/Apia', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap'],
+ 'Others': ['UTC']
+ }
+
+ function change_timezone_group($timezone_group) {
+ var $target = $( jq('#<inp2:InputName name="VariableValue"/>, #config[<inp2:Field name="VariableName"/>]') );
+
+ $target.hide().empty();
+
+ if ($timezone_group == '') {
+ return ;
+ }
+ else {
+ $target.append('<option value=""></option>');
+ }
+
+ for (var $i = 0; $i < $timezones[$timezone_group].length; $i++) {
+ var $timezone = $timezones[$timezone_group][$i];
+ var $selected = $timezone == $current_timezone ? ' selected="selected"' : '';
+
+ $target.append('<option value="' + $timezone + '" ' + $selected + '>' + $timezone + '</option>');
+ }
+
+ $target.show();
+ }
+
+ var $current_timezone = '<inp2:Field name="VariableValue"/>';
+
+ $(document).ready(
+ function () {
+ $('#timezone_group').change(
+ function ($e) {
+ change_timezone_group( $(this).val() );
+ }
+ );
+
+ var $current_timezone_group = '';
+
+ for (var $timezone_group in $timezones) {
+ if (in_array($current_timezone, $timezones[$timezone_group])) {
+ $current_timezone_group = $timezone_group;
+ break;
+ }
+ }
+
+ $('#timezone_group').val($current_timezone_group).change();
+ }
+ );
+ </script>
+
+ <select id="timezone_group">
+ <option value=""></option>
+ <option value="Africa">Africa</option>
+ <option value="America">America</option>
+ <option value="Antarctica">Antarctica</option>
+ <option value="Arctic">Arctic</option>
+ <option value="Asia">Asia</option>
+ <option value="Atlantic">Atlantic</option>
+ <option value="Australia">Australia</option>
+ <option value="Europe">Europe</option>
+ <option value="Indian">Indian</option>
+ <option value="Pacific">Pacific</option>
+ <option value="Others">Others</option>
+ </select>
+
+
+ <inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+</inp2:m_DefineElement>
Index: admin_templates/incs/config_blocks.tpl
===================================================================
--- admin_templates/incs/config_blocks.tpl (revision 13557)
+++ admin_templates/incs/config_blocks.tpl (working copy)
@@ -1,11 +1,11 @@
<inp2:m_DefineElement name="config_edit_text">
- <input type="text" tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:InputName field="$field"/>" value="<inp2:Field field="$field" />"<inp2:m_if check="m_Param" name="field_params"> <inp2:m_Param name="field_params"/><inp2:m_else/> style="width:100%"</inp2:m_if>/>
+ <input type="text" tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:InputName field='$field'/>" id="<inp2:InputName field='$field'/>" value="<inp2:Field field='$field' />"<inp2:m_if check="m_Param" name="field_params"> <inp2:m_Param name="field_params"/><inp2:m_else/> style="width:100%"</inp2:m_if>/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_password">
- <input type="password" tabindex="<inp2:m_get param="tab_index"/>" primarytype="password" name="<inp2:InputName field="$field"/>" id="<inp2:InputName field="$field"/>" value="" />
+ <input type="password" tabindex="<inp2:m_get param='tab_index'/>" primarytype="password" name="<inp2:InputName field='$field'/>" id="<inp2:InputName field='$field'/>" value="" />
<inp2:m_Inc param="tab_index" by="1"/>
- <input type="password" tabindex="<inp2:m_get param="tab_index"/>" name="verify_<inp2:InputName field="$field"/>" id="verify_<inp2:InputName field="$field"/>" value="" />
+ <input type="password" tabindex="<inp2:m_get param='tab_index'/>" name="verify_<inp2:InputName field='$field'/>" id="verify_<inp2:InputName field='$field'/>" value="" />
<span class="error" id="error_<inp2:InputName field="$field"/>"></span>
<script type="text/javascript">
@@ -20,29 +20,29 @@
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_option">
- <option value="<inp2:m_param name="key"/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
+ <option value="<inp2:m_param name='key'/>"<inp2:m_param name="selected"/>><inp2:m_param name="option"/></option>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_select">
- <select name="<inp2:InputName field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>">
+ <select name="<inp2:InputName field='$field'/>" id="<inp2:InputName field='$field'/>" tabindex="<inp2:m_get param='tab_index'/>">
<inp2:PredefinedOptions field="$field" block="config_edit_option" selected="selected"/>
</select>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_multiselect">
- <select id="<inp2:InputName field="$field"/>_select" onchange="update_multiple_options('<inp2:InputName field="$field"/>');" tabindex="<inp2:m_get param="tab_index"/>" multiple>
+ <select id="<inp2:InputName field='$field'/>_select" onchange="update_multiple_options('<inp2:InputName field='$field'/>');" tabindex="<inp2:m_get param='tab_index'/>" multiple>
<inp2:PredefinedOptions field="$field" block="config_edit_option" selected="selected"/>
</select>
- <input type="hidden" id="<inp2:InputName field="$field"/>" name="<inp2:InputName field="$field"/>" value="<inp2:Field field="$field"/>"/>
+ <input type="hidden" id="<inp2:InputName field='$field'/>" name="<inp2:InputName field='$field'/>" value="<inp2:Field field='$field'/>"/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_checkbox" field_class="">
- <input type="hidden" id="<inp2:InputName field="$field"/>" name="<inp2:InputName field="$field"/>" value="<inp2:Field field="$field" db="db"/>">
- <input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_<inp2:m_param name="field"/>" name="_cb_<inp2:InputName field="$field"/>" <inp2:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:InputName field="$field"/>'))">
+ <input type="hidden" id="<inp2:InputName field='$field'/>" name="<inp2:InputName field='$field'/>" value="<inp2:Field field='$field' db='db'/>">
+ <input tabindex="<inp2:m_get param='tab_index'/>" type="checkbox" id="_cb_<inp2:m_param name='field'/>" name="_cb_<inp2:InputName field='$field'/>" <inp2:Field field="$field" checked="checked" db="db"/> class="<inp2:m_param name="field_class"/>" onclick="update_checkbox(this, document.getElementById('<inp2:InputName field="$field"/>'))">
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_textarea">
- <textarea tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:InputName field="$field"/>" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
+ <textarea tabindex="<inp2:m_get param='tab_index'/>" name="<inp2:InputName field='$field'/>" id="<inp2:InputName field='$field'/>" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_radio_item">
@@ -53,6 +53,22 @@
<inp2:PredefinedOptions field="$field" block="config_radio_item" selected="checked"/>
</inp2:m_DefineElement>
+<inp2:m_DefineElement name="cf_default_value">
+ <inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+</inp2:m_DefineElement>
+
+<inp2:m_DefineElement name="cf_default_caption">
+ <td style="width: 500px;">
+ <inp2:Field name="VariableName" result_to_var="error_field"/>
+ <span class="<inp2:m_if check='HasError' field='$error_field' id_field='VariableName'>error-cell</inp2:m_if>">
+ <inp2:Field field="Prompt" as_label="1" /></span><inp2:m_if check="IsRequired"><span class="field-required"> *</span></inp2:m_if>:<inp2:m_if check="Field" name="HintLabel"><span> <img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>" alt="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>"/></inp2:m_if>
+
+ <inp2:m_if check="m_IsDebugMode">
+ <br/><small style="color: gray;">[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
+ </inp2:m_if>
+ </td>
+</inp2:m_DefineElement>
+
<inp2:m_DefineElement name="config_block">
<inp2:m_inc param="tab_index" by="1"/>
<inp2:m_if check="m_ParamEquals" name="show_heading" value="1">
@@ -65,19 +81,12 @@
</td>
</tr>
</inp2:m_if>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:field field="$IdField"/>" header_label="<inp2:Field name="Heading"/>">
- <td style="width:500px;">
- <inp2:Field name="VariableName" result_to_var="error_field"/>
- <span class="<inp2:m_if check='HasError' field='$error_field' id_field='VariableName'>error-cell</inp2:m_if>">
- <inp2:Field field="Prompt" as_label="1" /></span><inp2:m_if check="IsRequired"><span class="field-required"> *</span></inp2:m_if>:<inp2:m_if check="Field" name="HintLabel"><span> <img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>" alt="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>"/></inp2:m_if>
- <inp2:m_if check="m_IsDebugMode">
- <br/><small style="color: gray;">[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
- </inp2:m_if>
- </td>
+ <tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:field field="$IdField"/>" header_label="<inp2:Field name="Heading"/>">
+ <inp2:m_RenderElement name="cf_default_caption" pass_params="1"/>
<td>
- <inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+ <inp2:m_RenderElement name="$value_render_as" pass_params="1"/>
</td>
<td class="error"><inp2:Error id_field="VariableName"/> </td>
@@ -96,24 +105,19 @@
</td>
</tr>
</inp2:m_if>
- <tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="$IdField"/>" header_label="<inp2:Field name="Heading"/>">
- <td>
- <inp2:Field name="VariableName" result_to_var="error_field"/>
- <span class="<inp2:m_if check='HasError' field='$error_field' id_field='VariableName'>error-cell</inp2:m_if>">
- <inp2:Field field="Prompt" as_label="1" /></span><inp2:m_if check="IsRequired"><span class="field-required"> *</span></inp2:m_if>:<inp2:m_if check="Field" name="HintLabel"><span> <img src="<inp2:m_TemplatesBase/>/img/hint_icon.png" width="12" height="13" title="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>" alt="<inp2:Field name='HintLabel' as_label='1' html_escape='1'/>"/></inp2:m_if>
- <inp2:m_if check="m_IsDebugMode">
- <br/><small style="color: gray;">[<inp2:Field field="DisplayOrder"/>] <inp2:Field field="VariableName"/></small>
- </inp2:m_if>
- </td>
+ <tr class="<inp2:m_odd_even odd='table-color1' even='table-color2'/>" id="<inp2:m_param name="PrefixSpecial"/>_<inp2:Field field="$IdField"/>" header_label="<inp2:Field name="Heading"/>">
+ <inp2:m_RenderElement name="cf_default_caption" pass_params="1"/>
<td>
- <nobr><inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+ <nobr><inp2:m_RenderElement name="$value_render_as" pass_params="1"/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_block2">
- <inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/></nobr>
+ <inp2:m_RenderElement name="$value_render_as" pass_params="1"/></nobr>
</td>
<td class="error"><inp2:Error id_field="VariableName"/> </td>
</tr>
</inp2:m_DefineElement>
+
+<inp2:m_ModuleInclude template="config/custom_variables"/>
\ No newline at end of file
Index: install.php
===================================================================
--- install.php (revision 13585)
+++ install.php (working copy)
@@ -751,6 +751,12 @@
'Smtp_AdminMailFrom' => 'portal@' . $this->toolkit->getSystemConfig('Misc', 'Domain')
);
+ $site_timezone = ini_get('date.timezone') ? ini_get('date.timezone') : getenv('TZ');
+
+ if ($site_timezone) {
+ $config_values['Config_Site_Time'] = $site_timezone;
+ }
+
$this->toolkit->saveConfigValues($config_values);
// login as "root", when no errors on password screen
Index: install/incs/script.js
===================================================================
--- install/incs/script.js (revision 13557)
+++ install/incs/script.js (working copy)
@@ -4,4 +4,22 @@
function RemoveTranslationLink($label) {
return $label;
+}
+
+function in_array(needle, haystack)
+{
+ return array_search(needle, haystack) != -1;
+}
+
+function array_search(needle, haystack)
+{
+ for (var i=0; i<haystack.length; i++)
+ {
+ if (haystack[i] == needle) return i;
+ }
+ return -1;
+}
+
+function jq($selector) {
+ return $selector.replace(/(\[|\]|\.)/g, '\\$1');
}
\ No newline at end of file
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 13557)
+++ install/install_data.sql (working copy)
@@ -22,8 +22,7 @@
# Section "in-portal:configure_general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Name', 'In-Portal CMS', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsWebsite', 'la_config_website_name', 'text', '', '', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday||1=la_monday', 20.01, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.02, 0, 1, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12||2=la_m11||3=la_m10||5=la_m9||6=la_m8||7=la_m7||8=la_m6||9=la_m5||10=la_m4||11=la_m3||12=la_m2||13=la_m1||14=la_m0||15=la_p1||16=la_p2||17=la_p3||18=la_p4||19=la_p5||20=la_p6||21=la_p7||22=la_p8||23=la_p9||24=la_p10||25=la_p11||26=la_p12||27=la_p13', 20.03, 0, 1, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', NULL, 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsMailling', 'la_prompt_AdminMailFrom', 'text', NULL, 'size="40"', 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsSession', 'la_prompt_session_timeout', 'text', 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}', '', 40.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple||advanced=+advanced||custom=+custom', 50.01, 0, 1, NULL);
Index: install/step_templates/post_config.tpl
===================================================================
--- install/step_templates/post_config.tpl (revision 13557)
+++ install/step_templates/post_config.tpl (working copy)
@@ -6,11 +6,11 @@
<inp2:m_include t="incs/config_blocks"/>
<inp2:m_DefineElement name="config_edit_text">
- <input type="text" tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" value="<inp2:Field field='$field'/>" <inp2:m_param name='field_params' />/>
+ <input type="text" tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" id="config[<inp2:Field name='VariableName'/>]" value="<inp2:Field field='$field'/>" <inp2:m_param name='field_params' />/>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_select">
- <select name="config[<inp2:Field name='VariableName'/>]" tabindex="<inp2:m_get param="tab_index"/>">
+ <select name="config[<inp2:Field name='VariableName'/>]" id="config[<inp2:Field name='VariableName'/>]" tabindex="<inp2:m_get param="tab_index"/>">
<inp2:PredefinedOptions field="$field" block="config_edit_option" selected="selected"/>
</select>
</inp2:m_DefineElement>
@@ -21,7 +21,7 @@
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_edit_textarea">
- <textarea tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
+ <textarea tabindex="<inp2:m_get param='tab_index'/>" name="config[<inp2:Field name='VariableName'/>]" id="config[<inp2:Field name='VariableName'/>]" <inp2:m_param name="field_params" />><inp2:Field field="$field" /></textarea>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="config_radio_item">
@@ -47,7 +47,7 @@
</td>
<td>
- <inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+ <inp2:m_RenderElement name="$value_render_as" pass_params="1"/>
</td>
<td class="error"><inp2:Error id_field="VariableName"/> </td>
@@ -73,12 +73,12 @@
</td>
<td>
- <nobr><inp2:ConfigFormElement PrefixSpecial="$PrefixSpecial" field="VariableValue" blocks_prefix="config_edit_" element_type_field="ElementType" value_list_field="ValueList"/>
+ <nobr><inp2:m_RenderElement name="$value_render_as" pass_params="1"/>
</inp2:m_DefineElement>
<inp2:m_Set first_row="1"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" per_page="-1"/>
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value" per_page="-1"/>
</table>
<?php
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 13559)
+++ install/upgrades.sql (working copy)
@@ -1864,3 +1864,8 @@
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
+
+DELETE FROM Phrase WHERE Phrase = 'la_config_time_server';
+DELETE FROM ConfigurationValues WHERE VariableName = 'Config_Server_Time';
+UPDATE ConfigurationValues SET ValueList = NULL, DisplayOrder = 20.02 WHERE VariableName = 'Config_Site_Time';
+UPDATE ConfigurationValues SET VariableValue = '' WHERE VariableName = 'Config_Site_Time' AND VariableValue = 14;
\ No newline at end of file
Index: kernel/application.php
===================================================================
--- kernel/application.php (revision 13581)
+++ kernel/application.php (working copy)
@@ -358,6 +358,12 @@
$this->LoadCache();
$this->InitConfig();
+ $site_timezone = $this->ConfigValue('Config_Site_Time');
+
+ if ($site_timezone) {
+ putenv('TZ=' . $site_timezone);
+ }
+
if (defined('DEBUG_MODE') && $this->isDebugMode()) {
$this->Debugger->appendTimestamp('Loaded cache and phrases');
}
@@ -1474,6 +1480,17 @@
}
/**
+ * Checks, that we have given block defined
+ *
+ * @param string $name
+ * @return bool
+ */
+ function ParserBlockFound($name)
+ {
+ return $this->Parser->blockFound($name);
+ }
+
+ /**
* Allows to include template with a given name and given parameters
*
* @param Array $params Parameters to pass to template. Reserved parameter "name" used to specify template name.
@@ -3055,15 +3072,6 @@
}
}
- function TimeZoneAdjustment($time_zone = null)
- {
- if ($time_zone == 'GMT') {
- return (-1) * adodb_date('Z');
- }
- $target_zone = isset($time_zone) ? $time_zone : $this->ConfigValue('Config_Site_Time');
- return 3600 * ($target_zone - $this->ConfigValue('Config_Server_Time'));
- }
-
function ApplicationDie($message = '')
{
$message = ob_get_clean().$message;
Index: kernel/db/db_tag_processor.php
===================================================================
--- kernel/db/db_tag_processor.php (revision 13606)
+++ kernel/db/db_tag_processor.php (working copy)
@@ -946,8 +946,7 @@
$timestamp = $params['value'];
}
- // apply timezone adjustment manually (because we are not using kDateFormatter)
- $date = $timestamp + $this->Application->TimeZoneAdjustment();
+ $date = $timestamp;
// prepare phrase replacements
$replacements = Array (
Index: kernel/nparser/nparser.php
===================================================================
--- kernel/nparser/nparser.php (revision 13557)
+++ kernel/nparser/nparser.php (working copy)
@@ -692,6 +692,17 @@
return defined('EDITING_MODE') ? $this->DecorateBlock($ret, $params) : $ret;
}
+ /**
+ * Checks, that given block is defined
+ *
+ * @param string $name
+ * @return bool
+ */
+ function blockFound($name)
+ {
+ return array_key_exists($name, $this->Elements);
+ }
+
function DecorateBlock($block_content, $block_params, $is_template = false)
{
static $used_ids = Array (), $base_url = null;
Index: kernel/utility/formatters/date_formatter.php
===================================================================
--- kernel/utility/formatters/date_formatter.php (revision 13557)
+++ kernel/utility/formatters/date_formatter.php (working copy)
@@ -136,7 +136,7 @@
if ( !isset($object->CalculatedFields) || !is_array($object->CalculatedFields) ) {
$object->CalculatedFields = Array();
}
-// $object->CalculatedFields[$field_name.'_formatted'] = 'FROM_UNIXTIME('.'`%1$s`.'.$field_name.' + '.$this->Application->TimeZoneAdjustment().', \''.$this->SQLFormat($field_options['format']).'\')';
+// $object->CalculatedFields[$field_name.'_formatted'] = 'FROM_UNIXTIME('.'`%1$s`.'.$field_name.', \''.$this->SQLFormat($field_options['format']).'\')';
$object->CalculatedFields[$field_name.'_date'] = '%1$s.'.$field_name;
$object->CalculatedFields[$field_name.'_time'] = '%1$s.'.$field_name;
// $opts['format'] = $field_options['format'];
@@ -219,7 +219,7 @@
return adodb_gmdate($options['format'], $value);
}
- return adodb_date($options['format'], $value + $this->Application->TimeZoneAdjustment());
+ return adodb_date($options['format'], $value);
}
function HumanFormat($format)
@@ -442,7 +442,7 @@
return adodb_gmmktime($hour, $minute, $second, $month, $day, $year);
}
- return adodb_mktime($hour, $minute, $second, $month, $day, $year) - $this->Application->TimeZoneAdjustment();
+ return adodb_mktime($hour, $minute, $second, $month, $day, $year);
}
function GetSample($field, &$options, &$object)
Index: kernel/utility/unit_config_reader.php
===================================================================
--- kernel/utility/unit_config_reader.php (revision 13557)
+++ kernel/utility/unit_config_reader.php (working copy)
@@ -95,7 +95,6 @@
'UseContentLanguageNegotiation',
'UseOutputCompression',
'OutputCompressionLevel',
- 'Config_Server_Time',
'Config_Site_Time',
'SystemTagCache',
Index: units/configuration/configuration_tag_processor.php
===================================================================
--- units/configuration/configuration_tag_processor.php (revision 13569)
+++ units/configuration/configuration_tag_processor.php (working copy)
@@ -40,18 +40,16 @@
$list->GoFirst();
$block_params=$this->prepareTagParams($params);
-// $block_params['name'] = $this->SelectParam($params, 'render_as,block');
$block_params['pass_params'] = 'true';
$block_params['IdField'] = $list->IDField;
$prev_heading = '';
$next_block = $params['full_block'];
$this->groupRecords($list->Records, 'Heading');
- $field_values = $this->Application->GetVar($this->getPrefixSpecial(true));
+ $field_values = $this->Application->GetVar( $this->getPrefixSpecial(true) );
- while (!$list->EOL())
- {
- $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
+ while (!$list->EOL()) {
+ $this->Application->SetVar( $this->getPrefixSpecial() . '_id', $list->GetDBField($id_field) ); // for edit/delete links using GET
// using 2 blocks for drawing o row in case if current & next record titles match
$next_item_prompt = $list->CurrentIndex + 1 < $list->RecordsCount ? $list->Records[$list->CurrentIndex + 1]['Prompt'] : '';
@@ -65,13 +63,31 @@
$next_block = $params['full_block'];
}
- $block_params['name'] = $curr_block;
+ $variable_name = $list->GetDBField('VariableName');
+ // allows to override value part of block
+ if ($this->Application->ParserBlockFound('cf_' . $variable_name . '_value')) {
+ $block_params['value_render_as'] = 'cf_' . $variable_name . '_value';
+ }
+ else {
+ $block_params['value_render_as'] = $params['value_render_as'];
+ }
+
+ // allow to completely override whole block
+ if ($this->Application->ParserBlockFound('cf_' . $variable_name . '_element')) {
+ $block_params['name'] = 'cf_' . $variable_name . '_element';
+ $block_params['original_render_as'] = $curr_block;
+ }
+ else {
+ $block_params['name'] = $curr_block;
+ $block_params['original_render_as'] = $curr_block;
+ }
+
$block_params['show_heading'] = ($prev_heading != $list->GetDBField('Heading') ) ? 1 : 0;
// set values from submit if any
if ($field_values) {
- $list->SetDBField('VariableValue', $field_values[$list->GetID()]['VariableValue']);
+ $list->SetDBField('VariableValue', $field_values[ $list->GetID() ]['VariableValue']);
}
$list->SetDBField('DirectOptions', '');
@@ -81,7 +97,8 @@
}
$this->Application->RemoveVar('ModuleRootCategory');
- $this->Application->SetVar( $this->getPrefixSpecial().'_id', '');
+ $this->Application->SetVar($this->getPrefixSpecial() . '_id', '');
+
return $o;
}
Index: units/languages/languages_tag_processor.php
===================================================================
--- units/languages/languages_tag_processor.php (revision 13557)
+++ units/languages/languages_tag_processor.php (working copy)
@@ -48,7 +48,7 @@
function CurrentDate($params)
{
$format = $params['format'];
- $date = adodb_mktime() + $this->Application->TimeZoneAdjustment();
+ $date = adodb_mktime();
if (strpos($format, 'l') !== false) {
$week_day = $this->Application->Phrase('lu_weekday_'.adodb_date('l'));
site_timezone_modules.patch [^] (2,450 bytes) 2010-05-23 10:43
[Show Content]
Index: in-auction/admin_templates/configuration.tpl
===================================================================
--- in-auction/admin_templates/configuration.tpl (revision 13557)
+++ in-auction/admin_templates/configuration.tpl (working copy)
@@ -126,7 +126,7 @@
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<inp2:m_if check="ebay-sections_NeedShowTokenLink">
Index: in-auction/admin_templates/feedbacks_config.tpl
===================================================================
--- in-auction/admin_templates/feedbacks_config.tpl (revision 13557)
+++ in-auction/admin_templates/feedbacks_config.tpl (working copy)
@@ -89,7 +89,7 @@
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: in-auction/admin_templates/listings_defaults.tpl
===================================================================
--- in-auction/admin_templates/listings_defaults.tpl (revision 13557)
+++ in-auction/admin_templates/listings_defaults.tpl (working copy)
@@ -88,7 +88,7 @@
<inp2:conf_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2"/>
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
</table>
|