aboutsummaryrefslogtreecommitdiff
path: root/mod/exporttest
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-01 14:10:19 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-01 14:10:19 +0000
commitb8c26d7300e672f90cc1c1a62e4a1ea0c67e4a09 (patch)
tree230c31e03e833703e4d02c03b9eda3e7b25d838a /mod/exporttest
parent37a3f9abb2520d15ddec79e98c5597c84b1980cf (diff)
downloadelgg-b8c26d7300e672f90cc1c1a62e4a1ea0c67e4a09.tar.gz
elgg-b8c26d7300e672f90cc1c1a62e4a1ea0c67e4a09.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Added import block git-svn-id: https://code.elgg.org/elgg/trunk@306 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/exporttest')
-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