src build elFinder-2.1-90e4f49

This commit is contained in:
nao-pon
2016-12-15 00:27:13 +09:00
parent 2a7bbef823
commit afa6a6ef93
10 changed files with 90 additions and 78 deletions
+3 -15
View File
@@ -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)) {