Statistik |
Beiträge: 140.385 (Täglich: 21,91 )
Themen: 16.334
Mitglieder: 13.177
Neuestes Mitglied: SBWebdesigns.
Ausl. d. letzten Minute: 193%
Ausl. d. letzten 5 Minuten: 201%
Ausl. d. letzten 15 Minuten: 205%
Freier Webspace: 1.94 TB
PHP-Version: 7.4.6
|
|
|
|
 |
ToDo-> WoltLab Burning Board 2.3.6pl2: Update PHP-Version 8.x (Aktuell 8.0) |
|
ToDo-> WoltLab Burning Board 2.3.6pl2: Update PHP-Version 8.x (Aktuell 8.0) |
 |
Hallo,
Dieses Thema beschäftigt sich ausschließlich mit dem Update auf PHP 8.x(zuvor: 7.x) für das "WoltLab Burning Board 2.3.6pl2".
Addons/Hacks wurden hierbei jedoch nicht berücksichtigt.
|
Zitat: Original von Schrimm
Hallo,
...
Die Anleitung ist von "oben" nach "unten" durchzuführen.
Also immer Schritt für Schritt und niemals die gesamte Datei durchsuchen.
Wird dies gemacht, wird auch automatisch die "dritte identische" Suchstelle ersetzt, da sie in der Anleitung durchaus vorkommt.
Quelle des Zitates von Schrimm:
-> Support-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 7.x |
|
|
Vorbereitungen:
Aktuelles Forum auf einem Server mit PHP 8.x spiegeln oder Sicherungskopien der Dateien erstellen.
Die folgende Dateien werden bearbeitet:
- /addreply.php
- /board.php
- /calendar.php
- /editpost.php
- /global.php
- /index.php
- /memberslist.php
- /misc.php
- /modcp.php
- /newthread.php
- /pms.php
- /profile.php
- /register.php
- /report.php
- /search.php
- /team.php
- /thread.php
- /usercp.php
- /usergroups.php
- /wiw.php
- /acp/avatar.php
- /acp/bbcodes.php
- /acp/board.php
- /acp/database.php
- /acp/designpack.php
- /acp/global.php
- /acp/group.php
- /acp/icon.php
- /acp/memberslist.php
- /acp/misc.php
- /acp/options.php
- /acp/otherstuff.php
- /acp/profilefield.php
- /acp/setup.php
- /acp/smilie.php
- /acp/style.php
- /acp/template.php
- /acp/threads.php
- /acp/users.php
- /acp/lib/admin_functions.php
- /acp/lib/class_adminsession.php
- /acp/lib/class_db_mysql.php
- /acp/lib/class_headers.php
- /acp/lib/class_language.php
- /acp/lib/class_options.php
- /acp/lib/class_parse.php
- /acp/lib/class_parsecode.php
- /acp/lib/class_query.php
- /acp/lib/class_smtp.php
- /acp/lib/class_templateparser.php
- /acp/lib/class_tpl_file.php
- /acp/lib/class_useronline.php
- /acp/lib/class_variableimport.php
- /acp/lib/class_zip.php
- /acp/lib/functions.php
- /acp/lib/inserts.sql
- /acp/lib/structure.sql
- /archive/index.php
- /archive/global.php
suche(6x) in /addreply.php nach:
ersetze gegen:
suche(2x) in /board.php nach:
ersetze gegen:
suche in /calendar.php nach:
php: |
1:
|
while (list($key, $event) = each($eventcache[$day])) { |
|
ersetze gegen:
php: |
1:
|
foreach($eventcache[$day] as $key => $event) { |
|
suche:
php: |
1:
|
if (count($birthdaycache[$day])) { |
|
ersetze gegen:
php: |
1:
|
if (isset($birthdaycache[$day]) && count($birthdaycache[$day])) { |
|
suche:
php: |
1:
|
while (list($key, $birthday) = each($birthdaycache[$day])) { |
|
ersetze gegen:
php: |
1:
|
foreach($birthdaycache[$day] as $key => $birthday) { |
|
suche(2x):
ersetze gegen:
suche(2x) in /editpost.php nach:
ersetze gegen:
suche in /global.php nach:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
if (version_compare($phpversion, '4.1.0') == -1) {
$_REQUEST = array_merge($HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS);
$_COOKIE =& $HTTP_COOKIE_VARS;
$_SERVER =& $HTTP_SERVER_VARS;
$_FILES =& $HTTP_POST_FILES;
$_GET =& $HTTP_GET_VARS;
$_POST =& $HTTP_POST_VARS;
}
// remove slashes in get post cookie data...
if (get_magic_quotes_gpc()) {
if (count($_REQUEST)) $_REQUEST = stripslashes_array($_REQUEST);
if (count($_POST)) $_POST = stripslashes_array($_POST);
if (count($_GET)) $_GET = stripslashes_array($_GET);
if (count($_COOKIE)) $_COOKIE = stripslashes_array($_COOKIE);
if (count($_SERVER)) $_SERVER = stripslashes_array($_SERVER);
} |
|
------------
Entferne es!
------------
suche:
php: |
1:
|
@set_magic_quotes_runtime(0); |
|
------------
Entferne es!
------------
suche(3x):
ersetze gegen:
suche(3x) in /index.php nach:
ersetze gegen:
suche(5x) in /memberslist.php nach:
php: |
1:
|
while (list($key, $val) = each($a_show)) { |
|
ersetze gegen:
php: |
1:
|
foreach($a_show as $key => $val) { |
|
suche in /misc.php nach:
php: |
1:
|
$parse = &new parse(0, 75, 1, "", 0); |
|
ersetze gegen:
php: |
1:
|
$parse = new parse(0, 75, 1, "", 0); |
|
suche in /modcp.php nach:
php: |
1:
|
while (list($key, $val) = each($values)) { |
|
ersetze gegen:
php: |
1:
|
foreach($values as $key => $val) { |
|
suche(4x) in /newthread.php nach:
ersetze gegen:
suche(6x) in /pms.php nach:
php: |
1:
|
$style[imagefolder] |
|
ersetze gegen:
php: |
1:
|
$style['imagefolder'] |
|
suche(7x):
ersetze gegen:
suche in /print.php nach:
php: |
1:
|
$parse = &new parse($docensor, 75, $wbbuserdata['showimages'], "", $usecode, 0); |
|
ersetze gegen:
php: |
1:
|
$parse = new parse($docensor, 75, $wbbuserdata['showimages'], "", $usecode, 0); |
|
suche in /profile.php nach:
php: |
1:
|
$wiw = &new WIW($wbbuserdata['a_can_view_ghosts']); |
|
ersetze gegen:
php: |
1:
|
$wiw = new WIW($wbbuserdata['a_can_view_ghosts']); |
|
suche in /register.php nach:
php: |
1:
|
while (list($key, $val) = each($result['groupids'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($result['groupids'] as $key => $val) { |
|
suche:
php: |
1:
|
$adminLang = &new language(0); |
|
ersetze gegen:
php: |
1:
|
$adminLang = new language(0); |
|
suche in /report.php nach:
php: |
1:
|
$userlang = &new language(intval($mod['languagepackid'])); |
|
ersetze gegen:
php: |
1:
|
$userlang = new language(intval($mod['languagepackid'])); |
|
suche in /search.php nach:
ersetze gegen:
suche:
php: |
1:
|
$parse = &new parse($docensor, 75, $wbbuserdata['showimages'], $search['searchstring'], $usecode); |
|
ersetze gegen:
php: |
1:
|
$parse = new parse($docensor, 75, $wbbuserdata['showimages'], $search['searchstring'], $usecode); |
|
suche:
php: |
1:
|
($sortby == "f.title") |
|
ersetze gegen:
php: |
1:
|
($sortby == "b.title") |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($temp)) |
|
ersetze gegen:
php: |
1:
|
foreach($temp as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($searchwords)) { |
|
ersetze gegen:
php: |
1:
|
foreach($searchwords as $key => $val) { |
|
suche(2x):
php: |
1:
|
while (list($key2, $wordid) = each($tempwordids)) |
|
ersetze gegen:
php: |
1:
|
foreach($tempwordids as $key2 => $wordid) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($add)) |
|
ersetze gegen:
php: |
1:
|
foreach($add as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($array)) |
|
ersetze gegen:
php: |
1:
|
foreach($array as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($add)) |
|
ersetze gegen:
php: |
1:
|
foreach($add as $key => $val) |
|
suche:
php: |
1:
|
if (count($wordidcache[$addsplit[$i]])) { |
|
ersetze gegen:
php: |
1:
|
if (isset($wordidcache[$addsplit[$i]]) && count($wordidcache[$addsplit[$i]])) { |
|
suche:
php: |
1:
|
while (list($key, $wordids) = each($wordidcache[$addsplit[$i]])) { |
|
ersetze gegen:
php: |
1:
|
foreach($wordidcache[$addsplit[$i]] as $key => $wordids) { |
|
suche:
php: |
1:
|
while (list($key2, $wordid) = each($wordids)) { |
|
ersetze gegen:
php: |
1:
|
foreach($wordids as $key2 => $wordid) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($globalarray)) { |
|
ersetze gegen:
php: |
1:
|
foreach($globalarray as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($_POST['boardids'])) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['boardids'] as $key => $val) |
|
suche in /team.php nach:
php: |
1:
|
while (list($groupid, $grouptitle) = each($grouptitles)) |
|
ersetze gegen:
php: |
1:
|
foreach($grouptitles as $groupid => $grouptitle) |
|
suche in /thread.php nach:
php: |
1:
|
while (list($key, $val) = each($this->userfieldcache)) { |
|
ersetze gegen:
php: |
1:
|
foreach($this->userfieldcache as $key => $val) { |
|
suche:
php: |
1:
|
$this->parse = &new parse($docensor, 75, $wbbuserdata['showimages'], $hilight, $usecode); |
|
ersetze gegen:
php: |
1:
|
$this->parse = new parse($docensor, 75, $wbbuserdata['showimages'], $hilight, $usecode); |
|
suche:
php: |
1:
2:
3:
|
function FlatThread($threadid) {
$this->threadid = $threadid;
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct($threadid) {
$this->FlatThread($threadid);
} |
|
suche:
php: |
1:
2:
3:
|
function ThreadedThread($threadid) {
$this->threadid = $threadid;
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct($threadid) {
$this->ThreadedThread($threadid);
} |
|
suche:
php: |
1:
|
while (list($postid, ) = each($this->cache[$parentid])) { |
|
ersetze gegen:
php: |
1:
|
foreach(array_keys($this->cache[$parentid]) as $postid) { |
|
suche:
php: |
1:
|
while (list($postid, ) = each($this->list)) { |
|
ersetze gegen:
php: |
1:
|
foreach(array_keys($this->list) as $postid) { |
|
suche:
php: |
1:
|
while (list($postid, ) = each($this->cache[$parentid])) { |
|
ersetze gegen:
php: |
1:
|
foreach(array_keys($this->cache[$parentid]) as $postid) { |
|
suche:
php: |
1:
|
while (list($postid, $depth) = each($this->list)) |
|
ersetze gegen:
php: |
1:
|
foreach($this->list as $postid => $depth) |
|
suche:
php: |
1:
2:
|
if ($threadview == 1) $t = &new ThreadedThread($threadid);
else $t = &new FlatThread($threadid); |
|
ersetze gegen:
php: |
1:
2:
|
if ($threadview == 1) $t = new ThreadedThread($threadid);
else $t = new FlatThread($threadid); |
|
suche:
php: |
1:
|
while (list($key, $row) = each($polloptions)) { |
|
ersetze gegen:
php: |
1:
|
foreach($polloptions as $key => $row) { |
|
suche(2x) in /usercp.php nach:
ersetze gegen:
suche:
php: |
1:
|
$wbbuserdata[buddylist] |
|
ersetze gegen:
php: |
1:
|
$wbbuserdata['buddylist'] |
|
suche:
php: |
1:
|
while (list($threadid, $lastposttime) = each($visitcache[$tempids[$j]])) { |
|
ersetze gegen:
php: |
1:
|
foreach($visitcache[$tempids[$j]] as $threadid => $lastposttime) { |
|
suche(3x) in /usergroups.php nach:
php: |
1:
|
while (list($userid, $username) = each($groupleadercache[$group['groupid']])) |
|
ersetze gegen:
php: |
1:
|
foreach($groupleadercache[$group['groupid']] as $userid => $username) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($wbbuserdata['groupids'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($wbbuserdata['groupids'] as $key => $val) { |
|
suche(3x):
ersetze gegen:
suche:
php: |
1:
|
while (list($key, $val) = each($result['groupids'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($result['groupids'] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($applicationid, $val) = each($_POST['applicationids'])) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['applicationids'] as $applicationid => $val) |
|
suche:
php: |
1:
|
while (list($userid, ) = each($_POST['userids'])) { |
|
ersetze gegen:
php: |
1:
|
foreach(array_keys($_POST['userids']) as $userid) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($result['groupids'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($result['groupids'] as $key => $val) { |
|
suche in /wiw.php nach:
php: |
1:
|
$wiw = &new WIW($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']); |
|
ersetze gegen:
php: |
1:
|
$wiw = new WIW($wbbuserdata['a_can_view_ghosts'], $wbbuserdata['buddylist']); |
|
suche in /acp/avatar.php nach:
php: |
1:
|
$z = &new zipfile; |
|
ersetze gegen:
php: |
1:
|
$z = new zipfile; |
|
suche in /acp/bbcodes.php nach:
ersetze gegen:
suche(2x) in /acp/board.php nach:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
php: |
1:
2:
3:
|
while (list(, $moderator) = each($modcache[$boards['boardid']])) {
$tree .= ",\n['".addcslashes($moderator['username'], "'")."','3','".$boards['boardid']."|".$moderator['userid']."']";
} |
|
ersetze gegen:
php: |
1:
|
foreach($modcache[$boards['boardid']] as $moderator) $tree .= ",\n['".addcslashes($moderator['username'], "'")."','3','".$boards['boardid']."|".$moderator['userid']."']"; |
|
suche:
php: |
1:
|
while (list($groupid, $grouptitle) = each($groupcache)) { |
|
ersetze gegen:
php: |
1:
|
foreach($groupcache as $groupid => $grouptitle) { |
|
suche:
php: |
1:
|
if (count($parentaccess)) { |
|
ersetze gegen:
php: |
1:
|
if (isset($parentaccess) && count($parentaccess)) { |
|
suche:
php: |
1:
|
while (list(, $user) = each($parentaccess)) { |
|
ersetze gegen:
php: |
1:
|
foreach($parentaccess as $user) { |
|
suche:
php: |
1:
2:
3:
|
while (list(, $user) = each($accesscache[$boards['boardid']])) {
$tree .= ",\n['".addcslashes($user['username'], "'")."','7','".$boards['boardid']."|".$user['userid']."|".intval($user['color'])."']";
} |
|
ersetze gegen:
php: |
1:
|
foreach($accesscache[$boards['boardid']] as $user) $tree .= ",\n['".addcslashes($user['username'], "'")."','7','".$boards['boardid']."|".$user['userid']."|".intval($user['color'])."']"; |
|
suche:
php: |
1:
|
while (list($key, $val) = each($array)) |
|
ersetze gegen:
php: |
1:
|
foreach($array as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($_POST['boardorder'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['boardorder'] as $key => $val) { |
|
suche:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($_POST)) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST as $key => $val) |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($row)) { |
|
ersetze gegen:
php: |
1:
|
foreach($row as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($_POST)) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST as $key => $val) |
|
suche:
php: |
1:
|
if (count($boardcache)) { |
|
ersetze gegen:
php: |
1:
|
if (isset($boardcache) && count($boardcache)) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($_POST['permission'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['permission'] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($boardid, $board) = each($boardcache[$parentid])) { |
|
ersetze gegen:
php: |
1:
|
foreach($boardcache[$parentid] as $boardid => $board) { |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($_POST['rights'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['rights'] as $key => $val) { |
|
suche(2x) in /acp/database.php nach:
php: |
1:
|
$result = mysql_list_tables($sqldb); |
|
ersetze gegen:
php: |
1:
|
$result = $db->query("SHOW TABLES FROM $sqldb"); |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($_POST['tables'])) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['tables'] as $key => $val) |
|
suche(3x) in /acp/designpack.php nach:
php: |
1:
|
while (list($key, $val) = each($_POST)) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST as $key => $val) { |
|
suche in /acp/global.php nach:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
if (version_compare($phpversion, '4.1.0') == -1) {
$_REQUEST = array_merge($HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS);
$_COOKIE =& $HTTP_COOKIE_VARS;
$_SERVER =& $HTTP_SERVER_VARS;
$_FILES =& $HTTP_POST_FILES;
$_GET =& $HTTP_GET_VARS;
$_POST =& $HTTP_POST_VARS;
}
// remove slashes in get post cookie data...
if (get_magic_quotes_gpc()) {
if (count($_REQUEST)) $_REQUEST = stripslashes_array($_REQUEST);
if (count($_POST)) $_POST = stripslashes_array($_POST);
if (count($_GET)) $_GET = stripslashes_array($_GET);
if (count($_COOKIE)) $_COOKIE = stripslashes_array($_COOKIE);
if (count($_SERVER)) $_SERVER = stripslashes_array($_SERVER);
} |
|
------------
Entferne es!
------------
suche:
php: |
1:
|
@set_magic_quotes_runtime(0); |
|
------------
Entferne es!
------------
suche:
php: |
1:
2:
3:
4:
5:
6:
|
if ($_GET['sid'] || $_POST['sid']) {
$adminsession = new adminsession();
if ($_GET['sid']) $adminsession_error = $adminsession->update($_GET['sid'], $REMOTE_ADDR, $HTTP_USER_AGENT);
else $adminsession_error = $adminsession->update($_POST['sid'], $REMOTE_ADDR, $HTTP_USER_AGENT);
$session['hash'] = $adminsession->hash;
} |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
6:
|
if ((isset($_GET['sid']) && $_GET['sid']) || (isset($_POST['sid']) && $_POST['sid'])) {
$adminsession = new adminsession();
if (isset($_GET['sid']) && $_GET['sid']) $adminsession_error = $adminsession->update($REMOTE_ADDR, $HTTP_USER_AGENT, $_GET['sid']);
else $adminsession_error = $adminsession->update($REMOTE_ADDR, $HTTP_USER_AGENT, $_POST['sid']);
$session['hash'] = $adminsession->hash;
} |
|
suche in /acp/group.php nach:
php: |
1:
2:
3:
|
while (list($variablegroupid, $title) = each($variablegroupcache)) {
$group_options .= makeoption("group.php?action=rights&groupid=$row[groupid]&parentvariablegroupid=$variablegroupid&sid=$session[hash]", $title, "", 0);
} |
|
ersetze gegen:
php: |
1:
|
foreach($variablegroupcache as $variablegroupid => $title) $group_options .= makeoption("group.php?action=rights&groupid=$row[groupid]&parentvariablegroupid=$variablegroupid&sid=$session[hash]", $title, "", 0); |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($_POST['groupleaders'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['groupleaders'] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($variablegroupcache[$variablegroupid])) { |
|
ersetze gegen:
php: |
1:
|
foreach($variablegroupcache[$variablegroupid] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key2, $val2) = each($valuecache[$val['variablegroupid']])) |
|
ersetze gegen:
php: |
1:
|
foreach($valuecache[$val['variablegroupid']] as $key2 => $val2) |
|
suche:
php: |
1:
|
while (list($key2, $val2) = each($valuecache[$variablegroupid])) { |
|
ersetze gegen:
php: |
1:
|
foreach($valuecache[$variablegroupid] as $key2 => $val2) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($variablegroupcache[$variablegroupid])) { |
|
ersetze gegen:
php: |
1:
|
foreach($variablegroupcache[$variablegroupid] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($groupids, $userids) = each($newgroupcombinations)) |
|
ersetze gegen:
php: |
1:
|
foreach($newgroupcombinations as $groupids => $userids) |
|
suche:
php: |
1:
2:
3:
|
while (list($variablegroupid, $securitylevel) = each($_POST['securitylevels'])) {
$db->unbuffered_query("UPDATE bb".$n."_groupvariablegroups SET securitylevel='".intval($securitylevel)."' WHERE variablegroupid='".intval($variablegroupid)."'");
} |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['securitylevels'] as $variablegroupid => $securitylevel) $db->unbuffered_query("UPDATE bb".$n."_groupvariablegroups SET securitylevel='".intval($securitylevel)."' WHERE variablegroupid='".intval($variablegroupid)."'"); |
|
suche:
php: |
1:
|
while (list($key, $val) = each($variablegroupcache[$variablegroupid])) { |
|
ersetze gegen:
php: |
1:
|
foreach($variablegroupcache[$variablegroupid] as $key => $val) { |
|
suche:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
ersetze gegen:
suche:
php: |
1:
|
while (list($key, $val) = each($permcache[$row['boardid']])) { |
|
ersetze gegen:
php: |
1:
|
foreach($permcache[$row['boardid']] as $key => $val) { |
|
suche:
php: |
1:
|
if ($row['languagepackid']) $langpack = &new language(intval($row['languagepackid'])); |
|
ersetze gegen:
php: |
1:
|
if ($row['languagepackid']) $langpack = new language(intval($row['languagepackid'])); |
|
suche in /acp/icon.php nach:
ersetze gegen:
suche in /acp/memberslist.php nach:
php: |
1:
|
while (list($key, $val) = each($profilefieldcache)) |
|
ersetze gegen:
php: |
1:
|
foreach($profilefieldcache as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($a_show)) { |
|
ersetze gegen:
php: |
1:
|
foreach($a_show as $key => $val) { |
|
suche in /acp/misc.php nach:
php: |
1:
2:
|
var $itemgroupbit1;
var $itemgroupbit2; |
|
füge darunter ein:
php: |
1:
2:
3:
|
function __construct(&$itemgroupbit1, &$itemgroupbit2, $personalmenu = 1, $markfirst = 0, $hidelast = 0) {
$this->menu($itemgroupbit1, $itemgroupbit2, $personalmenu, $markfirst, $hidelast);
} |
|
suche in /acp/options.php nach:
php: |
1:
|
while (list($optionid, $value) = each($_POST['option'])) |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['option'] as $optionid => $value) |
|
suche in /acp/otherstuff.php nach:
php: |
1:
|
$statdate = preg_replace("/(\d+)~/e", "getday('\\1')", $statdate); |
|
ersetze gegen:
php: |
1:
|
$statdate = preg_replace_callback("/(\d+)~/", function($matches) {return getday($matches[1]);}, $statdate); |
|
suche:
php: |
1:
|
$statdate = preg_replace("/(\d+)~/e", "getmonth('\\1')", $statdate); |
|
ersetze gegen:
php: |
1:
|
$statdate = preg_replace_callback("/(\d+)~/", function($matches) {return getmonth($matches[1]);}, $statdate); |
|
suche:
php: |
1:
|
while (list($key, $stat) = each($cache)) { |
|
ersetze gegen:
php: |
1:
|
foreach($cache as $key => $stat) { |
|
suche in /acp/profilefield.php nach:
php: |
1:
|
while (list($key, $val) = each($options)) { |
|
ersetze gegen:
php: |
1:
|
foreach($options as $key => $val) { |
|
suche in /acp/setup.php nach:
php: |
1:
|
@set_magic_quotes_runtime(0); |
|
------------
Entferne es!
------------
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
if (version_compare($phpversion, "4.1.0") == -1) {
$_REQUEST = array_merge($HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS);
$_COOKIE =& $HTTP_COOKIE_VARS;
$_SERVER =& $HTTP_SERVER_VARS;
$_FILES =& $HTTP_POST_FILES;
$_GET =& $HTTP_GET_VARS;
$_POST =& $HTTP_POST_VARS;
}
// remove slashes in get post cookie data...
if (get_magic_quotes_gpc()) {
if (is_array($_REQUEST)) $_REQUEST = stripslashes_array($_REQUEST);
if (is_array($_POST)) $_POST = stripslashes_array($_POST);
if (is_array($_GET)) $_GET = stripslashes_array($_GET);
if (is_array($_COOKIE)) $_COOKIE = stripslashes_array($_COOKIE);
} |
|
------------
Entferne es!
------------
suche:
php: |
1:
2:
3:
|
function ConvertSize() {
$this->hash = substr(md5(uniqid(microtime())),0,6);
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct() {
$this->ConvertSize();
} |
|
suche:
php: |
1:
2:
|
while(list($mode,$val)=each($this->tempsave)) {
while(list($varnr,$code)=each($val)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($this->tempsave as $mode => $val) {
foreach($val as $varnr => $code) { |
|
suche:
ersetze gegen:
suche:
php: |
1:
|
version_compare($phpversion, "4.0.3") |
|
ersetze gegen:
php: |
1:
|
version_compare($phpversion, "7.0.0") |
|
suche:
php: |
1:
|
$connid = @mysql_connect($sqlhost, $sqluser, $sqlpassword); |
|
ersetze gegen:
php: |
1:
|
$connid = @mysqli_connect($sqlhost, $sqluser, $sqlpassword); |
|
suche:
php: |
1:
|
!@mysql_select_db($sqldb, $connid) |
|
ersetze gegen:
php: |
1:
|
!@mysqli_select_db($connid, $sqldb) |
|
suche:
ersetze gegen:
php: |
1:
|
mysqli_error($connid) |
|
suche:
php: |
1:
|
$result = mysql_list_tables($sqldb); |
|
ersetze gegen:
php: |
1:
|
$result = mysqli_query($db->link_id,"SHOW TABLES FROM $sqldb"); |
|
suche:
php: |
1:
|
if (in_array(mysql_tablename($result, $i), $tables)) { |
|
ersetze gegen:
php: |
1:
|
if (in_array(mysqli_fetch_row($result)[0], $tables)) { |
|
suche:
php: |
1:
|
while (list(, $designelement) = each($data['designpack']['designelements'])) |
|
ersetze gegen:
php: |
1:
|
foreach($data['designpack']['designelements'] as $designelement) |
|
suche:
php: |
1:
2:
3:
|
while (list(, $template) = each($data['templates'])) {
$db->unbuffered_query("REPLACE INTO bb".$n."_templates (templatepackid, templatename, template) VALUES (0, '".addslashes($template['templatename'])."', '".addslashes($template['template'])."')", 1);
} |
|
ersetze gegen:
php: |
1:
|
foreach($data['templates'] as $template) $db->unbuffered_query("REPLACE INTO bb".$n."_templates (templatepackid, templatename, template) VALUES (0, '".addslashes($template['templatename'])."', '".addslashes($template['template'])."')", 1); |
|
suche:
ersetze gegen:
suche in /acp/smilie.php nach:
ersetze gegen:
suche(4x) in /acp/style.php nach:
ersetze gegen:
suche:
php: |
1:
|
while (list(, $template) = each($data['templates'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($data['templates'] as $template) { |
|
suche:
php: |
1:
|
while (list(, $image) = each($data['images'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($data['images'] as $image) { |
|
suche:
php: |
1:
|
while (list(, $designelement) = each($data['designpack']['designelements'])) $db->unbuffered_query("INSERT INTO bb".$n."_designelements (designpackid, element, value) VALUES ('$designpackid', '".addslashes($designelement['element'])."', '".addslashes($designelement['value'])."')"); |
|
ersetze gegen:
php: |
1:
|
foreach($data['designpack']['designelements'] as $designelement) $db->unbuffered_query("INSERT INTO bb".$n."_designelements (designpackid, element, value) VALUES ('$designpackid', '".addslashes($designelement['element'])."', '".addslashes($designelement['value'])."')"); |
|
suche in /acp/template.php nach:
php: |
1:
|
while (list($key, $val) = each($files)) { |
|
ersetze gegen:
php: |
1:
|
foreach($files as $key => $val) { |
|
suche in /acp/threads.php nach:
php: |
1:
|
while (list($key, $val) = each($closethread)) |
|
ersetze gegen:
php: |
1:
|
foreach($closethread as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($delthread)) |
|
ersetze gegen:
php: |
1:
|
foreach($delthread as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($movethread)) |
|
ersetze gegen:
php: |
1:
|
foreach($movethread as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($threadaction)) |
|
ersetze gegen:
php: |
1:
|
foreach($threadaction as $key => $val) |
|
suche in /acp/users.php nach:
php: |
1:
|
while (list($key, $val) = each($_POST['permission'])) { |
|
ersetze gegen:
php: |
1:
|
foreach($_POST['permission'] as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($groupids)) { |
|
ersetze gegen:
php: |
1:
|
foreach($groupids as $key => $val) { |
|
suche:
php: |
1:
|
while (list($groupids, $n_userids) = each($newgroupcombinations)) |
|
ersetze gegen:
php: |
1:
|
foreach($newgroupcombinations as $groupids => $n_userids) |
|
suche:
php: |
1:
|
$statdate = preg_replace("/(\d+)~/e", "getday('\\1')", $statdate); |
|
ersetze gegen:
php: |
1:
|
$statdate = preg_replace_callback("/(\d+)~/", function($matches) {return getday($matches[1]);}, $statdate); |
|
suche:
php: |
1:
|
$statdate = preg_replace("/(\d+)~/e", "getmonth('\\1')", $statdate); |
|
ersetze gegen:
php: |
1:
|
$statdate = preg_replace_callback("/(\d+)~/", function($matches) {return getmonth($matches[1]);}, $statdate); |
|
suche:
php: |
1:
|
while (list($key, $stat) = each($cache)) { |
|
ersetze gegen:
php: |
1:
|
foreach($cache as $key => $stat) { |
|
suche in /acp/lib/admin_functions.php nach:
ersetze gegen:
suche:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($update)) { |
|
ersetze gegen:
php: |
1:
|
foreach($update as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($varArray)) $keyArray[$val] = $value; |
|
ersetze gegen:
php: |
1:
|
foreach($varArray as $key => $val) $keyArray[$val] = $value; |
|
suche:
php: |
1:
|
while (list($key, $val) = each($keyArray)) $varArray[] = $key; |
|
ersetze gegen:
php: |
1:
|
foreach($keyArray as $key => $val) $varArray[] = $key; |
|
suche in /acp/lib/class_adminsession.php nach:
php: |
1:
|
function update($hash = '', $ip, $agent) { |
|
ersetze gegen:
php: |
1:
|
function update($ip, $agent, $hash = '') { |
|
suche in /acp/lib/class_db_mysql.php nach:
php: |
1:
|
var $appname = 'WoltLab Burning Board'; |
|
füge darunter ein:
php: |
1:
2:
3:
|
function __construct($server, $user, &$password, $database, $phpversion=7) {
$this->db($server, $user, $password, $database, $phpversion);
} |
|
suche:
php: |
1:
|
$server, $user, &$password, $database, $phpversion |
|
ersetze gegen:
php: |
1:
|
$server, $user, &$password, $database, $phpversion=7 |
|
suche:
php: |
1:
|
@mysql_connect($this->server, $this->user, $this->password); |
|
ersetze gegen:
php: |
1:
|
@mysqli_connect($this->server, $this->user, $this->password); |
|
suche:
ersetze gegen:
php: |
1:
|
mysqli_error($this->link_id); |
|
suche:
ersetze gegen:
php: |
1:
|
mysqli_errno($this->link_id); |
|
suche:
ersetze gegen:
suche:
php: |
1:
|
!@mysql_select_db($this->database, $this->link_id) |
|
ersetze gegen:
php: |
1:
|
!@mysqli_select_db($this->link_id, $this->database) |
|
suche:
php: |
1:
|
mysql_query($query_string, $this->link_id); |
|
ersetze gegen:
php: |
1:
|
mysqli_query($this->link_id, $query_string); |
|
suche:
php: |
1:
|
$this->query_id = mysql_unbuffered_query($query_string, $this->link_id); |
|
ersetze gegen:
php: |
1:
|
$this->query_id = mysqli_query($this->link_id, $query_string, MYSQLI_USE_RESULT); |
|
suche:
php: |
1:
2:
3:
4:
5:
|
function fetch_array($query_id = -1, $type = MYSQL_BOTH) {
if ($query_id != -1) $this->query_id = $query_id;
$this->record = mysql_fetch_array($this->query_id, $type);
return $this->record;
} |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
|
function fetch_array($query_id = false, $type = MYSQLI_BOTH) {
if ($query_id != false) $this->query_id = $query_id;
$this->record = mysqli_fetch_array($this->query_id, $type);
return $this->record;
} |
|
suche:
php: |
1:
2:
3:
4:
5:
|
function fetch_row($query_id = -1) {
if ($query_id != -1) $this->query_id = $query_id;
$this->record = mysql_fetch_row($this->query_id);
return $this->record;
} |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
|
function fetch_row($query_id = false) {
if ($query_id != false) $this->query_id = $query_id;
$this->record = mysqli_fetch_row($this->query_id);
return $this->record;
} |
|
suche:
ersetze gegen:
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
|
function num_rows($query_id = -1) {
if ($query_id != -1) $this->query_id = $query_id;
return mysql_num_rows($this->query_id);
}
function affected_rows() {
return mysql_affected_rows($this->link_id);
}
function insert_id() {
return mysql_insert_id($this->link_id);
}
function error($errormsg) {
global $boardversion;
$this->errdesc = mysql_error();
$this->errno = mysql_errno(); |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
|
function num_rows($query_id = false) {
if ($query_id != false) $this->query_id = $query_id;
return mysqli_num_rows($this->query_id);
}
function affected_rows() {
return mysqli_affected_rows($this->link_id);
}
function insert_id() {
return mysqli_insert_id($this->link_id);
}
function error($errormsg) {
global $boardversion;
$this->errdesc = mysqli_error($this->link_id);
$this->errno = mysqli_errno($this->link_id); |
|
suche:
php: |
1:
|
mysql_data_seek($result, $nr) |
|
ersetze gegen:
php: |
1:
|
mysqli_data_seek($result, $nr) |
|
suche in /acp/lib/class_headers.php nach:
php: |
1:
|
function send($isacp = 0) { |
|
ersetze gegen:
php: |
1:
|
static function send($isacp = 0) { |
|
suche in /acp/lib/class_language.php nach:
php: |
1:
2:
3:
4:
|
function language($languagepackid, $path = '.') {
$this->languagepackid = $languagepackid;
$this->path = $path;
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct($languagepackid, $path = '.') {
$this->language($languagepackid,$path);
} |
|
suche in /acp/lib/class_options.php nach:
php: |
1:
2:
3:
|
function options($path2lib) {
$this->path2lib = $path2lib;
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function _construct($path2lib) {
$this->options($path2lib);
} |
|
suche in /acp/lib/class_parse.php nach:
php: |
1:
|
var $search = array(); |
|
füge darunter ein:
php: |
1:
|
var $search2 = array(); |
|
suche:
php: |
1:
2:
|
var $replace = array();
var $replace2 = array(); |
|
füge darunter ein:
php: |
1:
2:
|
var $search_replace = array();
var $search_replace2 = array(); |
|
suche:
php: |
1:
|
var $breakChar = ''; |
|
füge darunter ein:
php: |
1:
2:
3:
|
function __construct($docensor = 0, $wrapwidth = 0, $showimages = 0, $hilight = '', $usecode = 1, $cuturls = 1, $useCaching = 0) {
$this->parse($docensor, $wrapwidth, $showimages, $hilight, $usecode, $cuturls, $useCaching);
} |
|
suche:
php: |
1:
|
$this->smilie_search2[] = "/{".$this->hash."_".$row['smilieid']."}/"; |
|
ersetze gegen:
php: |
1:
|
$this->smilie_search2[] = "/\{".$this->hash."_".$row['smilieid']."\}/"; |
|
suche:
php: |
1:
|
$this->search[] = $this->hilightSearch; |
|
füge darunter ein:
php: |
1:
|
$this->search2[] = $this->hilightSearch; |
|
suche:
php: |
1:
|
while (list($key, $word) = each($hilightwords)) { |
|
ersetze gegen:
php: |
1:
|
foreach($hilightwords as $key => $word) { |
|
suche:
php: |
1:
|
$this->search[] = $this->hilightSearch; |
|
füge darunter ein:
php: |
1:
|
$this->search2[] = $this->hilightSearch; |
|
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
|
$this->search[] = "/\[list=("|['\"]?)([^\"']+)\\1](.+)\[\/list((=\\1[^\"']+\\1])|(\]))/esiU";
$this->replace[] = "\$this->formatlist('\\3', '\\2')";
$this->search[] = "/\[list](.+)\[\/list\]/esiU";
$this->replace[] = "\$this->formatlist('\\1')";
$this->search[] = "/\[url=("|['\"]?)([^\"']+)\\1](.+)\[\/url\]/esiU";
$this->replace[] = "\$this->formaturl('\\2','\\3')";
$this->search[] = "/\[url]([^\"\[]+)\[\/url\]/eiU";
$this->replace[] = "\$this->formaturl('\\1')"; |
|
ersetze gegen:
php: |
1:
2:
3:
4:
|
$this->search_replace['/\[list=("|[\'"]?)([^"\']+)\1](.+)\[\/list((=\1[^"\']+\1])|(\]))/siU'] = function($matches) {return $this->formatlist($matches[3],$matches[2]);};
$this->search_replace['/\[list](.+)\[\/list\]/siU'] = function($matches) {return $this->formatlist($matches[1]);};
$this->search_replace['/\[url=("|[\'"]?)([^"\']+)\1](.+)\[\/url\]/siU'] = function($matches) {return $this->formaturl($matches[2],$matches[3]);};
$this->search_replace['/\[url]([^"\[]+)\[\/url\]/iU'] = function($matches) {return $this->formaturl($matches[1]);}; |
|
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
|
$this->replace2[] = "'$this->breakChar[list=\\1$this->breakChar\\2$this->breakChar\\1]$this->breakChar'.\$this->stripSlashes('\\3').'$this->breakChar[/list=\\1$this->breakChar\\2$this->breakChar\\1]$this->breakChar'";
$this->replace2[] = "'$this->breakChar[list]$this->breakChar'.\$this->stripSlashes('\\1').'$this->breakChar[/list]$this->breakChar'";
$this->replace2[] = "'$this->breakChar[url=\\1$this->breakChar'.\$this->insertBreakChar('\\2').'$this->breakChar\\1]$this->breakChar'.\$this->stripSlashes('\\3').'$this->breakChar[/url]$this->breakChar'";
$this->replace2[] = "'$this->breakChar[url]$this->breakChar' . \$this->insertBreakChar('\\1') . '$this->breakChar[/url]$this->breakChar'";
$this->replace2[] = "\\0";
$this->replace2[] = "\\0";
$this->replace2[] = "\\0"; |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
|
$this->search2 = $this->search;
$this->search2[] = "/\[list=("|['\"]?)([^\"']+)\\1](.+)\[\/list((=\\1[^\"']+\\1])|(\]))/siU";
$this->search2[] = "/\[list](.+)\[\/list\]/siU";
$this->replace2[] = "\\0";
$this->replace2[] = "\\0";
$this->replace2[] = "\\0";
$this->replace2[] = "$this->breakChar[list=\\1$this->breakChar\\2$this->breakChar\\1]$this->breakChar\\3$this->breakChar[/list=\\1$this->breakChar\\2$this->breakChar\\1]$this->breakChar";
$this->replace2[] = "$this->breakChar[list]$this->breakChar\\1$this->breakChar[/list]$this->breakChar";
$this->search_replace2['/\[url=("|[\'"]?)([^"\']+)\1](.+)\[\/url\]/siU'] = function($matches) {return $this->breakChar.'[url='.$matches[1].$this->breakChar.$this->insertBreakChar($matches[2]).$this->breakChar.$matches[1].']'.$this->breakChar.$matches[3].$this->breakChar.'[/url]'.$this->breakChar;};
$this->search_replace2['/\[url]([^"\[]+)\[\/url\]/iU'] = function($matches) {return $this->breakChar.'[url]'.$this->breakChar.$this->insertBreakChar($matches[1]).$this->breakChar.'[/url]'.$this->breakChar;}; |
|
suche:
php: |
1:
|
$this->search[] = $search; |
|
füge darunter ein:
php: |
1:
|
$this->search2[] = $search; |
|
suche:
php: |
1:
2:
3:
|
if ($allowdynimg == 1) $this->imgsearch2 = "/\[img]([^\"]+)\[\/img\]/esiU";
else $this->imgsearch2 = "/\[img]([^\"\?\&]+\.(gif|jpg|jpeg|bmp|png))\[\/img\]/esiU";
$this->imgreplace2 = "'$this->breakChar[img]$this->breakChar' . \$this->insertBreakChar('\\1') . '$this->breakChar[/img]$this->breakChar'"; |
|
ersetze gegen:
php: |
1:
2:
3:
|
if ($allowdynimg == 1) $this->imgsearch2 = "/\[img]([^\"]+)\[\/img\]/siU";
else $this->imgsearch2 = "/\[img]([^\"\?\&]+\.(gif|jpg|jpeg|bmp|png))\[\/img\]/siU";
$this->imgreplace2 = function($matches) {return $this->breakChar.'[img]'.$this->breakChar.$this->insertBreakChar($matches[1]).$this->breakChar.'[/img]'.$this->breakChar;}; |
|
suche:
php: |
1:
|
while (list($key, $censor) = each($this->censorwords)) { |
|
ersetze gegen:
php: |
1:
|
foreach($this->censorwords as $key => $censor) { |
|
suche:
php: |
1:
|
$post = preg_replace("/(\[(php|code)\])(.*)(\[\/\\2\])/seiU", "\$this->cachecode('\\3','\\2')", $post); |
|
ersetze gegen:
php: |
1:
|
$post = preg_replace_callback("/(\[(php|code)\])(.*)(\[\/\\2\])/siU", function($matches) {return $this->cachecode($matches[3], $matches[2]);}, $post); |
|
suche:
php: |
1:
|
$post = preg_replace($this->search, $this->replace2, $post); |
|
ersetze gegen:
php: |
1:
2:
|
$post = preg_replace_callback_array($this->search_replace2, $post);
$post = preg_replace($this->search2, $this->replace2, $post); |
|
suche:
php: |
1:
|
if ($allowimages != 0) $post = preg_replace($this->imgsearch2, $this->imgreplace2, $post); |
|
ersetze gegen:
php: |
1:
|
if ($allowimages != 0) $post = preg_replace_callback($this->imgsearch2, $this->imgreplace2, $post); |
|
suche:
php: |
1:
|
$post = preg_replace($this->search, $this->replace, $post); |
|
füge darüber ein:
php: |
1:
|
$post = preg_replace_callback_array($this->search_replace, $post); |
|
suche:
php: |
1:
2:
3:
|
while (list($mode, $val) = each($this->tempsave)) {
while (list($varnr, $code) = each($val)) $post = str_replace("{".$this->hash."_".$mode."_".$varnr."}", $this->codeformat($code, $mode), $post);
} |
|
ersetze gegen:
php: |
1:
2:
3:
|
foreach($this->tempsave as $mode => $val) {
foreach($val as $varnr => $code) $post = str_replace("{".$this->hash."_".$mode."_".$varnr."}", $this->codeformat($code, $mode), $post);
} |
|
suche:
php: |
1:
|
$code = $this->stripSlashes($code); |
|
ersetze gegen:
php: |
1:
|
//$code = $this->stripSlashes($code); |
|
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
|
if ($phptags == 1) {
if (version_compare($phpversion, "4.3.0") == -1 || version_compare($phpversion, "5.0.5") >= 0) $buffer = preg_replace("/([^\\2]*)(<\?php )(.*)( .*\?>)([^\\4]*)/si", "\\1\\3\\5", $buffer);
else if (version_compare($phpversion, "5.0.0RC1") == -1) $buffer = preg_replace("/([^\\2]*)(<\?php )(.*)( .*\?>)([^\\4]*)/si", "\\1\\3\\5", $buffer);
else {
$buffer = preg_replace("/([^\\2]*)(<\?php )(.*)(\?>)([^\\4]*)/si", "\\1\\3\\5", $buffer);
}
} |
|
ersetze gegen:
php: |
1:
|
if ($phptags == 1) $buffer = preg_replace("/([^\\2]*)(<\?php )(.*)( .*\?>)([^\\4]*)/si", "\\1\\3\\5", $buffer); |
|
suche:
php: |
1:
|
if ($phptags == 1 && version_compare($phpversion, "4.3.0") != -1) |
|
ersetze gegen:
php: |
1:
|
if ($phptags == 1) |
|
suche:
php: |
1:
|
$code = $this->stripSlashes($code); |
|
ersetze gegen:
php: |
1:
|
//$code = $this->stripSlashes($code); |
|
suche:
php: |
1:
|
htmlconverter($this->stripSlashes($title)) |
|
ersetze gegen:
php: |
1:
|
htmlconverter($title) |
|
suche:
php: |
1:
|
$list = $this->stripSlashes($list); |
|
ersetze gegen:
php: |
1:
|
//$list = $this->stripSlashes($list); |
|
suche in /acp/lib/class_parsecode.php nach:
php: |
1:
|
class parsecode extends parse { |
|
füge darunter ein:
php: |
1:
2:
3:
|
function __construct($usecode = 1) {
$this->parsecode($usecode);
} |
|
suche:
php: |
1:
|
function doparse($post) { |
|
ersetze gegen:
php: |
1:
|
function doparse($post, $allowsmilies=false, $allowhtml=false, $allowbbcode=false, $allowimages=false) { |
|
suche:
php: |
1:
|
$post = preg_replace("/(\[(php|code)\])(.*)(\[\/\\2\])/seiU", "\$this->cachecode('\\3','\\2')", $post); |
|
ersetze gegen:
php: |
1:
|
$post = preg_replace_callback("/(\[(php|code)\])(.*)(\[\/\\2\])/siU", function($matches) {return $this->cachecode($matches[3], $matches[2]);}, $post); |
|
suche:
php: |
1:
2:
3:
|
while (list($mode, $val) = each($this->tempsave)) {
while (list($varnr, $code) = each($val)) $post = str_replace("{".$this->hash."_".$mode."_".$varnr."}", "[".$mode."]".str_replace("\\\"", "\"", $code)."[/".$mode."]", $post);
} |
|
ersetze gegen:
php: |
1:
2:
3:
|
foreach($this->tempsave as $mode => $val) {
foreach($val as $varnr => $code) $post = str_replace("{".$this->hash."_".$mode."_".$varnr."}", "[".$mode."]".$code."[/".$mode."]", $post);
} |
|
suche in /acp/lib/class_query.php nach:
php: |
1:
2:
3:
|
function query($query) {
$this->query = $query;
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct($query) {
$this->query($query);
} |
|
suche in /acp/lib/class_smtp.php nach:
php: |
1:
|
function smtp_socket() { |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct() {
$this->smtp_socket();
} |
|
suche in /acp/lib/class_templateparser.php nach:
php: |
1:
|
$code = preg_replace('!<if\((.*)\)>!sieU', '"\".((".$this->stripSlashes(\'\\1\').") "', $code); |
|
ersetze gegen:
php: |
1:
|
$code = preg_replace_callback('!<if\((.*)\)>!siU', function($matches) {return '".(('.$this->stripSlashes($matches[1]).') ';}, $code); |
|
suche:
php: |
1:
|
$code = preg_replace('!<expression>(.*)</expression>!sieU', '"\".".$this->stripSlashes(\'\\1\').".\""', $code); |
|
ersetze gegen:
php: |
1:
|
$code = preg_replace_callback('!<expression>(.*)</expression>!siU', function($matches) {return '".'.$this->stripSlashes($matches[1]).'."';}, $code); |
|
suche in /acp/lib/class_tpl_file.php nach:
füge darunter ein:
php: |
1:
2:
3:
|
function __construct($templatepackid = 0, $path = ".") {
$this->tpl($templatepackid, $path);
} |
|
suche in /acp/lib/class_useronline.php nach:
php: |
1:
2:
3:
4:
|
function useronline($can_view_ghosts, $buddylist = '') {
$this->can_view_ghosts = $can_view_ghosts;
$this->buddies = explode(' ', $buddylist);
} |
|
füge darüber ein:
php: |
1:
2:
3:
|
function __construct($can_view_ghosts, $buddylist = '') {
$this->useronline($can_view_ghosts, $buddylist);
} |
|
suche in /acp/lib/class_variableimport.php nach:
php: |
1:
2:
3:
4:
5:
6:
|
/**
* create variableimport object and reads variablefile
*
* @param filename string
* @access public
*/ |
|
füge darunter ein:
php: |
1:
2:
3:
|
function __construct($filename) {
$this->variableimport($filename);
} |
|
suche:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
|
// insert optiongroups & options
if (count($this->data['wbboptiongroup'])) $this->_insert_optiongroup();
if (count($this->data['wbboption'])) $this->_insert_option();
// insert acpmenuitemgroups & acpmenuitems
if (count($this->data['wbbacpmenuitemgroup'])) $this->_insert_menuitemgroup();
if (count($this->data['wbbacpmenuitem'])) $this->_insert_menuitem();
// insert groupvariablegroups & groupvariables
if (count($this->data['wbbgroupvariablegroup'])) { |
|
ersetze gegen:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
|
// insert optiongroups & options
if (isset($this->data['wbboptiongroup']) && count($this->data['wbboptiongroup'])) $this->_insert_optiongroup();
if (isset($this->data['wbboption']) && count($this->data['wbboption'])) $this->_insert_option();
// insert acpmenuitemgroups & acpmenuitems
if (isset($this->data['wbbacpmenuitemgroup']) && count($this->data['wbbacpmenuitemgroup'])) $this->_insert_menuitemgroup();
if (isset($this->data['wbbacpmenuitem']) && count($this->data['wbbacpmenuitem'])) $this->_insert_menuitem();
// insert groupvariablegroups & groupvariables
if (isset($this->data['wbbgroupvariablegroup']) && count($this->data['wbbgroupvariablegroup'])) { |
|
suche:
php: |
1:
|
if (count($this->data['wbbgroupvariable'])) |
|
ersetze gegen:
php: |
1:
|
if (isset($this->data['wbbgroupvariable']) && count($this->data['wbbgroupvariable'])) |
|
suche in /acp/lib/class_zip.php nach:
php: |
1:
2:
3:
4:
5:
|
$date = date("Y-m-d H:i:s", $date);
$regexp = "([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})";
$date = ereg_replace($regexp, "\\1-\\2-\\3-\\4-\\5-\\6", $date);
$date_array = split("-", $date); |
|
ersetze gegen:
php: |
1:
2:
3:
|
$date = date("Y-m-d-H-i-s", $date);
$date_array = explode("-", $date); |
|
suche(3x) in /acp/lib/functions.php nach:
php: |
1:
|
while (list($key, $val) = each($array)) { |
|
ersetze gegen:
php: |
1:
|
foreach($array as $key => $val) { |
|
suche:
php: |
1:
|
if (!isset($mail_container)) $mail_container = &new smtp_socket; |
|
ersetze gegen:
php: |
1:
|
if (!isset($mail_container)) $mail_container = new smtp_socket; |
|
suche(2x):
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
php: |
1:
|
while (list($threadid, $lastposttime) = each($visitcache[$tempids[$j]])) { |
|
ersetze gegen:
php: |
1:
|
foreach($visitcache[$tempids[$j]] as $threadid => $lastposttime) { |
|
suche:
php: |
1:
|
while (list($key, $row) = each($userinboard[$boards['boardid']])) { |
|
ersetze gegen:
php: |
1:
|
foreach($userinboard[$boards['boardid']] as $key => $row) { |
|
suche:
php: |
1:
|
while (list($mkey, $moderator) = each($modcache[$boards['boardid']])) { |
|
ersetze gegen:
php: |
1:
|
foreach($modcache[$boards['boardid']] as $mkey => $moderator) { |
|
suche:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
suche:
php: |
1:
|
$parsecode = &new parsecode; |
|
ersetze gegen:
php: |
1:
|
$parsecode = new parsecode; |
|
suche:
php: |
1:
2:
|
preg_replace("%\[url\]".$threadid_pattern."\[/url\]%ieU", "\$catched_threadids[]=\\3;", $message);
preg_replace("%\[url\]".$postid_pattern."\[/url\]%ieU", "\$catched_postids[]=\\3;", $message); |
|
ersetze gegen:
php: |
1:
2:
|
preg_replace_callback("%\[url\]".$threadid_pattern."\[/url\]%iU", function($matches) use (&$catched_threadids) {$catched_threadids[]=$matches[3];}, $message);
preg_replace_callback("%\[url\]".$postid_pattern."\[/url\]%iU", function($matches) use (&$catched_postids) {$catched_postids[]=$matches[3];}, $message); |
|
suche:
php: |
1:
2:
|
$message = preg_replace("%\[url\]".$threadid_pattern."\[/url\]%ieU", "makeLocalLink('\\1',\\3)", $message);
$message = preg_replace("%\[url\]".$postid_pattern."\[/url\]%ieU", "makeLocalLink('\\1',\\3,1)", $message); |
|
ersetze gegen:
php: |
1:
2:
|
$message = preg_replace_callback("%\[url\]".$threadid_pattern."\[/url\]%iU", function($matches) {return makeLocalLink($matches[1],$matches[3]);},$message);
$message = preg_replace_callback("%\[url\]".$postid_pattern."\[/url\]%iU", function($matches) {return makeLocalLink($matches[1],$matches[3],1);}, $message); |
|
suche:
php: |
1:
|
while (list($key, $val) = each($temparray)) |
|
ersetze gegen:
php: |
1:
|
foreach($temparray as $key => $val) |
|
suche(2x):
php: |
1:
|
while (list($key, $val) = each($temp)) |
|
ersetze gegen:
php: |
1:
|
foreach($temp as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($wordarray)) { |
|
ersetze gegen:
php: |
1:
|
foreach($wordarray as $key => $val) { |
|
suche:
php: |
1:
|
$post = preg_replace('/&#(3[2-9]|[4-9][0-9]|\d{3});/e', "chr(intval('\\1'))", $post); |
|
ersetze gegen:
php: |
1:
|
$post = preg_replace_callback('/&#(3[2-9]|[4-9][0-9]|\d{3});/', function($matches) {return chr(intval($matches[1]));}, $post); |
|
suche:
php: |
1:
2:
3:
|
while (list($key, $val) = each($variables)) {
$wbbuserdata[$key] = $val;
} |
|
ersetze gegen:
php: |
1:
|
foreach($variables as $key => $val) $wbbuserdata[$key] = $val; |
|
suche:
php: |
1:
|
inheritpermissions(0, $useraccesscache, 'useraccess'); |
|
ersetze gegen:
php: |
1:
|
inheritpermissions($useraccesscache, 0, 'useraccess'); |
|
suche:
php: |
1:
|
while (list($key, $val) = each($row)) |
|
ersetze gegen:
php: |
1:
|
foreach($row as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($a_temp)) { |
|
ersetze gegen:
php: |
1:
|
foreach($a_temp as $key => $val) { |
|
suche:
php: |
1:
2:
3:
|
while (list($key2, $val2) = each($a_extensions)) {
if ($val != $val2 && preg_match("/".str_replace('*', '[a-z0-9]*', $val).'/', $val2)) unset($a_extensions[$key2]);
} |
|
ersetze gegen:
php: |
1:
|
foreach($a_extensions as $key2 => $val2) if ($val != $val2 && preg_match("/".str_replace('*', '[a-z0-9]*', $val).'/', $val2)) unset($a_extensions[$key2]); |
|
suche:
php: |
1:
|
while (list($key, $val) = each($useraccess)) |
|
ersetze gegen:
php: |
1:
|
foreach($useraccess as $key => $val) |
|
suche:
php: |
1:
|
while (list($key, $val) = each($days4AI)) { |
|
ersetze gegen:
php: |
1:
|
foreach($days4AI as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($posts4AI)) { |
|
ersetze gegen:
php: |
1:
|
foreach($posts4AI as $key => $val) { |
|
suche:
php: |
1:
|
while (list($key, $val) = each($variables)) $data[$key] = $val; |
|
ersetze gegen:
php: |
1:
|
foreach($variables as $key => $val) $data[$key] = $val; |
|
suche:
ersetze gegen:
suche:
php: |
1:
|
inheritpermissions(0, $permissioncache); |
|
ersetze gegen:
php: |
1:
|
inheritpermissions($permissioncache, 0); |
|
suche:
php: |
1:
|
while (list($key, $val) = each($row)) { |
|
ersetze gegen:
php: |
1:
|
foreach($row as $key => $val) { |
|
suche:
php: |
1:
|
function inheritpermissions($parentid = 0, &$permissioncache, $type = 'forumpermissions') { |
|
ersetze gegen:
php: |
1:
|
function inheritpermissions(&$permissioncache, $parentid = 0, $type = 'forumpermissions') { |
|
suche:
php: |
1:
|
inheritpermissions($boards['boardid'], $permissioncache, $type); |
|
ersetze gegen:
php: |
1:
|
inheritpermissions($permissioncache, $boards['boardid'], $type); |
|
suche(2x):
php: |
1:
|
if (USE_MBSTRING === true) { |
|
ersetze gegen:
php: |
1:
|
if (defined('USE_MBSTRING') && USE_MBSTRING === true) { |
|
suche:
php: |
1:
|
split($pattern, $string, $limit); |
|
ersetze gegen:
php: |
1:
|
preg_split($pattern, $string, $limit); |
|
suche:
php: |
1:
|
split($pattern, $string); |
|
ersetze gegen:
php: |
1:
|
preg_split($pattern, $string); |
|
suche(7x):
php: |
1:
|
if (USE_MBSTRING === true) { |
|
ersetze gegen:
php: |
1:
|
if (defined('USE_MBSTRING') && USE_MBSTRING === true) { |
|
suche(2x):
php: |
1:
|
if (USE_MBSTRING == true) { |
|
ersetze gegen:
php: |
1:
|
if (defined('USE_MBSTRING') && USE_MBSTRING == true) { |
|
suche in /acp/lib/inserts.sql nach:
ersetze gegen:
suche(59x) in /acp/lib/structure.sql nach:
ersetze gegen:
suche in /archive/global.php nach:
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
|
if (version_compare($phpversion, '4.1.0') == -1) {
$_REQUEST = array_merge($HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS);
$_COOKIE =& $HTTP_COOKIE_VARS;
$_SERVER =& $HTTP_SERVER_VARS;
$_FILES =& $HTTP_POST_FILES;
$_GET =& $HTTP_GET_VARS;
$_POST =& $HTTP_POST_VARS;
}
// remove slashes in get post cookie data...
if (get_magic_quotes_gpc()) {
if (count($_REQUEST)) $_REQUEST = stripslashes_array($_REQUEST);
if (count($_POST)) $_POST = stripslashes_array($_POST);
if (count($_GET)) $_GET = stripslashes_array($_GET);
if (count($_COOKIE)) $_COOKIE = stripslashes_array($_COOKIE);
if (count($_SERVER)) $_SERVER = stripslashes_array($_SERVER);
} |
|
------------
Entferne es!
------------
suche:
php: |
1:
|
@set_magic_quotes_runtime(0); |
|
------------
Entferne es!
------------
suche in /archive/index.php nach:
php: |
1:
2:
|
while (list($key1, $val1) = each($boardcache[$boardid])) {
while (list($key2, $boards) = each($val1)) { |
|
ersetze gegen:
php: |
1:
2:
|
foreach($boardcache[$boardid] as $key1 => $val1) {
foreach($val1 as $key2 => $boards) { |
|
Dieser SQL-Befehl muss noch für ein bereits installiertes "WoltLab Burning Board 2.3.6" ausgeführt werden:
php: |
1:
|
UPDATE bbX_options SET optioncode=REPLACE(optioncode,'[value]','[\'value\']'); |
|
Nun können noch Warnungen nach folgenden Schema erscheinen:
php: |
1:
|
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in sample.php(x) : eval()'d code on line z |
|
Der Fehler tritt sehr wahrscheinlich im Zusammenhang mit einer "if"-Bedingung oder geschweiften Klammern in einem Template auf.
Für folgenden Lösungsansatz muss die Meldung genau obigen Schema entsprechen.
Wichtig sind nun folgende Teile der Meldung:
- name (Das ist der Text, der im Template gesucht werden wird)
- sample.php (Das ist die PHP-Datei in der das Template aufgerufen wird)
- x (Das ist die Zeile in der PHP-Datei wo das Template aufgerufen werden sollte)
- z (Das ist die Zeile im Template, wo sich der Suchtext befinden sollte)
Angenommen in der "sample.php" wird in Zeile x das Template mit Namen "sample" aufgerufen, dann wird in Zeile z dieses Templates nach "name" gesucht.
- Gefundene Zeile mit geschweiften Klammern
php: |
1:
|
Template-davor{$a[name]}Template-danach |
|
- Gefundene Zeile mit "if"-Bedingung
php: |
1:
|
Template-davor<if($a[name])><then>...Auswahl...</then></if>Template-danach |
|
Je nachdem welcher Fall auftritt, wird eine der beiden Lösungsvarianten gewählt:
- Lösung für Fundestelle mit geschweiften Klammern
php: |
1:
|
Template-davor{$a['name']}Template-danach |
|
- Lösung für Fundestelle mit "if"-Bedingung
php: |
1:
|
Template-davor<if($a['name'])><then>...Auswahl...</then></if>Template-danach |
|
Damit sollte euer "WoltLab Burning Board 2.3.6pl2" unter PHP 8.x (8.0) lauffähig sein.
__________________
Nur bei v-gn.de
WoltLab Burning Board Lite 1.0.2pl3 ( HTML5 ) - Version
mywbb.info(†19.8.2011)
your-wbb.de(†20.2.2015)
Dieser Beitrag wurde 9 mal editiert, zum letzten Mal von Viktor: 16.06.2020 20:15.
|
|
16.07.2017 20:45 |
|
|
|
Hallo zusammen,
mittlerweile ist der Supportthread von Schrimm so groß geworden, das nützliche Informationen sowie korrigierte PHP-Dateien von diversen Hacks, Addons und Erweiterungen zum Thema WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x nicht mehr auf Anhieb gefunden werden.
Verweis auf den Ursprung:
-> ToDo-> WoltLab Burning Board 2.3.6pl2: Update PHP-Version 8.x (Schrimm)
-> Support-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 7x (Support-Thread)
-> Support-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8x (Support-Thread)
Für die Übersichtlichkeit werden alle geänderte Scripte und Codeteile hier gesammelt und aufgelistet.
Wer noch ein altes WBB mit der Version 2.3.3 hat muss zuvor die Updates bbis WBB 2.3.6pl2 durchführen!
-> Update WBB2.3.3-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x (Viktor)
Experimentelle angepasste WBB2 Templates (Achtung: mehrere zusammenhängende Beiträge!)
-> Templates WBB2-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x (Cleantex)
Angepasste WBB2 ACP-Templates
-> ACP-Templates WBB2-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x (Stine)
Kein ACP Zugriff bei SSL
-> ACP Zugriff bei SSL-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x (Slugger/Stine)
IN PLANUNG!
HACKS, ERWEITERUNGEN und CODETEILE von anderen, die WIEDERKEHREND sind!
GLIEDERUNG:
- Name des Hacks/Addons (Codeteile, PHP-Dateien, bei mehreren PHP-Dateien als ZIP-Datei etc.)
der erste Beitrag von Schrimm wurde geschlossen und alles was zu diesem Thema erstellt wurde, findet man nun in einem neuen Thread.
Bei Fragen und Problemen weiterhin diesen Supportthread nutzen!
->Support-> WoltLab Burning Board 2.3.pl2 - Update PHP-Version 8.x
Vielen Dank
__________________ Cu,
Slugger
|
Zitat: Egal wie du es machst, du machst es falsch! Also mache es einfach. |
|
|
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von Viktor: 15.02.2021 22:36.
|
|
08.04.2020 11:24 |
|
|
|
|
 |
|