From c67cb5a407de1e80bf5a95f331b485f3aef78af7 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 15 Jul 2015 15:54:06 -0400 Subject: [PATCH] update --- controllers/Import.php | 14 ++++++++++++-- index.php | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/controllers/Import.php b/controllers/Import.php index 92927d0..509aeef 100644 --- a/controllers/Import.php +++ b/controllers/Import.php @@ -517,8 +517,7 @@ private function _import() { echo '

Fetching Pages

'; - $postarr = unserialize(stripslashes($_REQUEST['postsarr'])); - $this->_post = $postarr; + $this->_post = get_option(GLM_WP_IMPORT_POST_OPTION, array()); // grab all pages and build the post array $start = filter_var($_REQUEST['start'], FILTER_VALIDATE_INT); $pages = $this->_fetchAllPages(PAGES_PER_LOAD, $start); @@ -569,9 +568,15 @@ } } } + $this->_storePost(); return $numPagesImported; } + private function _storePost() + { + update_option(GLM_WP_IMPORT_POST_OPTION, $this->_post); + } + private function _replaceKeywords() { global $wpdb; @@ -693,6 +698,11 @@ } switch($step) { case 0: + $post = 'a%3A70%3A{i%3A1%3Bi%3A1099%3Bi%3A9%3Bi%3A1100%3Bi%3A6%3Bi%3A1101%3Bi%3A17%3Bi%3A1102%3Bi%3A138%3Bi%3A1103%3Bi%3A24%3Bi%3A1120%3Bi%3A137%3Bi%3A1121%3Bi%3A139%3Bi%3A1122%3Bi%3A2%3Bi%3A1123%3Bi%3A27%3Bi%3A1124%3Bi%3A28%3Bi%3A1183%3Bi%3A41%3Bi%3A1184%3Bi%3A113%3Bi%3A1185%3Bi%3A53%3Bi%3A1186%3Bi%3A228%3Bi%3A1187%3Bi%3A232%3Bi%3A1206%3Bi%3A230%3Bi%3A1207%3Bi%3A231%3Bi%3A1208%3Bi%3A233%3Bi%3A1209%3Bi%3A237%3Bi%3A1210%3Bi%3A238%3Bi%3A1223%3Bi%3A188%3Bi%3A1224%3Bi%3A315%3Bi%3A1225%3Bi%3A186%3Bi%3A1226%3Bi%3A339%3Bi%3A1227%3Bi%3A269%3Bi%3A1249%3Bi%3A87%3Bi%3A1250%3Bi%3A133%3Bi%3A1251%3Bi%3A145%3Bi%3A1252%3Bi%3A150%3Bi%3A1253%3Bi%3A240%3Bi%3A1283%3Bi%3A85%3Bi%3A1284%3Bi%3A50%3Bi%3A1285%3Bi%3A361%3Bi%3A1286%3Bi%3A325%3Bi%3A1287%3Bi%3A354%3Bi%3A1296%3Bi%3A338%3Bi%3A1297%3Bi%3A331%3Bi%3A1298%3Bi%3A356%3Bi%3A1299%3Bi%3A316%3Bi%3A1300%3Bi%3A301%3Bi%3A1473%3Bi%3A353%3Bi%3A1474%3Bi%3A324%3Bi%3A1475%3Bi%3A291%3Bi%3A1476%3Bi%3A267%3Bi%3A1477%3Bi%3A45%3Bi%3A1499%3Bi%3A46%3Bi%3A1500%3Bi%3A47%3Bi%3A1501%3Bi%3A48%3Bi%3A1502%3Bi%3A176%3Bi%3A1503%3Bi%3A105%3Bi%3A1532%3Bi%3A184%3Bi%3A1533%3Bi%3A15%3Bi%3A1534%3Bi%3A223%3Bi%3A1535%3Bi%3A224%3Bi%3A1536%3Bi%3A225%3Bi%3A1581%3Bi%3A362%3Bi%3A1582%3Bi%3A359%3Bi%3A1583%3Bi%3A358%3Bi%3A1584%3Bi%3A355%3Bi%3A1585%3Bi%3A352%3Bi%3A1630%3Bi%3A351%3Bi%3A1631%3Bi%3A350%3Bi%3A1632%3Bi%3A348%3Bi%3A1633%3Bi%3A346%3Bi%3A1634%3Bi%3A345%3Bi%3A1679%3Bi%3A344%3Bi%3A1680%3Bi%3A343%3Bi%3A1681%3Bi%3A342%3Bi%3A1682%3Bi%3A341%3Bi%3A1683%3B}'; + $this->_post = unserialize(urldecode($post)); + $this->_storePost(); + $posted = get_option(GLM_WP_IMPORT_POST_OPTION, array()); + echo '
'.print_r($posted, true).'
'; $this->_greet(); $this->_readOptions(); echo '

Begin Import

'; diff --git a/index.php b/index.php index db6b44d..babe773 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,7 @@ define('GLM_WP_IMPORT_SETTINGS', 'glm_wp_import_settings'); define('GLM_WP_IMPORT_CAPABILITY', 'manage_options'); define('GLM_WP_IMPORT_OPTION_GROUP', 'glmwp_import_group'); +define('GLM_WP_IMPORT_POST_OPTION', 'glmwp_import_posts'); if (is_admin()) { require_once 'controllers/Admin.php'; -- 2.17.1