aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/exporttest/index.php6
-rw-r--r--mod/exporttest/views/default/exporttest/main.php8
2 files changed, 14 insertions, 0 deletions
diff --git a/mod/exporttest/index.php b/mod/exporttest/index.php
index 0a4aea8cd..e057ab094 100644
--- a/mod/exporttest/index.php
+++ b/mod/exporttest/index.php
@@ -13,6 +13,12 @@
{
echo elgg_view("exporttest/outputxml", array("xml" => export($guid)));
}
+ else if ($action=='import')
+ {
+ $body = import(get_input('xml'));
+ $body .= elgg_view("exporttest/main", array("owner_id" => $owner_id));
+ page_draw("Import results",$body);
+ }
else
{
$body = elgg_view("exporttest/main", array("owner_id" => $owner_id));
diff --git a/mod/exporttest/views/default/exporttest/main.php b/mod/exporttest/views/default/exporttest/main.php
index 0d24df3fe..01b5adac4 100644
--- a/mod/exporttest/views/default/exporttest/main.php
+++ b/mod/exporttest/views/default/exporttest/main.php
@@ -1,4 +1,12 @@
<form>
<input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>" />
GUID : <input type="text" value="" name="guid" /> <input type="submit" name="export" value="export" />
+</form>
+
+<form>
+ <input type="hidden" name="owner_id" value="<?php echo $vars['owner_id']; ?>" />
+ <input type="hidden" name="action" value="import" />
+ IMPORT :
+ <textarea name="xml" cols="50" rows="10"></textarea>
+ <input type="submit" name="import" value="import" />
</form> \ No newline at end of file