32 return 'Migrate New Account Mail Attachments to IRSS';
42 return \ilResourceStorageMigrationHelper::getPreconditions();
47 $this->helper = new \ilResourceStorageMigrationHelper(
51 $this->root_user_id = $this->helper->getDatabase()->fetchObject(
52 $this->helper->getDatabase()->query(
53 'SELECT usr_id FROM usr_data WHERE login="root"'
60 $db = $this->helper->getDatabase();
66 WHERE att_file IS NOT NULL AND type = "nacc" LIMIT 1;'
70 $path =
'/' . implode(
73 static fn(
string $path_part):
string => trim($path_part,
'/'),
75 $this->helper->getClientDataDir() .
'/ilReg/reg_7',
83 if (file_exists(
$path)) {
84 $rid = $this->helper->movePathToStorage(
87 static fn() =>
$res->att_file,
88 static fn() =>
$res->att_file
92 $rid = $rid->serialize();
110 return $this->helper->getDatabase()->fetchObject(
111 $this->helper->getDatabase()->query(
112 'SELECT COUNT(*) cnt FROM mail_template WHERE att_file IS NOT NULL AND type = "nacc"'
getDefaultAmountOfStepsPerRun()
Tell the default amount of steps to be executed for one run of the migration.
prepare(Environment $environment)
Prepare the migration by means of some environment.
step(Environment $environment)
Run one step of the migration.
getPreconditions(Environment $environment)
Objectives the migration depend on.
getRemainingAmountOfSteps()
Count up how many "things" need to be migrated.
ilResourceStorageMigrationHelper $helper
Class ilResourceStorageMigrationHelper.
An environment holds resources to be used in the setup process.
A migration is a potentially long lasting operation that can be broken into discrete steps.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...