Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/php
File: elFinderPlugin.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* elFinder Plugin Abstract
[3] Fix | Delete
*
[4] Fix | Delete
* @package elfinder
[5] Fix | Delete
* @author Naoki Sawada
[6] Fix | Delete
* @license New BSD
[7] Fix | Delete
*/
[8] Fix | Delete
class elFinderPlugin
[9] Fix | Delete
{
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* This plugin's options
[13] Fix | Delete
*
[14] Fix | Delete
* @var array
[15] Fix | Delete
*/
[16] Fix | Delete
protected $opts = array();
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Get current volume's options
[20] Fix | Delete
*
[21] Fix | Delete
* @param object $volume
[22] Fix | Delete
*
[23] Fix | Delete
* @return array options
[24] Fix | Delete
*/
[25] Fix | Delete
protected function getCurrentOpts($volume)
[26] Fix | Delete
{
[27] Fix | Delete
$name = substr(get_class($this), 14); // remove "elFinderPlugin"
[28] Fix | Delete
$opts = $this->opts;
[29] Fix | Delete
if (is_object($volume)) {
[30] Fix | Delete
$volOpts = $volume->getOptionsPlugin($name);
[31] Fix | Delete
if (is_array($volOpts)) {
[32] Fix | Delete
$opts = array_merge($opts, $volOpts);
[33] Fix | Delete
}
[34] Fix | Delete
}
[35] Fix | Delete
return $opts;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* Is enabled with options
[40] Fix | Delete
*
[41] Fix | Delete
* @param array $opts
[42] Fix | Delete
* @param elFinder $elfinder
[43] Fix | Delete
*
[44] Fix | Delete
* @return boolean
[45] Fix | Delete
*/
[46] Fix | Delete
protected function iaEnabled($opts, $elfinder = null)
[47] Fix | Delete
{
[48] Fix | Delete
if (!$opts['enable']) {
[49] Fix | Delete
return false;
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
// check post var 'contentSaveId' to disable this plugin
[53] Fix | Delete
if ($elfinder && !empty($opts['disableWithContentSaveId'])) {
[54] Fix | Delete
$session = $elfinder->getSession();
[55] Fix | Delete
$urlContentSaveIds = $session->get('urlContentSaveIds', array());
[56] Fix | Delete
if (!empty(elFinder::$currentArgs['contentSaveId']) && ($contentSaveId = elFinder::$currentArgs['contentSaveId'])) {
[57] Fix | Delete
if (!empty($urlContentSaveIds[$contentSaveId])) {
[58] Fix | Delete
$elfinder->removeUrlContentSaveId($contentSaveId);
[59] Fix | Delete
return false;
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
if (isset($opts['onDropWith']) && !is_null($opts['onDropWith'])) {
[65] Fix | Delete
// plugin disabled by default, enabled only if given key is pressed
[66] Fix | Delete
if (isset($_REQUEST['dropWith']) && $_REQUEST['dropWith']) {
[67] Fix | Delete
$onDropWith = $opts['onDropWith'];
[68] Fix | Delete
$action = (int)$_REQUEST['dropWith'];
[69] Fix | Delete
if (!is_array($onDropWith)) {
[70] Fix | Delete
$onDropWith = array($onDropWith);
[71] Fix | Delete
}
[72] Fix | Delete
foreach ($onDropWith as $key) {
[73] Fix | Delete
$key = (int)$key;
[74] Fix | Delete
if (($action & $key) === $key) {
[75] Fix | Delete
return true;
[76] Fix | Delete
}
[77] Fix | Delete
}
[78] Fix | Delete
}
[79] Fix | Delete
return false;
[80] Fix | Delete
}
[81] Fix | Delete
[82] Fix | Delete
if (isset($opts['offDropWith']) && !is_null($opts['offDropWith']) && isset($_REQUEST['dropWith'])) {
[83] Fix | Delete
// plugin enabled by default, disabled only if given key is pressed
[84] Fix | Delete
$offDropWith = $opts['offDropWith'];
[85] Fix | Delete
$action = (int)$_REQUEST['dropWith'];
[86] Fix | Delete
if (!is_array($offDropWith)) {
[87] Fix | Delete
$offDropWith = array($offDropWith);
[88] Fix | Delete
}
[89] Fix | Delete
$res = true;
[90] Fix | Delete
foreach ($offDropWith as $key) {
[91] Fix | Delete
$key = (int)$key;
[92] Fix | Delete
if ($key === 0) {
[93] Fix | Delete
if ($action === 0) {
[94] Fix | Delete
$res = false;
[95] Fix | Delete
break;
[96] Fix | Delete
}
[97] Fix | Delete
} else {
[98] Fix | Delete
if (($action & $key) === $key) {
[99] Fix | Delete
$res = false;
[100] Fix | Delete
break;
[101] Fix | Delete
}
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
if (!$res) {
[105] Fix | Delete
return false;
[106] Fix | Delete
}
[107] Fix | Delete
}
[108] Fix | Delete
[109] Fix | Delete
return true;
[110] Fix | Delete
}
[111] Fix | Delete
}
[112] Fix | Delete
[113] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function