allowing to specify cleanup as string or array
This commit is contained in:
3
init.php
3
init.php
@ -118,6 +118,9 @@ class Af_Feedmod extends Plugin implements IHandler
|
||||
if ($basenode) {
|
||||
// remove nodes from cleanup configuration
|
||||
if (isset($config['cleanup'])) {
|
||||
if (!is_array($config['cleanup']) {
|
||||
$config['cleanup'] = array($config['cleanup']);
|
||||
}
|
||||
foreach ($config['cleanup'] as $cleanup) {
|
||||
$nodelist = $xpath->query('//'.$cleanup, $basenode);
|
||||
foreach ($nodelist as $node) {
|
||||
|
Reference in New Issue
Block a user