protected function getListConfig()
    {
        $name = $this->getParam(0);

        if (isset($name)) {
            $result = $this->config->get($name);
            if (!isset($result)) {
                $this->errorAndExit($this->text('Invalid argument'));
            }
            $list = array($name => $result);
        } else {
            $list = $this->config->get();
            $this->limitArray($list);
        }

        $saved = $this->config->select();

        $reindexed = array();
        foreach ($list as $key => $value) {
            $reindexed[] = array(
                'key' => $key,
                'value' => $value,
                'in_database' => isset($saved[$key])
            );
        }

        return $reindexed;
    }