Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Stewart committed Nov 10, 2022
1 parent 39fa5a0 commit ec359e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DrillConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ec359e9

Please sign in to comment.