Issue with move_topics()

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
Raster02
Registered User
Posts: 14
Joined: Tue Mar 24, 2015 2:58 pm

Issue with move_topics()

Post by Raster02 » Mon Jan 15, 2018 7:20 pm

I'm trying to use move_topics() through a PHP function:

Code: Select all

function phpBB_moveTopic($topic_id, $forum_id) {
    define('IN_PHPBB', true);
    $phpbb_root_path = '../../forum/';
    $phpEx = 'php';
    
    include '../../forum/common.php';
    include '../../forum/includes/functions_admin.php';

    move_topics($topic_id, $forum_id, true);
}
Whenever I call this function I get this error:

Code: Select all

[15-Jan-2018 17:48:49 UTC] PHP Fatal error:  Call to undefined method Database::sql_in_set() in /home/**/public_html/forum/includes/functions_admin.php on line 518
If I include the files outside of the function, but in the same file, I get this error:

Code: Select all

[15-Jan-2018 18:49:34 UTC] PHP Fatal error:  Call to undefined method Database::sql_close() in /home/**/public_html/forum/includes/functions.php on line 5530
Am I not including something that is necessary here ?

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 9 guests