if ($topic_obj->getVar('approved') > 0) { // if the topic is active
    $admin_actions['merge']  = [
        'link'  => XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/topicmanager.php?mode=merge&topic_id=' . $topic_id,
        'name'  => _MD_MERGETOPIC,
        'image' => $ad_merge