Function __global->check_alien

Definitions

sources/upgrade_integrity_scan.php

  • Check for alien files.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$dir SHORT_TEXT No No required parameter N/A N/A The directory we are scanning relative to
$rela SHORT_TEXT No No Blank (empty string) N/A N/A The directory (relative) we are scanning
$raw boolean No No False N/A N/A Whether to give raw output (no UI)
$addon_files ?array No No Null N/A N/A List of files from non-bundled addons (a map: relative file paths as keys of map) (null: unknown, load them from addons_files table)
$old_files ?array No No Null N/A N/A List of files from old version (a map: relative file paths as keys of map) (null: unknown, load them from files_previous.bin manifest)
$files ?array No No Null N/A N/A List of verbatim files (a map: relative file paths as keys of map) (null: unknown, load them from files.bin manifest)

Returns

  • A pair: alien files (HTML list if $raw, else HTML option elements for a select input), HTML list of addon files
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check for alien files.
 *
 * @param  SHORT_TEXT $dir The directory we are scanning relative to
 * @param  SHORT_TEXT $rela The directory (relative) we are scanning
 * @param  boolean $raw Whether to give raw output (no UI)
 * @param  ?array $addon_files List of files from non-bundled addons (a map: relative file paths as keys of map) (null: unknown, load them from addons_files table)
 * @param  ?array $old_files List of files from old version (a map: relative file paths as keys of map) (null: unknown, load them from files_previous.bin manifest)
 * @param  ?array $files List of verbatim files (a map: relative file paths as keys of map) (null: unknown, load them from files.bin manifest)
 * @return array A pair: alien files (HTML list if $raw, else HTML option elements for a select input), HTML list of addon files
 */

function check_alien(string $dir, string $rela = '', bool $raw = false, ?array $addon_files = null, ?array $old_files = null, ?array $files = null) : array