From 1c44ae4ea4f6ea4eddca1eb45e3dd4a71172e8d2 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 2 Apr 2015 09:26:29 +0000 Subject: [PATCH] accept single item in backup_config_section_xmlrpc --- src/etc/inc/xmlrpc/legacy.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/xmlrpc/legacy.inc b/src/etc/inc/xmlrpc/legacy.inc index da5b76c8e..da5980f25 100644 --- a/src/etc/inc/xmlrpc/legacy.inc +++ b/src/etc/inc/xmlrpc/legacy.inc @@ -278,6 +278,11 @@ function backup_config_section_xmlrpc($sectionKeys) { global $config; require_once("config.inc"); - - return array_intersect_key($config, array_flip($sectionKeys)); + if (!is_array($sectionKeys)) { + // single item + return array_intersect_key($config, array($sectionKeys => 0)); + } else { + // backup more sections at once + return array_intersect_key($config, array_flip($sectionKeys)); + } }