@@ 122-132 (lines=11) @@ | ||
119 | } |
|
120 | ||
121 | // NOTE: $thash is directory hash so it unneed to process at here |
|
122 | public function onUpLoadPreSave(&$thash, &$name, $src, $elfinder, $volume) |
|
123 | { |
|
124 | $opts = $this->getCurrentOpts($volume); |
|
125 | if (! $opts['enable']) { |
|
126 | return false; |
|
127 | } |
|
128 | ||
129 | $name = $this->normalize($name, $opts); |
|
130 | ||
131 | return true; |
|
132 | } |
|
133 | ||
134 | private function normalize($str, $opts) |
|
135 | { |
@@ 109-119 (lines=11) @@ | ||
106 | } |
|
107 | ||
108 | // NOTE: $thash is directory hash so it unneed to process at here |
|
109 | public function onUpLoadPreSave(&$thash, &$name, $src, $elfinder, $volume) |
|
110 | { |
|
111 | $opts = $this->getCurrentOpts($volume); |
|
112 | if (! $opts['enable']) { |
|
113 | return false; |
|
114 | } |
|
115 | ||
116 | $name = $this->sanitizeFileName($name, $opts); |
|
117 | ||
118 | return true; |
|
119 | } |
|
120 | ||
121 | private function sanitizeFileName($filename, $opts, $allows = []) |
|
122 | { |