From ec359e9c92ee414375e90eb626b04a03c2ce66ab Mon Sep 17 00:00:00 2001 From: Ben Stewart Date: Wed, 9 Nov 2022 23:20:47 -0600 Subject: [PATCH] comment --- src/DrillConnection.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DrillConnection.php b/src/DrillConnection.php index de39f3a..c2d95f4 100644 --- a/src/DrillConnection.php +++ b/src/DrillConnection.php @@ -763,9 +763,9 @@ public function getGSTitle(string $pluginName, string $spreadsheetId): string $title = ''; try { - $result = $this->query("SELECT _title AS title FROM `{$pluginName}`.`{$spreadsheetId}`.`tab[0]` LIMIT 1")->getRows(); - if (count($result) == 1 && isset($result->title)) { - $title = $result->title; + $rows = $this->query("SELECT _title AS title FROM `{$pluginName}`.`{$spreadsheetId}`.`tab[0]` LIMIT 1")->getRows(); + if (count($rows) == 1 && isset($rows[0]->title)) { + $title = $rows[0]->title; } } catch (\Exception $e) { $this->logMessage(LogType::Error, $e->getMessage()); @@ -1317,7 +1317,7 @@ public function getNestedTree(string $pluginName, ...$pathItems): array $results = []; foreach ($list as $name) { $results[] = new Schema(['plugin' => $pluginName, 'name' => $name]); - $results['title'] = $this->getGSTitle($pluginName, $name); + // TODO: implement getGSTitle($pluginName, $name) } } elseif ($itemCount == 1) { $results = $this->getSheets($pluginName, $filePath, $pluginType);