Update 1.12.2 - 1.12.3
Wykonaj zapytania SQL (zwrócić uwagę na prefix tabel)
UPDATE phpbb_config SET config_value = '1.12.3' WHERE config_name = 'version';
ALTER TABLE phpbb_search_results CHANGE search_array search_array LONGTEXT NOT NULL;
ALTER TABLE phpbb_users CHANGE user_email user_email varchar(255);
ALTER TABLE phpbb_users CHANGE user_website user_website varchar(100);
ALTER TABLE phpbb_users CHANGE user_aim user_aim varchar(255);
ALTER TABLE phpbb_users CHANGE user_yim user_yim varchar(255);
ALTER TABLE phpbb_users CHANGE user_msnm user_msnm varchar(255);
Poniższe zapytania wykonaj pojedynczo, lub ich nie wykonuj, tylko po nadpisaniu plików odinstaluj wszystkie moduly statystyk i zainstaluj ponownie (zwroc uwagę, czy przypisało im czasy uaktualniania (24, 48, 64)
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'new_posts_by_month';
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'new_topics_by_month';
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'new_users_by_month';
UPDATE phpbb_stats_modules SET update_time = '0' WHERE name = 'most_active_topics';
UPDATE phpbb_stats_modules SET update_time = '0' WHERE name = 'most_viewed_topics';
UPDATE phpbb_stats_modules SET update_time = '0' WHERE name = 'latest_topics';
UPDATE phpbb_stats_modules SET update_time = '48' WHERE name = 'priv_msgs';
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'top_posters';
UPDATE phpbb_stats_modules SET update_time = '0' WHERE name = 'last_active_users';
UPDATE phpbb_stats_modules SET update_time = '48' WHERE name = 'users_from_where';
UPDATE phpbb_stats_modules SET update_time = '48' WHERE name = 'age_statistics';
UPDATE phpbb_stats_modules SET update_time = '48' WHERE name = 'users_gender';
UPDATE phpbb_stats_modules SET update_time = '64' WHERE name = 'top_smilies';
UPDATE phpbb_stats_modules SET update_time = '64' WHERE name = 'top_words';
UPDATE phpbb_stats_modules SET update_time = '64' WHERE name = 'user_agent';
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'top_helpful';
UPDATE phpbb_stats_modules SET update_time = '24' WHERE name = 'top_advert';
Wyczysc katalog /cache/ recznie albo w PA
cišgnij update122-123.zip
Nadpisz wszystkie pliki, lub jeżeli masz zainstalowane mody, poniżej instrukcja ręcznej aktualizacji
Nadpisz pliki:
/admin/admin_advert.php
update122-123/admin/admin_portal.php
/admin/admin_smilies.php
/admin/admin_statistics.php
/admin/xs_edit_data.php
/album_mod/album_functions.php
/attach_mod/includes/functions_attach.php
/attach_mod/includes/functions_delete.php
/attach_mod/includes/functions_thumbs.php
/db/schemas/mysql_basic.sql
/db/schemas/mysql_schema.sql
/dbloader/dbdata.inc.php
/includes/sessions.php
/language/lang_english/lang_statistics.php
/language/lang_polish/lang_custom_fields.php
/language/lang_polish/lang_modcp.php
/language/lang_polish/lang_statistics.php
/scripts/update.php
/scripts/update.sql
/scripts/update_useragent.php
Cały katalog /stat_modules/
/templates/subSilver/admin/custom_fields.tpl
/xs_mod/tpl/config.tpl
album_modcp.php
check_data.php
check_files.php
profilephoto_mod.php
statistics.php
Poniższe pliki możesz edytować ręcznie, lub nadpisać nowymi jeli nie robiłes w nich zmian.
#
# --------- [ OTWÓRZ ] -----------
# /admin/admin_users.php
#
# --------- [ ZNAJD ] -----------
#
ver. 1.9
#
# --------- [ ZAMIEŃ NA ] -----------
#
ver. 1.12.3
#
# --------- [ ZNAJD ] -----------
#
if ( $user_avatar_size <= $board_config['avatar_filesize'] && $avatar_size > 0)
#
# --------- [ ZAMIEŃ NA ] -----------
#
if ( $user_avatar_size <= $board_config['avatar_filesize'] && $user_avatar_size > 0)
#
# --------- [ OTWÓRZ ] -----------
# /admin/index.php
#
# --------- [ ZNAJD ] -----------
#
1.12.0
#
# --------- [ ZAMIEŃ NA ] -----------
#
1.12.3
#
# --------- [ ZNAJD ] -----------
#
$path = $host_path . "/phpBB2/phpBB_data.php
#
# --------- [ ZAMIEŃ NA ] -----------
#
$path = "/phpBB2/phpBB_data.php
function get_folder_size($target, $output=false)
{
$sourcedir = @opendir($target);
while(false !== ($filename = @readdir($sourcedir)))
{
if($filename != "." && $filename != "..")
{
if(is_dir($target."/".$filename))
{
// recurse subdirectory; call of function recursive
$totalsize += get_folder_size($target."/".$filename, $output);
}
else if(is_file($target."/".$filename))
{
$totalsize += @filesize($target."/".$filename);
}
}
}
@closedir($sourcedir);
return $totalsize;
}
function get_folder_count($target, $output=false)
{
$sourcedir = @opendir($target);
while(false !== ($filename = @readdir($sourcedir)))
{
if($filename != "." && $filename != "..")
{
if(is_dir($target."/".$filename))
{
// recurse subdirectory; call of function recursive
$totalcount += get_folder_count($target."/".$filename, $output);
}
else if(is_file($target."/".$filename))
{
$totalcount += 1;
}
}
}
@closedir($sourcedir);
return $totalcount;
}
#
# --------- [ ZAMIEŃ NA ] -----------
#
function get_folder_size($target)
{
$sourcedir = @opendir($target);
while(false !== ($filename = @readdir($sourcedir)))
{
if($filename != "." && $filename != "..")
{
if(@is_dir($target."/".$filename))
{
// recurse subdirectory; call of function recursive
$totalsize += get_folder_size($target."/".$filename);
}
else if(@is_file($target."/".$filename))
{
$totalsize += @filesize($target."/".$filename);
}
}
}
@closedir($sourcedir);
return $totalsize;
}
function get_folder_count($target)
{
$sourcedir = @opendir($target);
while(false !== ($filename = @readdir($sourcedir)))
{
if($filename != "." && $filename != "..")
{
if(@is_dir($target."/".$filename))
{
// recurse subdirectory; call of function recursive
$totalcount += get_folder_count($target."/".$filename);
}
else if(@is_file($target."/".$filename))
{
$totalcount += 1;
}
}
}
@closedir($sourcedir);
return $totalcount;
}
#
# --------- [ ZNAJD ] -----------
#
if($filename != ".." && is_dir($target."/".$filename) )
{
if ( $filename != "." )
{
$size += get_folder_size($target."/".$filename, $output);
$files_count = get_folder_count($target."/".$filename, $output);
}
else
{
$sourcedir2 = @opendir($target."/".$filename);
while(false !== ($filename2 = @readdir($sourcedir2)))
{
if($filename2 != "." && $filename2 != "..")
{
if(is_file($target."/".$filename2))
#
# --------- [ ZAMIEŃ NA ] -----------
#
if($filename != ".." && @is_dir($target."/".$filename) )
{
if ( $filename != "." )
{
$size += get_folder_size($target."/".$filename);
$files_count = get_folder_count($target."/".$filename);
}
else
{
$sourcedir2 = @opendir($target."/".$filename);
while(false !== ($filename2 = @readdir($sourcedir2)))
{
if($filename2 != "." && $filename2 != "..")
{
if(@is_file($target."/".$filename2))
#
# --------- [ OTWÓRZ ] -----------
# /includes/bbcode.php
#
# --------- [ ZNAJD ] -----------
#
1.12.0
#
# --------- [ ZAMIEŃ NA ] -----------
#
1.12.3
#
# --------- [ ZNAJD ] -----------
#
for ($i = 0; $i < count($smilies); $i++)
{
$smilie_title = ($smilies[$i]['code']) ? str_replace(array('?', ':'), array('?', ':'), $smilies[$i]['code']) : '';
$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '';
}
#
# --------- [ ZAMIEŃ NA ] -----------
#
for ($i = 0; $i < count($smilies); $i++)
{
if ( $smilies[$i]['code'] && $smilies[$i]['code'] != ' ' )
{
$smilies[$i]['code'] = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $smilies[$i]['code']);
$smilie_title = ($smilies[$i]['code']) ? str_replace(array('?', ':'), array('?', ':'), $smilies[$i]['code']) : '';
$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '
';
}
}
#
# --------- [ OTWÓRZ ] -----------
# /includes/functions.php
#
# --------- [ ZNAJD ] -----------
#
1.12.0
#
# --------- [ ZAMIEŃ NA ] -----------
#
1.12.3
#
# --------- [ ZNAJD ] -----------
#
function realdate($date_syntax,$date)
{
..... ZAMIEN CALA FUNKCJE
}
#
# --------- [ ZAMIEŃ NA ] -----------
#
function realdate($date_syntax = "Ymd", $date=0)
{
global $lang;
$i=2;
if ($date>=0)
{
return create_date($date_syntax, $date * 86400 + 1, 0, true);
}
else
{
$year= -(date%1461);
$days = $date + $year * 1461;
while ($days<0)
{
$year--;
$days+=365;
if ($i++==3)
{
$i=0;
$days++;
}
}
}
$leap_year = ($i==0) ? TRUE : FALSE;
$months_array = ($i==0) ?
array (0,31,60,91,121,152,182,213,244,274,305,335,366) :
array (0,31,59,90,120,151,181,212,243,273,304,334,365);
for ($month=1;$month<12;$month++)
{
if ($days<$months_array[$month]) break;
}
$day=$days-$months_array[$month-1]+1;
$lang['day_short'] = array ($lang['datetime']['Sun'],$lang['datetime']['Mon'],$lang['datetime']['Tue'],$lang['datetime']['Wed'],$lang['datetime']['Thu'],$lang['datetime']['Fri'],$lang['datetime']['Sat']);
$lang['day_long'] = array ($lang['datetime']['Sunday'],$lang['datetime']['Monday'],$lang['datetime']['Tuesday'],$lang['datetime']['Wednesday'],$lang['datetime']['Thursday'],$lang['datetime']['Friday'],$lang['datetime']['Saturday']);
$lang['month_short'] = array ($lang['datetime']['Jan'],$lang['datetime']['Feb'],$lang['datetime']['Mar'],$lang['datetime']['Apr'],$lang['datetime']['May'],$lang['datetime']['Jun'],$lang['datetime']['Jul'],$lang['datetime']['Aug'],$lang['datetime']['Sep'],$lang['datetime']['Oct'],$lang['datetime']['Nov'],$lang['datetime']['Dec']);
$lang['month_long'] = array ($lang['datetime']['January'],$lang['datetime']['February'],$lang['datetime']['March'],$lang['datetime']['April'],$lang['datetime']['May'],$lang['datetime']['June'],$lang['datetime']['July'],$lang['datetime']['August'],$lang['datetime']['September'],$lang['datetime']['October'],$lang['datetime']['November'],$lang['datetime']['December']);
//you may gain speed performance by remove som of the below entry's if they are not needed/used
return strtr ($date_syntax, array(
'a' => '',
'A' => '',
'\\d' => 'd',
'd' => ($day>9) ? $day : '0'.$day,
'\\D' => 'D',
'D' => $lang['day_short'][($date-3)%7],
'\\F' => 'F',
'F' => $lang['month_long'][$month-1],
'g' => '',
'G' => '',
'H' => '',
'h' => '',
'i' => '',
'I' => '',
'\\j' => 'j',
'j' => $day,
'\\l' => 'l',
'l' => $lang['day_long'][($date-3)%7],
'\\L' => 'L',
'L' => $leap_year,
'\\m' => 'm',
'm' => ($month>9) ? $month : '0'.$month,
'\\M' => 'M',
'M' => $lang['month_short'][$month-1],
'\\n' => 'n',
'n' => $month,
'O' => '',
's' => '',
'S' => '',
'\\t' => 't',
't' => $months_array[$month]-$months_array[$month-1],
'w' => '',
'\\y' => 'y',
'y' => ($year>29) ? $year-30 : $year+70,
'\\Y' => 'Y',
'Y' => $year+1970,
'\\z' => 'z',
'z' => $days,
'\\W' => '',
'W' => '') );
}
#
# --------- [ ZNAJD ] -----------
#
$topic_id_list = implode(',', $topic_id);
$sql = "SELECT topic_id, COUNT(post_id) AS posts
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_list)
AND poster_id = $user_id
GROUP BY topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain poster topic posts information', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$ptp_buff[$user_id][$row['topic_id']] = $row['posts'];
}
foreach( $topic_id as $id )
{
if( !isset($ptp_buff[$user_id][$id]) )
{
$ptp_buff[$user_id][$id] = '';
}
}
return;
#
# --------- [ ZAMIEŃ NA ] -----------
#
if ( $topic_id_list )
{
$sql = "SELECT topic_id, COUNT(post_id) AS posts
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_list)
AND poster_id = $user_id
GROUP BY topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain poster topic posts information', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$ptp_buff[$user_id][$row['topic_id']] = $row['posts'];
}
foreach( $topic_id as $id )
{
if( !isset($ptp_buff[$user_id][$id]) )
{
$ptp_buff[$user_id][$id] = '';
}
}
return;
}
#
# --------- [ ZNAJD ] -----------
#
$serialize_data = serialize($data);
if ( strpos($serialize_data, "\'") )
{
$data_rep = array();
foreach($data as $key => $val)
{
$data_rep[$key] = preg_replace('/[\\\]+\'/', "'", $val);
}
$serialize_data = serialize($data_rep);
}
$data = ($data) ? "" : "";
#
# --------- [ ZAMIEŃ NA ] -----------
#
$data = ($data) ? "" : "";
#
# --------- [ ZNAJD ] -----------
#
function replace_vars($text)
{
global $theme, $board_config, $userdata;
$text = ($userdata['session_logged_in']) ? preg_replace("#begin_logged_out(.*?)end_logged_out#si", "", $text) : preg_replace("#begin_logged_in(.*?)end_logged_in#si", "", $text);
return str_replace(array('au_tpl', 'au_lng', 'au_username', 'au_id', 'au_sid', 'begin_logged_out', 'end_logged_out', 'begin_logged_in', 'end_logged_in'), array($theme['template_name'], $board_config['default_lang'], $userdata['username'], $userdata['user_id'], $userdata['session_id'], '', '', '', ''), $text);
}
#
# --------- [ ZAMIEŃ NA ] -----------
#
function replace_vars($text, $default = '')
{
global $theme, $board_config, $userdata;
$text = ($userdata['session_logged_in']) ? preg_replace("#begin_logged_out(.*?)end_logged_out#si", "", $text) : preg_replace("#begin_logged_in(.*?)end_logged_in#si", "", $text);
$ret_default = ($default) ? $default : 'au_value';
return str_replace(array('au_tpl', 'au_lng', 'au_username', 'au_id', 'au_sid', 'begin_logged_out', 'end_logged_out', 'begin_logged_in', 'end_logged_in', 'au_value'), array($theme['template_name'], $board_config['default_lang'], $userdata['username'], $userdata['user_id'], $userdata['session_id'], '', '', '', '', $ret_default), $text);
}
#
# --------- [ ZNAJD ] -----------
#
$rowset[$smilies[$i]['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $smilies[$i]['code']));
#
# --------- [ ZAMIEŃ NA ] -----------
#
$rowset[$smilies[$i]['smile_url']]['code'] = str_replace("'", "\\'", str_replace(array('"', '\\'), array('"', '\\\\'), $smilies[$i]['code']));
#
# --------- [ ZNAJD ] -----------
#
'SMILEY_DESC' => $data['code'])
#
# --------- [ ZAMIEŃ NA ] -----------
#
'SMILEY_DESC' => str_replace('\\\\', '\\', $data['code']))
#
# --------- [ ZNAJD ] -----------
#
$moderators_list = $groups_check = array();
#
# --------- [ ZAMIEŃ NA ] -----------
#
$moderators_list = $groups_check = $groups_check_se = array();
#
# --------- [ ZNAJD ] -----------
#
if ( $row['user_id'] )
#
# --------- [ ZAMIEŃ NA ] -----------
#
if ( $row['user_id'] && !(@in_array($row['user_id'], $moderators_list[$row['forum_id']]['mod_list'])) )
#
# --------- [ ZNAJD ] -----------
#
else if ( $row['group_single_user'] == 1 )
{
$moderators_list[$row['forum_id']]['group_list'][] = array($row['user_id'], $row['username'], 1);
}
#
# --------- [ ZAMIEŃ NA ] -----------
#
else if ( $row['group_single_user'] == 1 && !(@in_array($row['user_id'], $groups_check_se[$row['forum_id']])) )
{
$groups_check_se[$row['forum_id']][] = $row['user_id'];
$moderators_list[$row['forum_id']]['group_list'][] = array($row['user_id'], $row['username'], 1);
}
#
# --------- [ OTWÓRZ ] -----------
# /includes/functions_add.php
#
# --------- [ ZNAJD ] -----------
#
1.12.1
#
# --------- [ ZAMIEŃ NA ] -----------
#
1.12.3
#
# --------- [ ZNAJD ] -----------
#
function user_agent($agent, $uaimages)
{
#
# --------- [ ZAMIEŃ NA ] -----------
#
function user_agent($agent, $uaimages)
{
global $phpbb_root_path;
#
# --------- [ ZNAJD ] -----------
#
$overlib_online = 'onMouseOver="return overlib(\'
' . str_replace("'","'", $location) . '