Heray-Was-Here
Server : Apache
System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : jasonp18 ( 1000)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/3/root/opt/dedrads/cms_tools/mods/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/3/root/opt/dedrads/cms_tools/mods/phpbb.py
#! /usr/lib/rads/venv/bin/python3
"""Subclass for phpBB CMS"""
# Author: Daniel K

import os
import logging
from typing import TYPE_CHECKING
from ..cms import CMS
from ..cms import VariableData

if TYPE_CHECKING:
    from ..cms import CMSFind

LOGGER = logging.getLogger(__name__)


class PhpBB(CMS):
    '''
    Class for phpBB installations
    '''

    def setup(self):

        self.type = 'phpBB'

        self.config = os.path.join(self.directory_root, 'config.php')

        self.db_name_data = VariableData('php_variable', 'dbname', self.config)
        self.db_user_data = VariableData('php_variable', 'dbuser', self.config)
        self.db_pass_data = VariableData(
            'php_variable', 'dbpasswd', self.config
        )
        self.db_pref_data = VariableData(
            'php_variable', 'table_prefix', self.config
        )
        self.db_host_data = VariableData('php_variable', 'dbhost', self.config)

        self.cms_directories = [
            "language",
            "vendor",
            "phpbb",
            "bin",
            "includes",
            "download",
            "styles",
            "docs",
            "assets",
            "store",
            "files",
            "config",
            "ext",
            "adm",
            "cache",
            "images",
        ]

        return True


def register_cms(cms_find_instance: 'CMSFind'):
    '''
    Register self with current cms_find_instance
    '''

    cms_find_instance.add_quick("phpBB", PhpBB)

Hry