diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-08-19 19:32:52 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-08-19 19:32:52 -0400 |
commit | 40a7d3821098c095a01e2a30b2b49c53bb38e2cf (patch) | |
tree | d5b9ba8b822752911b5a325a68b9fb8f1edf3dae /Zotlabs | |
parent | f2e87a204d0a257edb501dfedaad867700c58842 (diff) | |
download | volse-hubzilla-40a7d3821098c095a01e2a30b2b49c53bb38e2cf.tar.gz volse-hubzilla-40a7d3821098c095a01e2a30b2b49c53bb38e2cf.tar.bz2 volse-hubzilla-40a7d3821098c095a01e2a30b2b49c53bb38e2cf.zip |
Pages populate the available-to-export list. New checkbox class for smaller boxes.
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Webpages.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php index 439d60a89..b927f95df 100644 --- a/Zotlabs/Module/Webpages.php +++ b/Zotlabs/Module/Webpages.php @@ -41,7 +41,6 @@ class Webpages extends \Zotlabs\Web\Controller { $uid = local_channel(); $owner = 0; - $channel = null; $observer = \App::get_observer(); $channel = \App::get_channel(); @@ -64,10 +63,19 @@ class Webpages extends \Zotlabs\Web\Controller { break; case 'export_select_list': $_SESSION['action'] = null; + if(!$uid) { + $_SESSION['export'] = null; + break; + } + require_once('include/import.php'); + + $elements = get_webpage_elements($channel, 'pages'); + logger(json_encode($elements), LOGGER_DEBUG); $o .= replace_macros(get_markup_template('webpage_export_list.tpl'), array( '$title' => t('Export Webpage Elements'), '$exportbtn' => t('Export selected'), '$action' => $_SESSION['export'], // value should be 'zipfile' or 'cloud' + '$pages' => $elements['pages'], )); $_SESSION['export'] = null; return $o; @@ -243,7 +251,6 @@ class Webpages extends \Zotlabs\Web\Controller { } function post() { - logger(json_encode($_REQUEST), LOGGER_DEBUG); $action = $_REQUEST['action']; if( $action ){ switch ($action) { @@ -396,11 +403,10 @@ class Webpages extends \Zotlabs\Web\Controller { case 'exportzipfile': if(isset($_POST['w_download'])) { - logger($_POST['w_download'], LOGGER_DEBUG); $_SESSION['action'] = 'export_select_list'; $_SESSION['export'] = 'zipfile'; if(isset($_POST['filename'])) { - $filename = filter_var($_POST['filename'], 'FILTER_SANITIZE_ENCODED'); + $filename = filter_var($_POST['filename'], FILTER_SANITIZE_ENCODED); } else { $filename = 'website.zip'; } |