From 588d20649dcb1805ef86e001bd568eb0ab2fca06 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 23 Jul 2015 09:34:08 -0400 Subject: [PATCH] update for old tables --- controllers/Import.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/controllers/Import.php b/controllers/Import.php index da3d4f0..b2a38aa 100644 --- a/controllers/Import.php +++ b/controllers/Import.php @@ -753,10 +753,17 @@ private function _getPageTitleById($id) { $this->_connect(); - $sql = " - SELECT navigation_name - FROM {$this->_options['toolbox_schema']}.{$this->_options['toolbox_page_table']} - WHERE id = :id"; + if ($this->_options['toolbox_page_table'] == 'pages') { + $sql = " + SELECT navigation_name + FROM {$this->_options['toolbox_schema']}.{$this->_options['toolbox_page_table']} + WHERE id = :id"; + } else { + $sql = " + SELECT category as navigation_name + FROM {$this->_options['toolbox_schema']}.{$this->_options['toolbox_page_table']} + WHERE id = :id"; + } $stmt = $this->_dbh->prepare($sql); $stmt->bindParam(':id', $id, PDO::PARAM_INT); $stmt->execute(); -- 2.17.1