diff --git a/assets/snippets/DocLister/snippet.DLvaluelist.php b/assets/snippets/DocLister/snippet.DLvaluelist.php deleted file mode 100644 index 80c45d3ff4..0000000000 --- a/assets/snippets/DocLister/snippet.DLvaluelist.php +++ /dev/null @@ -1,49 +0,0 @@ -event->params; -if (! is_array($p)) { - $p = array(); -} - -$titleField = APIhelpers::getkey($p, 'titleField', 'pagetitle'); -$valueField = APIhelpers::getkey($p, 'valueField', 'id'); - -$p = array_merge( - array( - 'idType' => 'parents', - 'valueField' => $valueField, - 'titleField' => $titleField, - 'api' => implode(",", array($titleField, $valueField)), - 'controller' => 'site_content', - 'debug' => '0' - ), - $p -); - -$json = $modx->runSnippet("DocLister", $p); -$json = jsonHelper::jsonDecode($json, array('assoc' => true)); -$out = array(); - -$nopTitle = APIhelpers::getkey($p, 'addNopTitle'); -if ($nopTitle) { - $nopValue = APIhelpers::getkey($p, 'addNopValue'); - $out[] = $nopTitle . '==' . $nopValue; -} - -foreach ($json as $el) { - $out[] = APIhelpers::getkey($el, $titleField) . '==' . APIhelpers::getkey($el, $valueField); -} -if (APIhelpers::getkey($p, 'debug')) { - $key = APIhelpers::getkey($p, 'sysKey', 'dl') . '.debug'; - $debugStack = $modx->getPlaceholder($key); - if (! empty($debugStack)) { - $modx->logEvent(0, 1, $debugStack, 'DocLister [DLValueList]'); - } -} - -return implode("||", $out);