Skip to content

Commit f2807ef

Browse files
committed
v2.40.0
1 parent 1da758d commit f2807ef

File tree

138 files changed

+3904
-1708
lines changed

Some content is hidden

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

138 files changed

+3904
-1708
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ MODULE | D3FORUM
1414
------------ | -------------
1515
Description | Duplicatable module for discussion forum management
1616
Render Engine| Smarty v2 and XCube Layout
17-
Version | 2.33.0
17+
Version | 2.40.0
1818
Author | Nobuhiro Yasutomi @nbuy XCL PHP8
1919
Author | Nuno Luciano @gigamaster XCL PHP7
2020
Author | @domifara, @naao Naoki Okino, @nao-pon Naoki Sawada
2121
Author | Gijoe (peak.ne.jp) and Jidaikbo
22-
Copyright | 2005-2023 Authors
22+
Copyright | 2005-2024 Authors
2323
License | XCL module distributed under a GPL 2.0 License.
2424

2525

2626
##### :computer: The Minimum Requirements
2727

2828

2929

30-
Apache, Nginx, etc. PHP 7.2.x
31-
MySQL 5.6, MariaDB InnoDB utf8 / utf8mb4
32-
XCL version 2.3.+
30+
Apache, Nginx, etc. PHP 8.x.x
31+
MySQL ^5.7, MariaDB InnoDB utf8 / utf8mb4
32+
XCL version 2.4.0
3333

3434

3535

html/modules/d3forum/language/english/help/help.html

Lines changed: 335 additions & 71 deletions
Large diffs are not rendered by default.

html/modules/d3forum/language/fr_utf8/help/help.html

Lines changed: 335 additions & 71 deletions
Large diffs are not rendered by default.

html/modules/d3forum/language/ja_utf8/help/help.html

Lines changed: 335 additions & 71 deletions
Large diffs are not rendered by default.

html/modules/d3forum/language/pt_utf8/help/help.html

Lines changed: 335 additions & 71 deletions
Large diffs are not rendered by default.

html/modules/d3forum/language/ru_utf8/help/help.html

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script>history.go(-1);</script>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script>history.go(-1);</script>

xoops_trust_path/modules/d3forum/admin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* D3Forum module for XCL
44
*
55
* @package D3Forum
6-
* @version XCL 2.3.3
6+
* @version XCL 2.4.0
77
* @author Nobuhiro YASUTOMI, PHP8
88
* @author Other authors gigamaster, 2020 XCL/PHP7
99
* @author Gijoe (Peak)
10-
* @copyright (c) 2005-2023 Authors
10+
* @copyright (c) 2005-2024 Authors
1111
* @license GPL v2.0
1212
*/
1313

xoops_trust_path/modules/d3forum/admin/advanced_admin.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
1111
*/
1212

@@ -55,7 +55,7 @@
5555

5656
$topic_counter = 0;
5757

58-
while ( list( $topic_id ) = $db->fetchRow( $trs ) ) {
58+
while ( [$topic_id] = $db->fetchRow( $trs ) ) {
5959

6060
$topic_counter ++;
6161

@@ -64,10 +64,10 @@
6464
// sync posts from post_votes
6565
$prs = $db->query( 'SELECT post_id FROM ' . $db->prefix( $mydirname . '_posts' ) . " WHERE topic_id=$topic_id" );
6666

67-
while ( list( $post_id ) = $db->fetchRow( $prs ) ) {
67+
while ( [$post_id] = $db->fetchRow( $prs ) ) {
6868
d3forum_sync_post_votes( $mydirname, $post_id, false );
6969
}
70-
d3forum_sync_topic_votes( $mydirname, $topic_id, false );
70+
d3forum_sync_topic_votes( $mydirname, $topic_id );
7171

7272
d3forum_sync_topic( $mydirname, $topic_id, false );
7373
}
@@ -88,7 +88,7 @@
8888
// sync all forums
8989
$result = $db->query( 'SELECT forum_id FROM ' . $db->prefix( $mydirname . '_forums' ) );
9090

91-
while ( list( $forum_id ) = $db->fetchRow( $result ) ) {
91+
while ( [$forum_id] = $db->fetchRow( $result ) ) {
9292
d3forum_sync_forum( $mydirname, $forum_id, false );
9393
}
9494

@@ -107,7 +107,7 @@
107107
// sync all categories
108108
$result = $db->query( 'SELECT cat_id FROM ' . $db->prefix( $mydirname . '_categories' ) . ' ORDER BY cat_order_in_tree DESC' );
109109

110-
while ( list( $cat_id ) = $db->fetchRow( $result ) ) {
110+
while ( [$cat_id] = $db->fetchRow( $result ) ) {
111111
d3forum_sync_category( $mydirname, $cat_id );
112112
}
113113

xoops_trust_path/modules/d3forum/admin/category_access.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license GPL v2.0
1111
*/
1212

@@ -35,7 +35,7 @@
3535

3636
if ( empty( $cat_id ) ) {
3737

38-
redirect_header( XOOPS_URL . "/modules/$mydirname/index.php?page=makecategory", 5, _MD_A_D3FORUM_ERR_CREATECATEGORYFIRST );
38+
redirect_header( XOOPS_URL . "/modules/$mydirname/index.php?page=makecategory", 2, _MD_A_D3FORUM_ERR_CREATECATEGORYFIRST );
3939
exit;
4040
}
4141

@@ -51,14 +51,14 @@
5151
if ( ! empty( $_POST['group_update'] ) && empty( $invaild_cat_id ) ) {
5252

5353
if ( ! $xoopsGTicket->check( true, 'd3forum_admin' ) ) {
54-
redirect_header( XOOPS_URL . '/', 3, $xoopsGTicket->getErrors() );
54+
redirect_header( XOOPS_URL . '/', 2, $xoopsGTicket->getErrors() );
5555
}
5656

5757
$db->query( 'DELETE FROM ' . $db->prefix( $mydirname . '_category_access' ) . " WHERE cat_id=$cat_id AND groupid>0" );
5858

5959
$result = $db->query( 'SELECT groupid FROM ' . $db->prefix( 'groups' ) );
6060

61-
while ( list( $gid ) = $db->fetchRow( $result ) ) {
61+
while ( [$gid] = $db->fetchRow( $result ) ) {
6262
if ( ! empty( $_POST['can_reads'][ $gid ] ) ) {
6363
$can_post = empty( $_POST['can_posts'][ $gid ] ) ? 0 : 1;
6464
$can_edit = empty( $_POST['can_edits'][ $gid ] ) ? 0 : 1;
@@ -70,7 +70,7 @@
7070
$db->query( 'INSERT INTO ' . $db->prefix( $mydirname . '_category_access' ) . " SET cat_id=$cat_id, groupid=$gid, can_post=$can_post, can_edit=$can_edit, can_delete=$can_delete, post_auto_approved=$post_auto_approved, is_moderator=$is_moderator, can_makeforum=$can_makeforum" );
7171
}
7272
}
73-
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access&amp;cat_id=$cat_id", 3, _MD_D3FORUM_MSG_UPDATED );
73+
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access&amp;cat_id=$cat_id", 2, _MD_D3FORUM_MSG_UPDATED );
7474
exit;
7575
}
7676

@@ -129,7 +129,7 @@
129129
}
130130
}
131131

132-
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access&amp;cat_id=$cat_id", 3, _MD_D3FORUM_MSG_UPDATED );
132+
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access&amp;cat_id=$cat_id", 2, _MD_D3FORUM_MSG_UPDATED );
133133
exit;
134134
}
135135

@@ -143,7 +143,7 @@
143143

144144
$cat_options = [];
145145

146-
while ( list( $id, $title, $depth ) = $db->fetchRow( $crs ) ) {
146+
while ( [$id, $title, $depth] = $db->fetchRow( $crs ) ) {
147147
$cat_options[ $id ] = str_repeat( '--', $depth ) . htmlspecialchars( $title, ENT_QUOTES );
148148
}
149149

@@ -206,7 +206,7 @@
206206

207207
$user_trs = '';
208208

209-
while ( list( $uid, $uname, $can_post, $can_edit, $can_delete, $post_auto_approved, $is_moderator, $can_makeforum ) = $db->fetchRow( $fars ) ) {
209+
while ( [$uid, $uname, $can_post, $can_edit, $can_delete, $post_auto_approved, $is_moderator, $can_makeforum] = $db->fetchRow( $fars ) ) {
210210

211211
$uid = (int) $uid;
212212

xoops_trust_path/modules/d3forum/admin/forum_access.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license GPL v2.0
1111
*/
1212

@@ -35,7 +35,7 @@
3535

3636
if ( empty( $forum_id ) ) {
3737

38-
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access", 5, _MD_A_D3FORUM_ERR_CREATEFORUMFIRST );
38+
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=category_access", 2, _MD_A_D3FORUM_ERR_CREATEFORUMFIRST );
3939
exit;
4040
}
4141

@@ -52,14 +52,14 @@
5252
if ( ! empty( $_POST['group_update'] ) && empty( $invaild_forum_id ) ) {
5353

5454
if ( ! $xoopsGTicket->check( true, 'd3forum_admin' ) ) {
55-
redirect_header( XOOPS_URL . '/', 3, $xoopsGTicket->getErrors() );
55+
redirect_header( XOOPS_URL . '/', 2, $xoopsGTicket->getErrors() );
5656
}
5757

5858
$db->query( 'DELETE FROM ' . $db->prefix( $mydirname . '_forum_access' ) . " WHERE forum_id=$forum_id AND groupid>0" );
5959

6060
$result = $db->query( 'SELECT groupid FROM ' . $db->prefix( 'groups' ) );
6161

62-
while ( list( $gid ) = $db->fetchRow( $result ) ) {
62+
while ( [$gid] = $db->fetchRow( $result ) ) {
6363

6464
if ( ! empty( $_POST['can_reads'][ $gid ] ) ) {
6565
$can_post = empty( $_POST['can_posts'][ $gid ] ) ? 0 : 1;
@@ -71,7 +71,7 @@
7171
$db->query( 'INSERT INTO ' . $db->prefix( $mydirname . '_forum_access' ) . " SET forum_id=$forum_id, groupid=$gid, can_post=$can_post, can_edit=$can_edit, can_delete=$can_delete, post_auto_approved=$post_auto_approved, is_moderator=$is_moderator" );
7272
}
7373
}
74-
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=forum_access&amp;forum_id=$forum_id", 3, _MD_D3FORUM_MSG_UPDATED );
74+
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=forum_access&amp;forum_id=$forum_id", 2, _MD_D3FORUM_MSG_UPDATED );
7575
exit;
7676
}
7777

@@ -126,7 +126,7 @@
126126
}
127127
}
128128

129-
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=forum_access&amp;forum_id=$forum_id", 3, _MD_D3FORUM_MSG_UPDATED );
129+
redirect_header( XOOPS_URL . "/modules/$mydirname/admin/index.php?page=forum_access&amp;forum_id=$forum_id", 2, _MD_D3FORUM_MSG_UPDATED );
130130
exit;
131131
}
132132

@@ -182,7 +182,7 @@
182182

183183
$user_trs = '';
184184

185-
while ( list( $uid, $uname, $can_post, $can_edit, $can_delete, $post_auto_approved, $is_moderator ) = $db->fetchRow( $fars ) ) {
185+
while ( [$uid, $uname, $can_post, $can_edit, $can_delete, $post_auto_approved, $is_moderator] = $db->fetchRow( $fars ) ) {
186186

187187
$uid = (int) $uid;
188188

xoops_trust_path/modules/d3forum/admin/mymenu.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* mymenu for D3 modules always require altsys
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Author
9+
* @copyright (c) 2005-2024 Author
1010
* @license GPL v2.0
1111
*/
1212

@@ -46,7 +46,7 @@
4646

4747
// Preferences
4848
$config_handler = xoops_gethandler( 'config' );
49-
if ( count( $config_handler->getConfigs( new Criteria( 'conf_modid', $xoopsModule->mid() ) ) ) > 0 ) {
49+
if ( (is_countable($config_handler->getConfigs( new Criteria( 'conf_modid', $xoopsModule->mid() ) )) ? count( $config_handler->getConfigs( new Criteria( 'conf_modid', $xoopsModule->mid() ) ) ) : 0) > 0 ) {
5050
$adminmenu[] = [
5151
'title' => _PREFERENCES,
5252
'link' => XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $xoopsModule->mid()
@@ -72,7 +72,7 @@
7272
}
7373
if ( empty( $adminmenu_hilighted ) ) {
7474
foreach ( array_keys( $adminmenu ) as $i ) {
75-
if ( stripos( $mymenu_uri, $adminmenu[ $i ]['link'] ) !== false ) {
75+
if ( stripos( $mymenu_uri, (string) $adminmenu[ $i ]['link'] ) !== false ) {
7676
$adminmenu[ $i ]['selected'] = true;
7777
$GLOBALS['altsysAdminPageTitle'] = $adminmenu[ $i ]['title'];
7878
break;
@@ -82,7 +82,7 @@
8282

8383
// link conversion from relative to absolute
8484
foreach ( array_keys( $adminmenu ) as $i ) {
85-
if ( stripos( $adminmenu[ $i ]['link'], XOOPS_URL ) === false ) {
85+
if ( stripos( $adminmenu[ $i ]['link'], (string) XOOPS_URL ) === false ) {
8686
$adminmenu[ $i ]['link'] = XOOPS_URL . "/modules/$mydirname/" . $adminmenu[ $i ]['link'];
8787
}
8888
}

xoops_trust_path/modules/d3forum/admin/post_histories.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license GPL v2.0
1111
*/
1212

@@ -36,7 +36,7 @@
3636

3737
$histories4assign = [];
3838

39-
while ( list( $history_id, $post_id, $history_time, $data_serialized, $subject ) = $db->fetchRow( $result ) ) {
39+
while ( [$history_id, $post_id, $history_time, $data_serialized, $subject] = $db->fetchRow( $result ) ) {
4040

4141
$histories4assign[] = [
4242
'id' => $history_id,

xoops_trust_path/modules/d3forum/admin/post_history_detail.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license https://github.com/xoopscube/xcl/blob/master/GPL_V2.txt
1111
*/
1212

xoops_trust_path/modules/d3forum/admin_menu.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
'title' => constant( $constpref . '_ADMENU_MYTPLSADMIN' ),
3131
'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin',
3232
],
33+
[
34+
'title' => _HELP,
35+
'link' => '../legacy/admin/index.php?action=Help&dirname='.$mydirname,
36+
],
3337
// [
3438
// 'title' => constant( $constpref.'_ADMENU_MYBLOCKSADMIN' ) ,
3539
// 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ,

xoops_trust_path/modules/d3forum/blocks/block_functions.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors Gigamaster, 2020 XCL PHP7
88
* @author Naoki Sawada (aka Nao-pon)
99
* @author Gijoe (Peak)
10-
* @copyright (c) 2005-2023 Authors
10+
* @copyright (c) 2005-2024 Authors
1111
* @license GPL v2.0
1212
*/
1313

1414
function b_d3forum_list_forums_show( $options ) {
15-
global $xoopsUser;
15+
$myts = null;
16+
$ret = [];
17+
global $xoopsUser;
1618

1719
$mydirname = empty( $options[0] ) ? 'd3forum' : $options[0];
1820

@@ -142,7 +144,9 @@ function b_d3forum_list_forums_edit( $options ) {
142144

143145

144146
function b_d3forum_list_topics_show( $options ) {
145-
global $xoopsUser;
147+
$myts = null;
148+
$ret = [];
149+
global $xoopsUser;
146150

147151
$mydirname = empty( $options[0] ) ? 'd3forum' : $options[0];
148152

@@ -500,7 +504,9 @@ function b_d3forum_list_topics_edit( $options ) {
500504

501505

502506
function b_d3forum_list_posts_show( $options ) {
503-
global $xoopsUser;
507+
$myts = null;
508+
$ret = [];
509+
global $xoopsUser;
504510

505511
$mydirname = empty( $options[0] ) ? 'd3forum' : $options[0];
506512

xoops_trust_path/modules/d3forum/class/D3commentAbstract.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
/**
33
* D3Forum module for XCL
44
* @package D3Forum
5-
* @version XCL 2.3.3
5+
* @version XCL 2.4.0
66
* @author Nobuhiro YASUTOMI, PHP8
77
* @author Other authors gigamaster, 2020 XCL/PHP7
88
* @author Gijoe (Peak)
9-
* @copyright (c) 2005-2023 Authors
9+
* @copyright (c) 2005-2024 Authors
1010
* @license GPL v2.0
1111
*/
1212

0 commit comments

Comments
 (0)