Skip to content

Commit 331a7b7

Browse files
committed
update for PHP7 compatibility : no more end php tag, and constructor functions renamed
1 parent 70d3477 commit 331a7b7

64 files changed

Lines changed: 91 additions & 402 deletions

Some content is hidden

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

README.md

Lines changed: 4 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -27,249 +27,11 @@
2727
// Project: Article Project //
2828
// ------------------------------------------------------------------------ //</pre>
2929

30-
iForum is now being developed by Sina Asghari (stranger), this module has earlier been developed by
30+
iForum is now being maintained by David Janssens (fiammybe), after earlier developments by Sina Asghari (stranger)
3131
Marko Schmuck (predator) and D.J. (phppp) under the name of newbb (CBB).
3232
==========================================================
3333

34-
CBB
34+
iForum v2
35+
- update of the class constructors to be compatible with PHP 7.x
36+
- remove the PHP end-tags
3537

36-
XOOPS Community Bulletin Board
37-
38-
Changelog 3.08
39-
Jan 3rd, 2007
40-
=============
41-
1 Bugfix for user stats (jorff, agl)
42-
2 Bugfix for reading new posts
43-
44-
45-
Changelog 3.07
46-
October 29th, 2006
47-
=============
48-
1 Bugfix for permission template (js related)
49-
2 Added support for FCKeditor upload
50-
3 Added support for extended xcode which allows flash/wmplayer/...
51-
4 Fix for XSS reported by bubuche93
52-
53-
54-
Changelog 3.06
55-
October 8th, 2006
56-
=============
57-
Bugfix version
58-
59-
60-
Changelog 3.05
61-
July 22nd, 2006
62-
=============
63-
1 Bugfix for notifying new replies for a specific topic
64-
2 Bugfix for permission check when moving a post
65-
3 Removed inherition of view mode and post order from system-wide preference
66-
4 Added editor parameter control based on plugin'ed configs
67-
5 Bugfix for xhtml compliance in forum selection box (reported by skalpa)
68-
6 Bugfix for update scripts for newbb 2.2
69-
7 Bugfix for category name display in permission admin
70-
8 Bugfix for view_level check in viewforum template (reported by topmuzik.com)
71-
72-
Changelog 3.04 Final
73-
June 3rd, 2006
74-
=============
75-
1 MySQL syntax for data synchronization for different versions
76-
2 xhtml fixes
77-
3 bugfix for group permission check form (reported by Aries)
78-
79-
Changelog 3.04 RC4
80-
May 27th, 2006
81-
=============
82-
1 Bugfix for topic title transfered from post subject
83-
2 Added topic check before storing post (reported by marco)
84-
3 Removed unnecessary forum option 'allow_attachments'
85-
4 Other minor fixes
86-
87-
Changelog 3.04 RC3
88-
May 20th, 2006
89-
=============
90-
1 Fixed bugs in print.php (reported by ideiafacil)
91-
2 Code correction for performance and cleaning up
92-
3 Partial improvement on permission precision
93-
4 Improvement on category/forum structured display for permission admin and block edit pages
94-
5 Improvement on compliant xhtml
95-
96-
Changelog 3.04 RC2
97-
May 9th, 2006
98-
=============
99-
1 Fixed bugs reported on xoops.org
100-
2 Created object handler for post_text
101-
3 Changed fields in TABLE bb_forums
102-
4 Changed testing post message in language file
103-
104-
Changelog 3.04 RC
105-
May 8th, 2006
106-
=============
107-
1 category, forum, topic, post, report, rate refactoring
108-
2 Added reading records options: cookie, database (inspired by Ajout Gizmhail)
109-
3 Added data synchronization
110-
4 Added missing "previous/next topic"
111-
5 Modified database structure for query optimization
112-
6 Fixed bug in templates for file inclusion: for both update from file and from db modes
113-
114-
Changelog 3.03
115-
Apr 26th, 2006
116-
=============
117-
1 Fixed rss+xml rel link (by CeBepuH)
118-
2 Fixed typo in "pm" path for "transfer" (by CeBepuH)
119-
3 Fixed clear property in newbb.css (by CeBepuH)
120-
4 Fixed undefined method "setMessage" for module which could lead to newbb 2.* upgrade failure
121-
5 Split functions.php
122-
123-
124-
Changelog 3.02
125-
Apr 23rd, 2006
126-
=============
127-
1 Fixed URL iteration for menumode (reported by genetailor)
128-
2 Skip cache for edit pages
129-
3 Charset completeness for PDF maker (reported by domecc)
130-
4 Performance improvement, including PHP scripting and MySQL db structure
131-
5 Added action request detection in xoops_version.php so that some useful features are reactived including "welcome forum"
132-
6 Bugfix for "sort by rating" URL (reported by Mowaffak)
133-
7 Added time limit to "recent replied topic" block
134-
8 Bugfix for signature setting (removed unnecessary user setting check)
135-
136-
Changelog 3.01
137-
Feb 22th, 2006
138-
=============
139-
Fixed bugs in permission management
140-
Fixed bugs in formloader
141-
142-
Changelog 3.0 RC2
143-
Feb 10th, 2006
144-
=============
145-
Fixed bugs in user select
146-
Fixed bugs in permission management
147-
148-
Changelog 3.0 RC1
149-
Jan 29th, 2006
150-
=============
151-
Compatible with XOOPS 2.0, 2.2, 2.3
152-
153-
154-
Changelog 2.32
155-
=============
156-
1 DB query optimization
157-
158-
159-
Changelog 2.31
160-
=============
161-
1 bugfixes
162-
2 speed improvement
163-
164-
165-
Changelog 2.3
166-
=============
167-
1 moderator accessible distributed batch threads/posts management (approval, edit, move, delete, merge, split)
168-
2 moderator accessible distributed user/IP suspension management
169-
3 trashcan implemented
170-
4 user-based post search and management
171-
5 plugable module bridging handler implemented
172-
173-
174-
Changelog 2.2
175-
=============
176-
1 block/profile/css/adminmenu/encoding related content upgraded to XOOPS 2.2
177-
2 XOOPS editor framework implemented
178-
3 permission management separated from forum/category and default permission set and management added
179-
4 category/forum creation on module installation
180-
5 send PM with quoted post content
181-
6 embedded upgrade: any version of newbb/cbb could be updated to up-to-date CBB by updating module
182-
7 forum queries in xoops_version.php moved to save db query
183-
8 change relative path to full path for some images
184-
9 change forum list in jumpbox and topicmanager to a more clear style
185-
10 moderator management merged into forum admin form with xoopsuserselect form
186-
187-
188-
Changelog 1.15
189-
==============
190-
1 fix for aged security problem (XSS)
191-
192-
193-
Changelog 1.14
194-
==============
195-
1 bugfix for inactive user posting (Reported by Aries @ xoops.org.cn)
196-
2 bugfix for deleting topic with poll (Reported by gropius @ xoops.org.cn)
197-
3 change default value for displaying forum topic time duration (Reported by Zjerre @ xoops.org)
198-
4 change formselectuser.php for XOOPS 2.2
199-
200-
201-
Changelog 1.13
202-
==============
203-
1 bugfix for IP recording (Reported by alitan @ xoops.org)
204-
2 changing time display for "Today/yesterday ..." (Reported by alitan @ xoops.org)
205-
3 adding post link (Preliminary solution by ackbarr && Suggested by Peekay @ xoops.org)
206-
4 further cleaning "Compact mode" (Suggested by Rou4 @ XOOPS CHINA)
207-
5 adding new block "recent post text"
208-
6 bugfix for function newbb_admin_mkdir
209-
7 bugfix for permission table of locked topic
210-
8 adding indication for locked topic in view topic (Requested by SuperVoley @ xoops.org)
211-
9 bugfix for category management (Reported by chia @ xoops.tnc.edu.tw)
212-
10 bugfix for subject sanitizing problem (Reported by CeBepuH @ xoops.org)
213-
11 rolling back signature to pure xcode format (comprehensive improvement is expected after XOOPS 2.2)
214-
12 bugfix for empty message check in quick reply
215-
13 template validation on XHTML 1.0 (not complete yet)
216-
14 compatible with news 1.30+ for posttonews (reported by cosmodrum @ xoops.org)
217-
218-
219-
Changelog 1.12
220-
==============
221-
1 login on-fly in "quick reply" (requested by Rou4 @ XOOPS CHINA)
222-
2 sort order in viewpost.php (reported by kmac @ XOOPS CHINA)
223-
3 bugfix for time display (reported by kmac @ XOOPS CHINA)
224-
4 clean display of regist date (requested by kmac @ XOOPS CHINA)
225-
5 bugfix for forum selection in "advanced search" (reported by kmac @ XOOPS CHINA)
226-
6 rolling back missed disclaimer (reported by kmac @ XOOPS CHINA)
227-
7 bugfix for duplicated security check and post_time_limit check (reported by kmac @ XOOPS CHINA)
228-
8 permission check for poll management (reported by karuna @ XOOPS CHINA)
229-
230-
231-
Changelog 1.11
232-
==============
233-
1 re-write user info renderer
234-
2 bugfix for poster display in thread mode (reported by iamtj @ XOOPS CHINA)
235-
3 correction of deleting post message (reported by iamtj @ XOOPS CHINA)
236-
4 post backup if submission exceeds session limit or time limit
237-
5 correction of encoding problem in XOOPS function formatTimestamp($time, 'rss') (reported by chia @ XOOPS CHINA)
238-
239-
240-
Changelog 1.10
241-
==============
242-
1 bugfix and layout improvement (suggested by iamtj @ XOOPS CHINA, fast reply in thread mode, anonymous button, register to post ...)
243-
2 rolling back "RSS enable" (requested by Aries @ XOOPS CHINA, CeBepuH @ XOOPS)
244-
3 bugfix for template dir in rss.php (reported by jodn007 @ XOOPS CHINA)
245-
4 bugfix for caching in rss.php
246-
5 bugfix for rss encoding conversion (reported by chia @ XOOPS CHINA)
247-
6 read new posts since last visit (Tuning suggested by Peekay @ XOOPS)
248-
7 enable 'delete top post' (requested by iamtj @ XOOPS CHINA)
249-
8 bugfix for Last Visit recording
250-
9 bugfix/improvement for "move forum"
251-
10 adding "merge forum"
252-
11 post date / poster ip display changed
253-
12 options for user level bar
254-
13 backward/forward compatible with XOOPS 2.0*
255-
256-
257-
Changelog 1.00
258-
==============
259-
260-
Changelog over NewBB 2.02:
261-
1 CBB uses the same DB stucture/data with NewBB 2, it is convenient to switch between current CBB and current NewBB 2.
262-
2 bugfixes for NewBB 2.02
263-
3 clean/correct NewBB 2 templates
264-
265-
Major new features ( most suggested by XOOPS CHINA users)
266-
1 dropdown menu selectable for end users: SELECT BOX, CLICK, HOVER
267-
2 multi-attachments upload
268-
3 RSS improvement, individual RSS Feeds for each category, each forum and the global module
269-
4 FPDF improvement, UTF-8 encoding is now working
270-
5 user friendly time display, four types: Today, Yesterday, this year and longer than one year
271-
6 block handler: recent posts, recent topics, most views, most replies, recent digest, recent sticky, most valuable posters
272-
7 time periods for blocks, you could have most views in last 24 hours, most views in this week, most views in this month
273-
8 new page: view all posts, view new posts since last visit
274-
9 "New member": an introduction thead will be posted automatically when a user logs on for the first time (if enabled)
275-
10 adding dobr parameter

action.post.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,5 +259,4 @@
259259
redirect_header("viewpost.php?uid=$uid", 2, _MD_DBUPDATED);
260260
}
261261

262-
include ICMS_ROOT_PATH.'/footer.php';
263-
?>
262+
include ICMS_ROOT_PATH.'/footer.php';

action.topic.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,4 @@
217217
redirect_header("viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED);
218218
}
219219

220-
include ICMS_ROOT_PATH.'/footer.php';
221-
?>
220+
include ICMS_ROOT_PATH.'/footer.php';

action.transfer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,4 @@
139139
$ret;
140140
xoops_confirm(array(), "javascript: window.close();", sprintf(_MD_TRANSFER_DONE, $op_options[$op]), _CLOSE, $ret);
141141
include ICMS_ROOT_PATH."/footer.php";
142-
}
143-
?>
142+
}

class/category.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
class Category extends ArtObject {
3535

36-
function Category()
36+
function __construct()
3737
{
3838
$this->ArtObject("bb_categories");
3939
$this->initVar('cat_id', XOBJ_DTYPE_INT);
@@ -49,7 +49,7 @@ function Category()
4949
}
5050

5151
class IforumCategoryHandler extends ArtObjectHandler {
52-
function IforumCategoryHandler(&$db)
52+
function __construct(&$db)
5353
{
5454
$this->ArtObjectHandler($db, 'bb_categories', 'Category', 'cat_id', 'cat_title');
5555
}
@@ -145,6 +145,4 @@ function applyPermissionTemplate(&$category)
145145
$perm_handler = icms_getmodulehandler('permission', basename(dirname(dirname(__FILE__ ) ) ), 'iforum' );
146146
return $perm_handler->setCategoryPermission($category->getVar("cat_id"));
147147
}
148-
}
149-
150-
?>
148+
}

class/compat/class/xoopsform/formeditor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class IforumFormEditor extends icms_form_elements_Textarea
2323
* @param bool $noHtml use non-WYSIWYG eitor onfailure
2424
* @param string $OnFailure editor to be used if current one failed
2525
*/
26-
function IforumFormEditor($caption, $name, $editor_configs = null, $nohtml = false, $OnFailure = "")
26+
function __construct($caption, $name, $editor_configs = null, $nohtml = false, $OnFailure = "")
2727
{
2828
parent::__construct($caption, $editor_configs["name"]);
2929
require_once ICMS_ROOT_PATH."/class/xoopseditor.php";
@@ -36,4 +36,3 @@ function render()
3636
return $this->editor->render();
3737
}
3838
}
39-
?>

class/compat/class/xoopsform/formselecteditor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class IforumFormSelectEditor extends icms_form_elements_Tray {
3636
* @param string $value Pre-selected text value
3737
* @param bool $noHtml dohtml disabled
3838
*/
39-
function IforumFormSelectEditor(&$form, $name = "editor", $value = null, $nohtml = false, $allowed_editors = array()) {
39+
function __construct(&$form, $name = "editor", $value = null, $nohtml = false, $allowed_editors = array()) {
4040
parent::__construct(_SELECT);
4141
$this->allowed_editors = $allowed_editors;
4242
$this->form =& $form;

class/compat/kernel/rank.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
class XoopsRank extends XoopsObject
3434
{
35-
function XoopsRank()
35+
function __construct()
3636
{
3737
$this->XoopsObject();
3838
$this->initVar('rank_id', XOBJ_DTYPE_INT, null, false);
@@ -45,8 +45,7 @@ function XoopsRank()
4545
}
4646
class XoopsRankHandler extends XoopsPersistableObjectHandler
4747
{
48-
function XoopsRankHandler(&$db) {
48+
function __construct(&$db) {
4949
$this->XoopsPersistableObjectHandler($db, 'ranks', 'XoopsRank', 'rank_id', 'rank_title');
5050
}
51-
}
52-
?>
51+
}

class/digest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Digest extends icms_core_Object {
3232
var $isHtml = false;
3333
var $isSummary = true;
3434

35-
function Digest()
35+
function __construct()
3636
{
3737
$this->initVar('digest_id', XOBJ_DTYPE_INT);
3838
$this->initVar('digest_time', XOBJ_DTYPE_INT);

class/forum.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
class Forum extends ArtObject {
3535

36-
function Forum()
36+
function __construct()
3737
{
3838
$this->ArtObject("bb_forums");
3939
$this->initVar('forum_id', XOBJ_DTYPE_INT);
@@ -122,7 +122,7 @@ function disp_forumModerators($valid_moderators = 0)
122122
}
123123

124124
class IforumForumHandler extends ArtObjectHandler {
125-
function IforumForumHandler(&$db)
125+
function __construct(&$db)
126126
{
127127
$this->ArtObjectHandler($db, 'bb_forums', 'Forum', 'forum_id', 'forum_name');
128128
}
@@ -915,5 +915,4 @@ function &display(&$forums_obj)
915915
}
916916
return $forums_array;
917917
}
918-
}
919-
?>
918+
}

0 commit comments

Comments
 (0)