phpbb_functional_test_case::delete_style PHP Method

delete_style() protected method

Remove temporary style created by add_style()
protected delete_style ( string $style_id, string $style_path )
$style_id string Style ID
$style_path string Style directory
    protected function delete_style($style_id, $style_path)
    {
        global $phpbb_root_path;
        $db = $this->get_db();
        $db->sql_query('DELETE FROM ' . STYLES_TABLE . ' WHERE style_id = ' . $style_id);
        if (version_compare(PHPBB_VERSION, '3.1.0-dev', '<')) {
            $db->sql_query('DELETE FROM ' . STYLES_IMAGESET_TABLE . ' WHERE imageset_id = ' . $style_id);
            $db->sql_query('DELETE FROM ' . STYLES_TEMPLATE_TABLE . ' WHERE template_id = ' . $style_id);
            $db->sql_query('DELETE FROM ' . STYLES_THEME_TABLE . ' WHERE theme_id = ' . $style_id);
            if ($style_path != 'prosilver') {
                @rmdir($phpbb_root_path . 'styles/' . $style_path . '/template');
                @rmdir($phpbb_root_path . 'styles/' . $style_path);
            }
        }
    }