class fix_left_right_ids extends command

Properties

protected user $user
protected driver_interface $db
protected driver_interface $cache

Methods

__construct(user $user, driver_interface $db, driver_interface $cache)

Constructor

ProgressBar
create_progress_bar(int $max, SymfonyStyle $io, OutputInterface $output, bool $message = false)

Create a styled progress bar

from  command
configure()

{@inheritdoc}

void
execute(InputInterface $input, OutputInterface $output)

Executes the command fixup:fix-left-right-ids.

bool
fix_ids_tree(int $i, string $field, string $table, int $parent_id = 0, array $where = array())

Item's tree structure rebuild helper The item is either forum or ACP/MCP/UCP module

Details

at line 38
__construct(user $user, driver_interface $db, driver_interface $cache)

Constructor

Parameters

user $user

User instance (mostly for translation)

driver_interface $db

Database connection

driver_interface $cache

Cache instance

in command at line 45
ProgressBar create_progress_bar(int $max, SymfonyStyle $io, OutputInterface $output, bool $message = false)

Create a styled progress bar

Parameters

int $max

Max value for the progress bar

SymfonyStyle $io

Symfony style output decorator

OutputInterface $output

The output stream, used to print messages

bool $message

Should we display message output under the progress bar?

Return Value

ProgressBar

at line 50
protected configure()

{@inheritdoc}

at line 69
protected void execute(InputInterface $input, OutputInterface $output)

Executes the command fixup:fix-left-right-ids.

Repairs the tree structure of the forums and modules. The code is mainly borrowed from Support toolkit for phpBB Olympus

Parameters

InputInterface $input

An InputInterface instance

OutputInterface $output

An OutputInterface instance

Return Value

void

at line 104
protected bool fix_ids_tree(int $i, string $field, string $table, int $parent_id = 0, array $where = array())

Item's tree structure rebuild helper The item is either forum or ACP/MCP/UCP module

Parameters

int $i

Item id offset index

string $field

The key field to fix, forum_id|module_id

string $table

The table name to perform, FORUMS_TABLE|MODULES_TABLE

int $parent_id

Parent item id

array $where

Additional WHERE clause condition

Return Value

bool

True on rebuild success, false otherwise