/webtrees/ |
H A D | phpstan-baseline.neon | 7 path: app/Auth.php 13 path: app/Auth.php 19 path: app/Census/AbstractCensusColumnCondition.php 25 path: app/Census/AbstractCensusColumnCondition.php 31 path: app/Census/AbstractCensusColumnCondition.php 37 path: app/Census/AbstractCensusColumnCondition.php 43 path: app/Census/AbstractCensusColumnCondition.php 49 path: app/Census/CensusColumnRelationToHead.php 55 path: app/Census/CensusColumnRelationToHead.php 61 path: app/Census/CensusColumnSexF.php [all …]
|
/webtrees/app/Factories/ |
H A D | ImageFactory.php | 82 …public function fileResponse(FilesystemOperator $filesystem, string $path, bool $download): Respon… argument 86 $mime_type = $filesystem->mimeType(path: $path); 91 … $filename = $download ? addcslashes(string: basename(path: $path), characters: '"') : ''; 93 …return $this->imageResponse(data: $filesystem->read(location: $path), mime_type: $mime_type, filen… 105 string $path, argument 111 $mime_type = $filesystem->mimeType(path: $path); 112 $image = $this->imageManager()->read(input: $filesystem->readStream($path)); 124 … ->replacementImageResponse(text: '.' . pathinfo(path: $path, flags: PATHINFO_EXTENSION)) 139 $path = $media_file->filename(); 142 return $this->fileResponse(filesystem: $filesystem, path: $path, download: $download); [all …]
|
H A D | RouteFactory.php | 73 …c fn (string $key): bool => !str_contains($route->path, '{' . $key . '}') && !str_contains($route-… 81 $path = parse_url($url, PHP_URL_PATH); 82 $parameters = ['route' => $path] + $parameters;
|
/webtrees/app/Services/ |
H A D | RelationshipService.php | 82 $path = $this->getCloseRelationship($individual1, $individual2); 85 if ($path === []) { 89 return $this->nameFromPath($path, $language); 123 foreach ($paths as $i => $path) { 125 $indi = $path[count($path) - 1]; 132 $new_path = $path; 145 $new_path = $path; 163 $new_path = $path; 176 $new_path = $path; 318 * @param string $path [all …]
|
H A D | HousekeepingService.php | 241 foreach (self::OLD_PATHS as $path) { 242 if (!$this->deleteFileOrFolder($filesystem, $path)) { 243 $paths_to_delete[] = $path; 254 * @param string $path 259 public function deleteOldFiles(FilesystemOperator $filesystem, string $path, int $max_age): void argument 263 $list = $filesystem->listContents($path, FilesystemReader::LIST_DEEP); 304 * @param string $path 308 private function deleteFileOrFolder(FilesystemOperator $filesystem, string $path): bool argument 311 $filesystem->delete($path); 314 $filesystem->deleteDirectory($path);
|
H A D | UpgradeService.php | 131 ->map(static fn (StorageAttributes $attributes): string => $attributes->path()); 142 * @param string $path 148 public function downloadFile(string $url, FilesystemOperator $filesystem, string $path): int argument 179 $filesystem->writeStream($path, $tmp); 198 $destination->write($attributes->path(), $source->read($attributes->path())); 199 $source->delete($attributes->path()); 221 … foreach ($filesystem->listContents($folder_to_clean, FilesystemReader::LIST_DEEP) as $path) { 222 if ($path['type'] === 'file' && !$files_to_keep->contains($path['path'])) { 224 $filesystem->delete($path['path']);
|
H A D | MediaFileService.php | 288 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 289 ->map(fn (StorageAttributes $attributes): string => $attributes->path()) 338 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 339 ->map(fn (StorageAttributes $attributes): string => $attributes->path()) 364 ->map(static fn (string $path): string => dirname($path) . '/'); 382 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 383 ->map(fn (StorageAttributes $attributes): string => $attributes->path() . '/') 398 * @param string $path 402 private function ignorePath(string $path): bool argument 404 return array_intersect(self::IGNORE_FOLDERS, explode('/', $path)) !== [];
|
H A D | ServerCheckService.php | 259 * @param string $path 263 private function normalizeFolder(string $path): string argument 265 $path = strtr($path, ['\\' => '/']); 267 if (str_ends_with($path, '/')) { 268 return $path; 271 return $path . '/';
|
/webtrees/app/Module/ |
H A D | RelationshipsChartModule.php | 309 foreach ($paths as $path) { 311 $relationships = $this->oldStyleRelationshipPath($tree, $path); 317 $nodes = Collection::make($path) 342 foreach ($path as $n => $xref) { 351 …ps[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->… 358 …ps[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->… 361 …ps[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->… 369 …ps[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->… 372 …ps[$n], Registry::individualFactory()->make($path[$n - 1], $tree), Registry::individualFactory()->… 530 foreach ($paths as $path) { [all …]
|
H A D | PedigreeMapModule.php | 327 $path = ''; 331 $path = 'mot' . $path; 333 $path = 'fat' . $path; 338 return ucfirst($this->relationship_service->legacyNameAlgorithm($path));
|
/webtrees/app/Http/RequestHandlers/ |
H A D | DeletePath.php | 69 $path = Validator::queryParams($request)->string('path'); 71 $normalized_path = $this->whitespace_path_normalizer->normalizePath($path); 74 …FlashMessages::addMessage(I18N::translate('The file %s could not be deleted.', e($path)), 'danger'… 79 if (str_ends_with($path, '/')) { 82 …FlashMessages::addMessage(I18N::translate('The folder %s has been deleted.', e($path)), 'success'); 84 …shMessages::addMessage(I18N::translate('The folder %s could not be deleted.', e($path)), 'danger'); 89 … FlashMessages::addMessage(I18N::translate('The file %s has been deleted.', e($path)), 'success'); 91 …lashMessages::addMessage(I18N::translate('The file %s could not be deleted.', e($path)), 'danger');
|
H A D | UploadMediaAction.php | 112 $path = $folder . $filename; 115 $file_exists = $data_filesystem->fileExists($path); 121 …::addMessage(I18N::translate('The file %s already exists. Use another filename.', $path, 'error')); 127 $data_filesystem->writeStream($path, $uploaded_file->getStream()->detach()); 128 …s::addMessage(I18N::translate('The file %s has been uploaded.', Html::filename($path)), 'success'); 129 Log::addMediaLog('Media file ' . $path . ' uploaded');
|
H A D | ManageMediaData.php | 130 $path = $row->media_folder . $row->multimedia_file_refn; 133 $mime_type = Registry::filesystem()->data()->mimeType($path); 139 $url = route(AdminMediaFileThumbnail::class, ['path' => $path]); 145 $url = route(AdminMediaFileDownload::class, ['path' => $path]); 148 $url = route(AdminMediaFileThumbnail::class, ['path' => $path]);
|
H A D | AdminMediaFileThumbnail.php | 56 $path = Validator::queryParams($request)->string('path'); 61 if (str_starts_with($path, $media_folder)) { 62 … return Registry::imageFactory()->thumbnailResponse($filesystem, $path, 120, 120, 'contain');
|
H A D | AdminMediaFileDownload.php | 56 $path = Validator::queryParams($request)->string('path'); 61 if (str_starts_with($path, $media_folder)) { 62 return Registry::imageFactory()->fileResponse($filesystem, $path, false);
|
H A D | AutoCompleteFolder.php | 60 ->filter(fn (string $path): bool => stripos($path, $query) !== false)
|
H A D | MapDataImportPage.php | 59 $extension = pathinfo($attributes->path(), PATHINFO_EXTENSION); 63 …tatic fn (StorageAttributes $attributes): string => pathinfo($attributes->path(), PATHINFO_BASENAM…
|
H A D | CleanDataFolder.php | 89 return $attributes->path() . '/'; 92 return $attributes->path();
|
/webtrees/app/ |
H A D | Html.php | 62 * @param string $path 67 public static function url(string $path, array $data): string argument 69 $path = strtr($path, [' ' => '%20']); 72 $path .= '?' . http_build_query($data, '', '&', PHP_QUERY_RFC3986); 75 return $path;
|
H A D | Session.php | 69 $path = (string) parse_url($url, PHP_URL_PATH); 72 …$path = implode('/', array_map(static fn (string $x): string => rawurlencode($x), explode('/', $pa… 78 'path' => $path . '/',
|
H A D | View.php | 196 * @param string $path 200 public static function registerNamespace(string $namespace, string $path): void argument 206 if (!str_ends_with($path, '/')) { 210 self::$namespaces[$namespace] = $path;
|
/webtrees/app/Helpers/ |
H A D | functions.php | 34 * @param string $path 38 function asset(string $path): string argument 40 if (str_ends_with($path, '/')) { 45 $version = '?v=' . filemtime(Webtrees::ROOT_DIR . 'public/' . $path); 51 return $base_url . '/public/' . $path . $version;
|
/webtrees/app/Http/Middleware/ |
H A D | PublicFiles.php | 46 $path = $request->getUri()->getPath(); 47 if (str_starts_with($path, '/public/') && !str_contains($path, '..')) { 48 $file = Webtrees::ROOT_DIR . $path;
|
/webtrees/app/Contracts/ |
H A D | ImageFactoryInterface.php | 35 …public function fileResponse(FilesystemOperator $filesystem, string $path, bool $download): Respon… argument 42 string $path, argument
|
/webtrees/app/Cli/Commands/ |
H A D | CompilePoFiles.php | 66 … $php_file = dirname(path: $po_file) . '/' . basename(path: $po_file, suffix: '.po') . '.php';
|