From f613ad927e12933d90486b2730282730eae82b96 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 19 Apr 2017 14:31:07 -0400 Subject: [PATCH] Updating for some older toolboxes. When toolbox had an intro field. --- controllers/ToolboxImport.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/controllers/ToolboxImport.php b/controllers/ToolboxImport.php index 573b4eb..26b57da 100644 --- a/controllers/ToolboxImport.php +++ b/controllers/ToolboxImport.php @@ -440,7 +440,10 @@ if ( $this->_options['navigation_name_in_content'] ) { $page['pageContent'] .= '

'.$page['category'].'

'; } else { - $page['title'] .= $page['category']; + $page['title'] = $page['category']; + if ( isset( $page['intro'] ) ) { + $page['pageContent'] .= '

'.$page['intro'].'

'; + } } ++$iterator; if ($page['image']) { @@ -456,7 +459,9 @@ if ( $this->_options['navigation_name_in_content'] ) { $page['pageContent'] .= '

'.$paragraph['title'].'

'; } else { - $page['title'] = $paragraph['title']; + if ($this->_options['toolbox_page_table'] == 'pages') { + $page['title'] = $paragraph['title']; + } } } if (isset($paragraph['image']) && $paragraph['image']) { @@ -1254,7 +1259,8 @@ $stmt = $this->_dbh->query($sql); while ($row = $stmt->fetch()) { echo '
' . print_r($row, true) . '
'; - $filePath = (isset($this->_options['site_uses_ht_images']) && $this->_options['site_uses_ht_images']) + $filePath = (isset($this->_options['site_uses_ht_images']) && $this->_options['site_uses_ht_images'] || + preg_match( '%uploads$%', $this->_options['toolbox_files_url'] )) ? $this->_options['toolbox_files_url'] : $this->_options['toolbox_image_url'] . '/_ORIGINAL_/'; echo '
$filePath: ' . print_r( $filePath, true ) . '
'; -- 2.17.1