Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
path.php
1<?php
10
18class Path
19 extends Base
20{
21 protected $name = 'PHP';
22
23 protected function getFilters()
24 {
25 $filters = array();
26 $filters['#((?:[\\\/]|%2f|%5c)(?:\.|%2e))((?:\.|%2e)(?:[\\\/]|%2f|%5c))#is'] = $this->getSplittingString(2);
27 if(
28 (!defined('PHP_OS'))
29 || (mb_strtoupper(mb_substr(PHP_OS, 0, 3)) === 'WIN')
30 )
31 {
32 $slashes = '\\\/\x20\x22\x3c\x3e\x5c';
33 }
34 else
35 {
36 $slashes = '\\\/';
37 }
38
39 $filters['#(?:\.['.$slashes.']+){30,}#'] = ' X ';
40
41 $result = array(
42 'search' => array_keys($filters),
43 'replace' => $filters
44 );
45 return $result;
46 }
47
48}
getSplittingString($splitItemsCount=2, $customSplitChar='')
Definition base.php:137