mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
some fixes... most importantly the ability to update the board with the automatic files while having fsockopen disabled (instead, the update file information will be used, which may be inaccurate if the admin did a mistake).
git-svn-id: file:///svn/phpbb/trunk@7818 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
817a82a1af
commit
6ca11b2d2b
7 changed files with 83 additions and 8 deletions
|
@ -205,6 +205,10 @@ p a {
|
|||
<li>[Fix] Correctly chmod created cache files (Bug #12859)</li>
|
||||
<li>[Fix] Use our global expression for checking email syntax in memberlist (Bug #12827)</li>
|
||||
<li>[Fix] Correctly retrieve/refresh templates stored in database if using subdirectories within template directory (Bug #12839)</li>
|
||||
<li>[Fix] Correctly translate special group names in ucp_groups.php (Bug #12597)</li>
|
||||
<li>[Fix] Search boxes not loosing session id (changing method from get to post) (Bug #12643)</li>
|
||||
<li>[Fix] Make sure the automatic update is also working for those having fsockopen disabled</li>
|
||||
<li>[Fix] Simulate recache of theme data on automatic update finished page - recaching it if css data changed</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -812,7 +812,7 @@ class ucp_groups
|
|||
$user->add_lang('acp/groups');
|
||||
|
||||
// Approve, demote or promote
|
||||
group_user_attributes('approve', $group_id, $mark_ary, false, ($group_id) ? $group_row['group_name'] : false);
|
||||
group_user_attributes('approve', $group_id, $mark_ary, false, false);
|
||||
|
||||
trigger_error($user->lang['USERS_APPROVED'] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $this->u_action . '&action=list&g=' . $group_id . '">', '</a>'));
|
||||
|
||||
|
@ -836,6 +836,8 @@ class ucp_groups
|
|||
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!sizeof($mark_ary))
|
||||
|
@ -910,6 +912,8 @@ class ucp_groups
|
|||
trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
|
||||
}
|
||||
|
||||
$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
if (!$group_id)
|
||||
|
|
|
@ -919,7 +919,7 @@ class install_install extends module
|
|||
// Assume it will work ... if nothing goes wrong below
|
||||
$written = true;
|
||||
|
||||
if (!($fp = @fopen($phpbb_root_path . 'config.'.$phpEx, 'w')))
|
||||
if (!($fp = @fopen($phpbb_root_path . 'config.' . $phpEx, 'w')))
|
||||
{
|
||||
// Something went wrong ... so let's try another method
|
||||
$written = false;
|
||||
|
@ -932,6 +932,11 @@ class install_install extends module
|
|||
}
|
||||
|
||||
@fclose($fp);
|
||||
|
||||
if ($written)
|
||||
{
|
||||
@chmod($phpbb_root_path . 'config.' . $phpEx, 0644);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['dldone']))
|
||||
|
|
|
@ -408,6 +408,60 @@ class install_update extends module
|
|||
// Add database update to log
|
||||
add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->latest_version);
|
||||
|
||||
// Refresh prosilver css data - this may cause some unhappy users, but
|
||||
$sql = 'SELECT *
|
||||
FROM ' . STYLES_THEME_TABLE . "
|
||||
WHERE theme_name = 'prosilver'";
|
||||
$result = $db->sql_query($sql);
|
||||
$theme = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($theme)
|
||||
{
|
||||
$recache = (empty($theme['theme_data'])) ? true : false;
|
||||
$update_time = time();
|
||||
|
||||
// We test for stylesheet.css because it is faster and most likely the only file changed on common themes
|
||||
if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'))
|
||||
{
|
||||
$recache = true;
|
||||
$update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
|
||||
}
|
||||
else if (!$recache)
|
||||
{
|
||||
$last_change = $theme['theme_mtime'];
|
||||
|
||||
foreach (glob("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/*.css", GLOB_NOSORT) as $file)
|
||||
{
|
||||
if ($last_change < @filemtime($file))
|
||||
{
|
||||
$recache = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($recache)
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/acp/acp_styles.' . $phpEx);
|
||||
|
||||
$theme['theme_data'] = acp_styles::db_theme_data($theme);
|
||||
$theme['theme_mtime'] = $update_time;
|
||||
|
||||
// Save CSS contents
|
||||
$sql_ary = array(
|
||||
'theme_mtime' => $theme['theme_mtime'],
|
||||
'theme_data' => $theme['theme_data']
|
||||
);
|
||||
|
||||
$sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE theme_id = ' . $theme['theme_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$cache->destroy('sql', STYLES_THEME_TABLE);
|
||||
}
|
||||
}
|
||||
|
||||
$cache->purge();
|
||||
|
||||
$db->sql_return_on_error(true);
|
||||
|
@ -1192,6 +1246,19 @@ class install_update extends module
|
|||
{
|
||||
$info = $this->test_update;
|
||||
}
|
||||
|
||||
// If info is false the fsockopen function may not be working. Instead get the latest version from our update file (and pray it is up-to-date)
|
||||
if ($info === false)
|
||||
{
|
||||
$update_info = array();
|
||||
include($phpbb_root_path . 'install/update/index.php');
|
||||
$info = (empty($update_info) || !is_array($update_info)) ? false : $update_info;
|
||||
|
||||
if ($info !== false)
|
||||
{
|
||||
$info = (!empty($info['version']['to'])) ? trim($info['version']['to']) : false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'update_info':
|
||||
|
|
|
@ -56,8 +56,6 @@ $lang = array_merge($lang, array(
|
|||
'BOT_STYLE' => 'Bot style',
|
||||
'BOT_STYLE_EXPLAIN' => 'The style used for the board by the bot.',
|
||||
'BOT_UPDATED' => 'Existing bot updated successfully.',
|
||||
'BOT_VIS' => 'Bot visible',
|
||||
'BOT_VIS_EXPLAIN' => 'Allow bot to be seen by all users in online lists.',
|
||||
|
||||
'ERR_BOT_AGENT_MATCHES_UA' => 'The bot agent you supplied is similar to the one you are currently using. Please adjust the agent for this bot.',
|
||||
'ERR_BOT_NO_IP' => 'The IP addresses you supplied were invalid or the hostname could not be resolved.',
|
||||
|
|
|
@ -86,10 +86,7 @@ $lang = array_merge($lang, array(
|
|||
'GROUP_RECEIVE_PM' => 'Group able to receive private messages',
|
||||
'GROUP_RECEIVE_PM_EXPLAIN' => 'Please note that hidden groups are not able to be messaged, regardless of this setting.',
|
||||
'GROUP_REQUEST' => 'Request',
|
||||
'GROUP_SETTINGS' => 'Set user preferences',
|
||||
'GROUP_SETTINGS_EXPLAIN' => 'Here you can force changes in users current preferences. Please note these settings are not saved for the group itself. They are intended as a quick method of altering the preferences of all users in this group.',
|
||||
'GROUP_SETTINGS_SAVE' => 'Group wide settings',
|
||||
'GROUP_TIMEZONE' => 'Group timezone',
|
||||
'GROUP_TYPE' => 'Group type',
|
||||
'GROUP_TYPE_EXPLAIN' => 'This determines which users can join or view this group.',
|
||||
'GROUP_UPDATED' => 'Group preferences updated successfully.',
|
||||
|
|
|
@ -132,7 +132,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'Why can’t I access a forum?',
|
||||
1 => 'Some forums may be limited to certain users or groups. To view, read, post or perform another action you may need special authorization. Contact a moderator or board administrator to grant you access.'
|
||||
1 => 'Some forums may be limited to certain users or groups. To view, read, post or perform another action you may need special permissions. Contact a moderator or board administrator to grant you access.'
|
||||
),
|
||||
array(
|
||||
0 => 'Why can’t I add attachments?',
|
||||
|
|
Loading…
Add table
Reference in a new issue