From 1f085802ac72bcb4baa2938a71012df1fd44cd3a Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 8 Nov 2016 10:23:43 -0500 Subject: [PATCH] Update code for files This now will get files within the page content. --- controllers/ToolboxImport.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/ToolboxImport.php b/controllers/ToolboxImport.php index 43e5d6d..db2929a 100644 --- a/controllers/ToolboxImport.php +++ b/controllers/ToolboxImport.php @@ -358,11 +358,14 @@ { $this->_connect(); $WHERE = $this->_getWhereSql(); + $WHERE = " WHERE id = 10"; $pageSql = " SELECT * FROM {$this->_options['toolbox_schema']}.{$this->_options['toolbox_page_table']} $WHERE ORDER BY parent,pos"; + $pageSql .= " LIMIT 1 OFFSET 0"; + echo '
$pageSql: ' . print_r( $pageSql, true ) . '
'; //$pageSql .= ($limit) ? " LIMIT $limit OFFSET $offset" : ''; $pageData = $this->_dbh->query($pageSql)->fetchAll(PDO::FETCH_ASSOC); if ($this->_options['toolbox_page_table'] == 'pages') { @@ -495,7 +498,7 @@ $fileStmt->execute(); while ($file = $fileStmt->fetch()) { echo '
$file: ' . print_r($file, true) . '
'; - if ($this->_options['toolbox_files_table'] == 'pages') { + if ($this->_options['toolbox_files_table'] == 'files') { $page['pageContent'] .= $this->_displayFile($file); } else { if ($file['file']) { -- 2.17.1