Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ While the module is in development the status carries the phase: 1.0.0 Alpha 7 i
- Database access: all hand-written SQL now goes through `mod_imforum_Db` over the core's PDO connection (`icms::$db`) with bound parameters, instead of `queryF()` on the legacy adapter (`icms::$xoopsDB`) with values glued into the SQL. The IPF handlers keep the legacy adapter the core gives them for their own queries; both share one PDO connection. Without PDO (`XOOPS_DB_TYPE` not `pdo.*`) the module stops with a clear message. Prepared statements do not show up in the debug console of the core, which only logs `query()`.
- Editor: the post, forum and category forms use the `dhtmltextarea` control, as the content module does, so the WYSIWYG editor chosen in the site preferences loads (the plain `textarea` control of the IPF ignores the editor). A post written in an editor is stored as HTML (`dohtml` on, line breaks off) and is shown through the purifier; without an editor the text still stays as typed. The quick reply and the moderation forms stay plain textareas.
- Phase 7: importer. `admin/import.php` and `Importer` copy the data of a running iForum installation into imforum, keeping every id, and never change iForum: categories, forums, the serialized moderator lists (one row per member), topics (ratings, polls and tags are left out), posts joined with their text (IP addresses become text), edit histories (base64 serialized lists become JSON), attachments from the posts and from the reserved table (names that could leave the upload folder are refused, files are copied and measured), reports, suspensions that have not ended, read marks (one per member and item), digests, the archive, group permissions of the forums and categories under the id of imforum (poll rights are left out), subscriptions that imforum has events for, the preferences that exist in both modules (the `NONE` entry of the subject prefixes is dropped, as imforum counts prefixes from 1) and the cached permission template. The check writes nothing: it reports missing tables and columns, character sets, orphans, posts that grow past 64 KB when converted, missing attachment files and text that looks like UTF-8 in latin1 columns, for which the import can read the bytes as UTF-8. Importing and rolling back ask for a confirmation and run only on a POST with a token. Every import starts by emptying the imforum tables, so an interrupted run is simply repeated; rolling back empties them again and removes the copied rights, subscriptions and files. Afterwards the counters are recounted and `verify()` compares row counts, posts per forum and per topic, a checksum of 200 random posts, the rights and the attachment files. Tests build an old installation, check every table, run the largest case (43,778 posts) and prove that iForum's tables are unchanged.
- License: imforum is released under the GNU General Public License version 2 again, like iForum and ImpressCMS. `LICENSE`, `composer.json` (`GPL-2.0-only`), the module definition and the file headers say so. The first phases carried the MIT license.
363 changes: 342 additions & 21 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Conventions:

## License

MIT, see [LICENSE](LICENSE).
GNU General Public License version 2, see [LICENSE](LICENSE). imforum is the successor of iForum, which is released under the same license.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "iforummodule/imforum",
"description": "Community forum module for ImpressCMS 2.0, built on the ImpressCMS Persistable Framework",
"type": "project",
"license": "MIT",
"license": "GPL-2.0-only",
"require": {
"php": ">=8.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* administer this module.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Moderation (phase 5) writes them; there is no "add" here.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Categories: list, add, edit, delete
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/digest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* The digest task (phase 6) writes them; there is no "add" here.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Forums: list, add, edit, delete, with group permissions and moderators
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* confirmation and then run only on a POST with a security token.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Administration index
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Administration menu
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/permtemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* permissions. iForum kept the template in a cache file; here it is a table.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/prune.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* confirmation deletes or moves them.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Reports come from members (phase 5); there is no "add" here.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/admin/suspension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Suspensions: members or IP addresses that may read but not post
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Archived topics, read only
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* a few picture types is sent as a download, never rendered by the browser.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/imforum_blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* The blocks show only what the visitor may read.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A copy of a post's text, kept when a topic is archived
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/ArchiveHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for archived posts
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Replaces the base64-serialised list in bb_posts.attachment.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/AttachmentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for attachments
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A category groups forums on the index page
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/CategoryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for categories
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Periodic housekeeping for the autotask: visitors list, read marks, ended suspensions
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* share one PDO connection, so they see each other's writes at once.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Digest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A digest: the list of featured topics sent by mail
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/DigestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for digests
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/DigestMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* is kept in the digest table for the administrators.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* A forum holds topics and can sit below another forum
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/ForumHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for forums
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* target afterwards, rollback() undoes a run.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/KarmaService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* author and webmasters always read the post.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/ModerationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Messages are language constants, ready for output.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Moderator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Replaces the serialised list in bb_forums.forum_moderator.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/ModeratorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for forum moderators
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* cannot be bypassed through a mailbox.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Online.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Volatile: rows older than the online timeout are purged and never migrated.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/OnlineHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for the who-is-online list
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/PermissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* moderators and webmasters only.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Permtemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* iForum kept this template in a cache file (IforumPermissionHandler::getTemplate).
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/PermtemplateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for the permission template
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* 43,778 posts on the largest site a separate table buys nothing.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/PostForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nothing.
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/class/PostHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Handler for posts
*
* @copyright The iForum project
* @license MIT, see LICENSE
* @license GNU GPL v2, see LICENSE
* @package imforum
* @since 1.0
*/
Expand Down
Loading
Loading