mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-90e4f49
This commit is contained in:
@@ -55,9 +55,8 @@
|
||||
* @author Naoki Sawada
|
||||
* @license New BSD
|
||||
*/
|
||||
class elFinderPluginNormalizer
|
||||
class elFinderPluginNormalizer extends elFinderPlugin
|
||||
{
|
||||
private $opts = array();
|
||||
private $replaced = array();
|
||||
private $keyMap = array(
|
||||
'ls' => 'intersect',
|
||||
@@ -77,7 +76,7 @@ class elFinderPluginNormalizer
|
||||
}
|
||||
|
||||
public function cmdPreprocess($cmd, &$args, $elfinder, $volume) {
|
||||
$opts = $this->getOpts($volume);
|
||||
$opts = $this->getCurrentOpts($volume);
|
||||
if (! $opts['enable']) {
|
||||
return false;
|
||||
}
|
||||
@@ -114,7 +113,7 @@ class elFinderPluginNormalizer
|
||||
}
|
||||
|
||||
public function onUpLoadPreSave(&$path, &$name, $src, $elfinder, $volume) {
|
||||
$opts = $this->getOpts($volume);
|
||||
$opts = $this->getCurrentOpts($volume);
|
||||
if (! $opts['enable']) {
|
||||
return false;
|
||||
}
|
||||
@@ -126,17 +125,6 @@ class elFinderPluginNormalizer
|
||||
return true;
|
||||
}
|
||||
|
||||
private function getOpts($volume) {
|
||||
$opts = $this->opts;
|
||||
if (is_object($volume)) {
|
||||
$volOpts = $volume->getOptionsPlugin('Normalizer');
|
||||
if (is_array($volOpts)) {
|
||||
$opts = array_merge($this->opts, $volOpts);
|
||||
}
|
||||
}
|
||||
return $opts;
|
||||
}
|
||||
|
||||
private function normalize($str, $opts) {
|
||||
if ($opts['nfc'] || $opts['nfkc']) {
|
||||
if (class_exists('Normalizer', false)) {
|
||||
|
||||
Reference in New Issue
Block a user