Skip to content

Commit 5234784

Browse files
authored
Merge pull request #3 from xoopscube/xcl-d3forum
d3forum version 2.33.0 PHP8
2 parents 634f2fc + 5d10aef commit 5234784

File tree

93 files changed

+1194
-783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1194
-783
lines changed

gpl-2.0_license.md

Lines changed: 361 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 1 deletion
Loading
Lines changed: 1 addition & 3 deletions
Loading

xoops_trust_path/modules/d3forum/admin.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* D3Forum module for XCL
44
*
55
* @package D3Forum
6-
* @version XCL 2.3.1
6+
* @version XCL 2.3.3
7+
* @author Nobuhiro YASUTOMI, PHP8
78
* @author Other authors gigamaster, 2020 XCL/PHP7
89
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2022 Author
10-
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
10+
* @copyright (c) 2005-2023 Authors
11+
* @license GPL v2.0
1112
*/
1213

1314
$mytrustdirname = basename( __DIR__ );
@@ -17,16 +18,16 @@
1718
// environment
1819
require_once XOOPS_ROOT_PATH . '/class/template.php';
1920

20-
$module_handler =& xoops_gethandler( 'module' );
21+
$module_handler = xoops_gethandler( 'module' );
2122

22-
$xoopsModule =& $module_handler->getByDirname( $mydirname );
23+
$xoopsModule = $module_handler->getByDirname( $mydirname );
2324

24-
$config_handler =& xoops_gethandler( 'config' );
25+
$config_handler = xoops_gethandler( 'config' );
2526

26-
$xoopsModuleConfig =& $config_handler->getConfigsByCat( 0, $xoopsModule->getVar( 'mid' ) );
27+
$xoopsModuleConfig = $config_handler->getConfigsByCat( 0, $xoopsModule->getVar( 'mid' ) );
2728

2829
// check permission of 'module_admin' of this module
29-
$moduleperm_handler =& xoops_gethandler( 'groupperm' );
30+
$moduleperm_handler = xoops_gethandler( 'groupperm' );
3031

3132
if ( ! is_object( @$xoopsUser ) || ! $moduleperm_handler->checkRight( 'module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups() ) ) {
3233
die( 'only admin can access this area' );

xoops_trust_path/modules/d3forum/admin/advanced_admin.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9+
* @copyright (c) 2005-2023 Authors
910
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
1011
*/
1112

@@ -18,17 +19,16 @@
1819

1920
$myts = D3forumTextSanitizer::sGetInstance();
2021

21-
//$db =& Database::getInstance();
22-
$db = &XoopsDatabaseFactory::getDatabaseConnection();
22+
$db = XoopsDatabaseFactory::getDatabaseConnection();
2323

2424

2525
$importable_modules = d3forum_import_getimportablemodules( $mydirname );
2626

27-
$module_handler =& xoops_gethandler( 'module' );
27+
$module_handler = xoops_gethandler( 'module' );
2828

2929
$modules = $module_handler->getObjects( new Criteria( 'hascomments', 1 ) );
3030

31-
$comment_handler =& xoops_gethandler( 'comment' );
31+
$comment_handler = xoops_gethandler( 'comment' );
3232

3333
$comimportable_modules = [];
3434

xoops_trust_path/modules/d3forum/admin/category_access.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9-
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
9+
* @copyright (c) 2005-2023 Authors
10+
* @license GPL v2.0
1011
*/
1112

1213
require_once dirname( __DIR__ ) . '/include/main_functions.php';
1314
require_once dirname( __DIR__ ) . '/include/common_functions.php';
1415
require_once dirname( __DIR__ ) . '/class/d3forum.textsanitizer.php';
1516
require_once dirname( __DIR__ ) . '/class/gtickets.php';
1617

17-
$myts =& D3forumTextSanitizer::sGetInstance();
18+
$myts =D3forumTextSanitizer::sGetInstance();
1819

19-
//$db =& Database::getInstance();
20-
$db = &XoopsDatabaseFactory::getDatabaseConnection();
20+
$db = XoopsDatabaseFactory::getDatabaseConnection();
2121

2222
// get right $cat_id
2323
$cat_id = (int) @$_GET['cat_id'];
@@ -103,7 +103,7 @@
103103
}
104104
}
105105

106-
$member_hander =& xoops_gethandler( 'member' );
106+
$member_hander = xoops_gethandler( 'member' );
107107

108108
if ( is_array( @$_POST['new_uids'] ) ) {
109109

@@ -120,7 +120,7 @@
120120
[ $user ] = $member_handler->getUsers( $criteria );
121121

122122
} else {
123-
$user =& $member_handler->getUser( (int) $uid );
123+
$user = $member_handler->getUser( (int) $uid );
124124
}
125125
if ( is_object( $user ) ) {
126126
$db->query( 'INSERT INTO '
@@ -149,9 +149,9 @@
149149

150150

151151
// create group form
152-
$group_handler =& xoops_gethandler( 'group' );
152+
$group_handler = xoops_gethandler( 'group' );
153153

154-
$groups =& $group_handler->getObjects();
154+
$groups = $group_handler->getObjects();
155155

156156
$group_trs = '';
157157

@@ -186,8 +186,7 @@
186186
$is_moderator_checked = $is_moderator ? "checked='checked'" : '';
187187
$can_makeforum_checked = $can_makeforum ? "checked='checked'" : '';
188188

189-
$group_trs .= '
190-
<tr>
189+
$group_trs .= '<tr class="list_center">
191190
<td>' . $group->getVar( 'name' ) . "</td>
192191
<td><input type='checkbox' name='can_reads[$gid]' id='gcol_1_{$gid}' value='1' $can_read_checked></td>
193192
<td><input type='checkbox' name='can_posts[$gid]' id='gcol_2_{$gid}' value='1' $can_post_checked></td>
@@ -221,7 +220,7 @@
221220
$can_makeforum_checked = $can_makeforum ? "checked='checked'" : '';
222221

223222
$user_trs .= "
224-
<tr>
223+
<tr class='list_center'>
225224
<td>$uid</td>
226225
<td>$uname4disp</td>
227226
<td><input type='checkbox' name='can_reads[$uid]' id='ucol_1_{$uid}' value='1' checked='checked'></td>
@@ -241,7 +240,7 @@
241240
for ( $i = 0; $i < 5; $i ++ ) {
242241

243242
$newuser_trs .= "
244-
<tr class='head'>
243+
<tr class='list_center'>
245244
<td><input type='text' size='4' name='new_uids[$i]' value=''></th>
246245
<td><input type='text' size='12' name='new_unames[$i]' value=''></th>
247246
<td><input type='checkbox' name='new_can_reads[$i]' id='ncol_1_{$i}' checked='checked' disabled='disabled'></th>

xoops_trust_path/modules/d3forum/admin/forum_access.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9-
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
9+
* @copyright (c) 2005-2023 Authors
10+
* @license GPL v2.0
1011
*/
1112

1213
require_once dirname( __DIR__ ) . '/include/main_functions.php';
1314
require_once dirname( __DIR__ ) . '/include/common_functions.php';
1415
require_once dirname( __DIR__ ) . '/class/d3forum.textsanitizer.php';
1516
require_once dirname( __DIR__ ) . '/class/gtickets.php';
1617

17-
$myts =& D3forumTextSanitizer::sGetInstance();
18+
$myts = D3forumTextSanitizer::sGetInstance();
1819

19-
//$db =& Database::getInstance();
20-
$db = &XoopsDatabaseFactory::getDatabaseConnection();
20+
$db = XoopsDatabaseFactory::getDatabaseConnection();
2121

2222
// get right $forum_id
2323
$forum_id = (int) @$_GET['forum_id'];
@@ -103,7 +103,7 @@
103103
}
104104
}
105105

106-
$member_hander =& xoops_gethandler( 'member' );
106+
$member_hander = xoops_gethandler( 'member' );
107107

108108
if ( is_array( @$_POST['new_uids'] ) ) {
109109

@@ -118,7 +118,7 @@
118118
$criteria = new Criteria( 'uname', addslashes( @$_POST['new_unames'][ $i ] ) );
119119
[ $user ] = $member_handler->getUsers( $criteria );
120120
} else {
121-
$user =& $member_handler->getUser( (int) $uid );
121+
$user = $member_handler->getUser( (int) $uid );
122122
}
123123
if ( is_object( $user ) ) {
124124
$db->query( 'INSERT INTO ' . $db->prefix( $mydirname . '_forum_access' ) . " SET forum_id=$forum_id, uid=" . $user->getVar( 'uid' ) . ", can_post=$can_post, can_edit=$can_edit, can_delete=$can_delete, post_auto_approved=$post_auto_approved, is_moderator=$is_moderator" );
@@ -136,9 +136,9 @@
136136
//
137137

138138
// create group form
139-
$group_handler =& xoops_gethandler( 'group' );
139+
$group_handler = xoops_gethandler( 'group' );
140140

141-
$groups =& $group_handler->getObjects();
141+
$groups = $group_handler->getObjects();
142142

143143
$group_trs = '';
144144

@@ -163,14 +163,14 @@
163163
$is_moderator_checked = $is_moderator ? "checked='checked'" : '';
164164

165165
$group_trs .= "
166-
<tr>
167-
<td class='even'>" . $group->getVar( 'name' ) . "</td>
168-
<td class='even'><input type='checkbox' name='can_reads[$gid]' id='gcol_1_{$gid}' value='1' $can_read_checked></td>
169-
<td class='even'><input type='checkbox' name='can_posts[$gid]' id='gcol_2_{$gid}' value='1' $can_post_checked></td>
170-
<td class='even'><input type='checkbox' name='can_edits[$gid]' id='gcol_3_{$gid}' value='1' $can_edit_checked></td>
171-
<td class='even'><input type='checkbox' name='can_deletes[$gid]' id='gcol_4_{$gid}' value='1' $can_delete_checked></td>
172-
<td class='even'><input type='checkbox' name='post_auto_approveds[$gid]' id='gcol_5_{$gid}' value='1' $post_auto_approved_checked></td>
173-
<td class='even'><input type='checkbox' name='is_moderators[$gid]' id='gcol_6_{$gid}' value='1' $is_moderator_checked></td>
166+
<tr class='list_center'>
167+
<td>" . $group->getVar( 'name' ) . "</td>
168+
<td><input type='checkbox' name='can_reads[$gid]' id='gcol_1_{$gid}' value='1' $can_read_checked></td>
169+
<td><input type='checkbox' name='can_posts[$gid]' id='gcol_2_{$gid}' value='1' $can_post_checked></td>
170+
<td><input type='checkbox' name='can_edits[$gid]' id='gcol_3_{$gid}' value='1' $can_edit_checked></td>
171+
<td><input type='checkbox' name='can_deletes[$gid]' id='gcol_4_{$gid}' value='1' $can_delete_checked></td>
172+
<td><input type='checkbox' name='post_auto_approveds[$gid]' id='gcol_5_{$gid}' value='1' $post_auto_approved_checked></td>
173+
<td><input type='checkbox' name='is_moderators[$gid]' id='gcol_6_{$gid}' value='1' $is_moderator_checked></td>
174174
</tr>\n";
175175
}
176176

@@ -195,7 +195,7 @@
195195
$is_moderator_checked = $is_moderator ? "checked='checked'" : '';
196196

197197
$user_trs .= "
198-
<tr>
198+
<tr class='list_center'>
199199
<td>$uid</td>
200200
<td>$uname4disp</td>
201201
<td><input type='checkbox' name='can_reads[$uid]' id='ucol_1_{$uid}' value='1' checked='checked'></td>
@@ -214,7 +214,7 @@
214214
for ( $i = 0; $i < 5; $i ++ ) {
215215

216216
$newuser_trs .= "
217-
<tr class='head'>
217+
<tr class='list_center'>
218218
<td><input type='text' size='4' name='new_uids[$i]' value=''></th>
219219
<td><input type='text' size='12' name='new_unames[$i]' value=''></th>
220220
<td><input type='checkbox' name='new_can_reads[$i]' id='ncol_1_{$i}' checked='checked' disabled='disabled'></th>

xoops_trust_path/modules/d3forum/admin/mymenu.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
/**
33
* mymenu for D3 modules always require altsys
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9-
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
9+
* @copyright (c) 2005-2023 Author
10+
* @license GPL v2.0
1011
*/
1112

1213
// Deny direct access
@@ -44,7 +45,7 @@
4445
}
4546

4647
// Preferences
47-
$config_handler =& xoops_gethandler( 'config' );
48+
$config_handler = xoops_gethandler( 'config' );
4849
if ( count( $config_handler->getConfigs( new Criteria( 'conf_modid', $xoopsModule->mid() ) ) ) > 0 ) {
4950
$adminmenu[] = [
5051
'title' => _PREFERENCES,

xoops_trust_path/modules/d3forum/admin/post_histories.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9-
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
9+
* @copyright (c) 2005-2023 Authors
10+
* @license GPL v2.0
1011
*/
1112

1213
require_once dirname( __DIR__ ) . '/include/main_functions.php';
1314
require_once dirname( __DIR__ ) . '/include/common_functions.php';
1415
require_once dirname( __DIR__ ) . '/class/d3forum.textsanitizer.php';
1516
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
1617

17-
$myts =& D3forumTextSanitizer::sGetInstance();
18+
$myts = D3forumTextSanitizer::sGetInstance();
1819

19-
// $db =& Database::getInstance();
20-
$db = &XoopsDatabaseFactory::getDatabaseConnection();
20+
$db = XoopsDatabaseFactory::getDatabaseConnection();
2121

2222
//
2323
// form stage

xoops_trust_path/modules/d3forum/admin/post_history_detail.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.1
5+
* @version XCL 2.3.3
6+
* @author Nobuhiro YASUTOMI, PHP8
67
* @author Other authors gigamaster, 2020 XCL/PHP7
78
* @author Gijoe (Peak)
8-
* @copyright (c) 2005-2022 Author
9+
* @copyright (c) 2005-2023 Authors
910
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
1011
*/
1112

1213

13-
$db = &XoopsDatabaseFactory::getDatabaseConnection();
14+
$db = XoopsDatabaseFactory::getDatabaseConnection();
1415
//
1516
// form stage
1617
//

0 commit comments

Comments
 (0)