phpbb\install\module\update_filesystem\task\show_file_status::run PHP Method

run() public method

public run ( )
    public function run()
    {
        if (!$this->iohandler->get_input('submit_continue_file_update', false)) {
            // Handle merge conflicts
            $merge_conflicts = $this->installer_config->get('merge_conflict_list', array());
            // Create archive for merge conflicts
            if (!empty($merge_conflicts)) {
                $compression_method = $this->installer_config->get('file_update_compression', '');
                $conflict_archive = $this->file_updater->init($compression_method);
                $this->installer_config->set('update_file_conflict_archive', $conflict_archive);
                foreach ($merge_conflicts as $filename) {
                    $this->file_updater->create_new_file($filename, base64_decode($this->cache->get('_file_' . md5($filename))), true);
                }
                // Render download box
                $this->iohandler->add_download_link('phpbb_installer_update_conflict_download', 'DOWNLOAD_CONFLICTS', 'DOWNLOAD_CONFLICTS_EXPLAIN');
                $this->file_updater->close();
            }
            // Render update file statuses
            $file_update_info = $this->installer_config->get('update_files', array());
            $file_status = array('deleted' => !isset($file_update_info['delete']) ? array() : $file_update_info['delete'], 'new' => !isset($file_update_info['new']) ? array() : $file_update_info['new'], 'conflict' => $this->installer_config->get('merge_conflict_list', array()), 'modified' => !isset($file_update_info['update_with_diff']) ? array() : $file_update_info['update_with_diff'], 'not_modified' => !isset($file_update_info['update_without_diff']) ? array() : $file_update_info['update_without_diff']);
            $this->iohandler->render_update_file_status($file_status);
            // Add form to continue update
            $this->iohandler->add_user_form_group('UPDATE_CONTINUE_FILE_UPDATE', array('submit_continue_file_update' => array('label' => 'UPDATE_CONTINUE_FILE_UPDATE', 'type' => 'submit')));
            // Show results to the user
            throw new user_interaction_required_exception();
        } else {
            $conflict_archive_path = $this->installer_config->get('update_file_conflict_archive', null);
            // Remove archive
            if ($conflict_archive_path !== null && $this->filesystem->exists($conflict_archive_path)) {
                $this->filesystem->remove($conflict_archive_path);
            }
            $this->installer_config->set('update_file_conflict_archive', null);
        }
    }