mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
some tiny bugfixes.
git-svn-id: file:///svn/phpbb/trunk@6702 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e08317eb71
commit
2b4525ae97
6 changed files with 40 additions and 11 deletions
|
@ -735,7 +735,14 @@ class acp_board
|
||||||
*/
|
*/
|
||||||
function dateformat_select($value, $key)
|
function dateformat_select($value, $key)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $config;
|
||||||
|
|
||||||
|
// Let the format_date function operate with the acp values
|
||||||
|
$old_tz = $user->timezone;
|
||||||
|
$old_dst = $user->dst;
|
||||||
|
|
||||||
|
$user->timezone = $config['board_timezone'];
|
||||||
|
$user->dst = $config['board_dst'];
|
||||||
|
|
||||||
$dateformat_options = '';
|
$dateformat_options = '';
|
||||||
|
|
||||||
|
@ -753,6 +760,10 @@ class acp_board
|
||||||
}
|
}
|
||||||
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
||||||
|
|
||||||
|
// Reset users date options
|
||||||
|
$user->timezone = $old_tz;
|
||||||
|
$user->dst = $old_dst;
|
||||||
|
|
||||||
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('$key').value = '$value'; } else { document.getElementById('$key').value = this.value; }\">$dateformat_options</select>
|
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('$key').value = '$value'; } else { document.getElementById('$key').value = this.value; }\">$dateformat_options</select>
|
||||||
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
|
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$filelist[substr($row['template_filename'], 0, $slash_pos + 1)] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slashpos - 1);
|
$filelist[substr($row['template_filename'], 0, $slash_pos + 1)] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3363,7 +3363,7 @@ function page_header($page_title = '', $display_online_list = true)
|
||||||
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
|
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
|
||||||
|
|
||||||
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
||||||
'S_BOARD_DISABLED' => ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) ? true : false,
|
'S_BOARD_DISABLED' => ($config['board_disable']) ? true : false,
|
||||||
'S_REGISTERED_USER' => $user->data['is_registered'],
|
'S_REGISTERED_USER' => $user->data['is_registered'],
|
||||||
'S_IS_BOT' => $user->data['is_bot'],
|
'S_IS_BOT' => $user->data['is_bot'],
|
||||||
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
||||||
|
|
|
@ -1242,7 +1242,7 @@ function get_folder_status($folder_id, $folder)
|
||||||
*/
|
*/
|
||||||
function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = true)
|
function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = true)
|
||||||
{
|
{
|
||||||
global $db, $auth, $config, $phpEx, $template, $user;
|
global $db, $auth, $config, $phpEx, $template, $user, $phpbb_root_path;
|
||||||
|
|
||||||
// We do not handle erasing pms here
|
// We do not handle erasing pms here
|
||||||
if ($mode == 'delete')
|
if ($mode == 'delete')
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* @todo check memory by setting limit to 8MB locally.
|
* @todo check memory by setting limit to 8MB locally.
|
||||||
* @todo make sure binary files get updated too, omitting the diff engine for this (handle like a conflict)
|
* @todo make sure binary files get updated too, omitting the diff engine for this (handle like a conflict)
|
||||||
* @todo do not require login...
|
* @todo do not require login...
|
||||||
|
* @todo check for writeable cache/store/files directory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -113,9 +114,9 @@ class install_update extends module
|
||||||
$user->setup('install');
|
$user->setup('install');
|
||||||
|
|
||||||
// Include renderer and engine
|
// Include renderer and engine
|
||||||
include_once($phpbb_root_path . 'includes/diff/diff.' . $phpEx);
|
$this->include_file('includes/diff/diff.' . $phpEx);
|
||||||
include_once($phpbb_root_path . 'includes/diff/engine.' . $phpEx);
|
$this->include_file('includes/diff/engine.' . $phpEx);
|
||||||
include_once($phpbb_root_path . 'includes/diff/renderer.' . $phpEx);
|
$this->include_file('includes/diff/renderer.' . $phpEx);
|
||||||
|
|
||||||
// If we are within the intro page we need to make sure we get up-to-date version info
|
// If we are within the intro page we need to make sure we get up-to-date version info
|
||||||
if ($sub == 'intro')
|
if ($sub == 'intro')
|
||||||
|
@ -187,7 +188,7 @@ class install_update extends module
|
||||||
if (in_array('language/en/install.php', $this->update_info['files']))
|
if (in_array('language/en/install.php', $this->update_info['files']))
|
||||||
{
|
{
|
||||||
$lang = array();
|
$lang = array();
|
||||||
include('./update/new/language/en/install.php');
|
include($this->new_location . 'language/en/install.php');
|
||||||
$user->lang = array_merge($user->lang, $lang);
|
$user->lang = array_merge($user->lang, $lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,7 +350,7 @@ class install_update extends module
|
||||||
|
|
||||||
if (!empty($_POST['download']))
|
if (!empty($_POST['download']))
|
||||||
{
|
{
|
||||||
include_once($phpbb_root_path . 'includes/functions_compress.' . $phpEx);
|
$this->include_file('includes/functions_compress.' . $phpEx);
|
||||||
|
|
||||||
$use_method = request_var('use_method', '');
|
$use_method = request_var('use_method', '');
|
||||||
$methods = array('.tar');
|
$methods = array('.tar');
|
||||||
|
@ -419,7 +420,7 @@ class install_update extends module
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include_once($phpbb_root_path . 'includes/functions_transfer.' . $phpEx);
|
$this->include_file('includes/functions_transfer.' . $phpEx);
|
||||||
|
|
||||||
// Choose FTP, if not available use fsock...
|
// Choose FTP, if not available use fsock...
|
||||||
$method = request_var('method', '');
|
$method = request_var('method', '');
|
||||||
|
@ -1147,6 +1148,23 @@ class install_update extends module
|
||||||
|
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for including files...
|
||||||
|
*/
|
||||||
|
function include_file($filename)
|
||||||
|
{
|
||||||
|
global $phpbb_root_path;
|
||||||
|
|
||||||
|
if (!empty($this->update_info['files']) && in_array($filename, $this->update_info['files']))
|
||||||
|
{
|
||||||
|
include_once($this->new_location . $filename);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include_once($phpbb_root_path . $filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -148,7 +148,7 @@ function marklist(id, name, state)
|
||||||
<td class="genmed">
|
<td class="genmed">
|
||||||
<!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="{L_LOGIN_LOGOUT}" /> {L_LOGIN_LOGOUT}</a> <!-- ENDIF -->
|
<!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="{L_LOGIN_LOGOUT}" /> {L_LOGIN_LOGOUT}</a> <!-- ENDIF -->
|
||||||
<!-- IF U_RESTORE_PERMISSIONS --> <a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="{L_RESTORE_PERMISSIONS}" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
|
<!-- IF U_RESTORE_PERMISSIONS --> <a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="{L_RESTORE_PERMISSIONS}" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
|
||||||
<!-- IF S_BOARD_DISABLED --> <span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
|
<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> <span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF -->
|
||||||
<!-- IF S_USER_LOGGED_IN -->
|
<!-- IF S_USER_LOGGED_IN -->
|
||||||
<!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="{L_PRIVATE_MESSAGES}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
|
<!-- IF S_DISPLAY_PM --> <a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="{L_PRIVATE_MESSAGES}" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
|
||||||
<!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="{L_REGISTER}" /> {L_REGISTER}</a>
|
<!-- ELSE --> <a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="{L_REGISTER}" /> {L_REGISTER}</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue