aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Webpages.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-08-17 21:25:50 -0400
committerAndrew Manning <tamanning@zoho.com>2016-08-17 21:25:50 -0400
commitf2e87a204d0a257edb501dfedaad867700c58842 (patch)
treeadf61dd77dedbb332c5e48fe0e297da54047d7f8 /Zotlabs/Module/Webpages.php
parentc98b91f5149d53f522a19ec0f69b4d4727d34896 (diff)
downloadvolse-hubzilla-f2e87a204d0a257edb501dfedaad867700c58842.tar.gz
volse-hubzilla-f2e87a204d0a257edb501dfedaad867700c58842.tar.bz2
volse-hubzilla-f2e87a204d0a257edb501dfedaad867700c58842.zip
Progress implementing zip file export
Diffstat (limited to 'Zotlabs/Module/Webpages.php')
-rw-r--r--Zotlabs/Module/Webpages.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/Zotlabs/Module/Webpages.php b/Zotlabs/Module/Webpages.php
index 0a48d43c6..439d60a89 100644
--- a/Zotlabs/Module/Webpages.php
+++ b/Zotlabs/Module/Webpages.php
@@ -62,6 +62,16 @@ class Webpages extends \Zotlabs\Web\Controller {
case 'importselected':
$_SESSION['action'] = null;
break;
+ case 'export_select_list':
+ $_SESSION['action'] = null;
+ $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'
+ ));
+ $_SESSION['export'] = null;
+ return $o;
+
default :
$_SESSION['action'] = null;
break;
@@ -233,7 +243,7 @@ class Webpages extends \Zotlabs\Web\Controller {
}
function post() {
-
+ logger(json_encode($_REQUEST), LOGGER_DEBUG);
$action = $_REQUEST['action'];
if( $action ){
switch ($action) {
@@ -382,7 +392,19 @@ class Webpages extends \Zotlabs\Web\Controller {
info( t('Import complete.') . EOL);
}
break;
-
+
+ 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');
+ } else {
+ $filename = 'website.zip';
+ }
+ }
default :
break;
}