use explode instead of deprecated split
This commit is contained in:
14
syntax.php
14
syntax.php
@@ -66,12 +66,12 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
$match = substr($match, 2, -2);
|
$match = substr($match, 2, -2);
|
||||||
list($type, $match) = split('>', $match, 2);
|
list($type, $match) = explode('>', $match, 2);
|
||||||
list($pattern, $flags) = split('&', $match, 2);
|
list($pattern, $flags) = explode('&', $match, 2);
|
||||||
|
|
||||||
if ($type == 'filename') {
|
if ($type == 'filename') {
|
||||||
if (strpos($flags, '|') !== FALSE) {
|
if (strpos($flags, '|') !== FALSE) {
|
||||||
list($flags, $title) = split('\|', $flags);
|
list($flags, $title) = explode('\|', $flags);
|
||||||
} else {
|
} else {
|
||||||
$title = '';
|
$title = '';
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
// load default config options
|
// load default config options
|
||||||
$flags = $this->getConf('defaults').'&'.$flags;
|
$flags = $this->getConf('defaults').'&'.$flags;
|
||||||
|
|
||||||
$flags = split('&', $flags);
|
$flags = explode('&', $flags);
|
||||||
$params = array(
|
$params = array(
|
||||||
'sort' => 'name',
|
'sort' => 'name',
|
||||||
'order' => 'asc',
|
'order' => 'asc',
|
||||||
@@ -97,7 +97,7 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
'cache' => 0,
|
'cache' => 0,
|
||||||
);
|
);
|
||||||
foreach($flags as $flag) {
|
foreach($flags as $flag) {
|
||||||
list($name, $value) = split('=', $flag);
|
list($name, $value) = explode('=', $flag);
|
||||||
$params[trim($name)] = trim($value);
|
$params[trim($name)] = trim($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
global $conf;
|
global $conf;
|
||||||
global $ID;
|
global $ID;
|
||||||
|
|
||||||
$allowed_absolute_paths = split(',', $this->getConf('allowed_absolute_paths'));
|
$allowed_absolute_paths = explode(',', $this->getConf('allowed_absolute_paths'));
|
||||||
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'files' => array(),
|
'files' => array(),
|
||||||
@@ -429,7 +429,7 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// match pattern aginst allowed paths
|
// match pattern aginst allowed paths
|
||||||
$web_paths = split(',', $this->getConf('web_paths'));
|
$web_paths = explode(',', $this->getConf('web_paths'));
|
||||||
$basedir = false;
|
$basedir = false;
|
||||||
$webdir = false;
|
$webdir = false;
|
||||||
if (count($allowed_absolute_paths) == count($web_paths)) {
|
if (count($allowed_absolute_paths) == count($web_paths)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user