From 647a87ac8bd09b3a3bc5451886b6d4a6ab8d1bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerry=20Wei=C3=9Fbach?= Date: Fri, 7 Jul 2023 12:06:42 +0200 Subject: [PATCH] Update Logging, fix export issue with depth=0 Previously iut allways fell back to the root index instead of the namespace index. --- action/ajax.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/action/ajax.php b/action/ajax.php index f380121..8eca95b 100644 --- a/action/ajax.php +++ b/action/ajax.php @@ -350,7 +350,7 @@ private function __get_siteexport_list($NS, $overrideCache = false) { $PAGE = ""; $NS = $this->namespace = $this->functions->getNamespaceFromID($NS, $PAGE); - $this->functions->debug->message("ROOT Namespace to export from: '{$NS}' / {$this->namespace}", null, 1); + $this->functions->debug->message("ROOT Namespace to export from: '{$NS}' / {$this->namespace}", null, 2); $depth = $this->getConf('depth'); $query = ''; @@ -358,7 +358,7 @@ private function __get_siteexport_list($NS, $overrideCache = false) { switch ($INPUT->int('depthType')) { case 0: - $query = $this->functions->cleanID(str_replace(":", "/", $NS . ':' . $PAGE)); + $PAGE = $this->functions->cleanID(str_replace(":", "/", $NS . ':' . $PAGE)); $NS = (new PageResolver($NS))->resolveId($PAGE); $exists = page_exists($NS); @@ -370,7 +370,8 @@ private function __get_siteexport_list($NS, $overrideCache = false) { { return array(); } - + + $this->functions->debug->message("Exporting the following sites: ", $data, 2); return $data; } else { // Does not exist, try next case