From: Steve Sutton Date: Thu, 23 Jul 2015 13:34:08 +0000 (-0400) Subject: update for old tables X-Git-Tag: v0.0.2^2~23 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=588d20649dcb1805ef86e001bd568eb0ab2fca06;p=WP-Plugins%2Fglm-wp-importer.git update for old tables --- 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();