update for old tables
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 23 Jul 2015 13:34:08 +0000 (09:34 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 23 Jul 2015 13:34:08 +0000 (09:34 -0400)
controllers/Import.php

index da3d4f0..b2a38aa 100644 (file)
         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();