aboutsummaryrefslogtreecommitdiffstats
path: root/include/identity.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-18 16:01:14 -0800
committerfriendica <info@friendica.com>2013-01-18 16:01:14 -0800
commit65542460456a13b8619c1175ed8a5b0d9a1acc83 (patch)
tree92714372742b14035e3892f23101fe6409bc2af1 /include/identity.php
parent4734e2ea8731ce51e44aac4065430445d3146845 (diff)
downloadvolse-hubzilla-65542460456a13b8619c1175ed8a5b0d9a1acc83.tar.gz
volse-hubzilla-65542460456a13b8619c1175ed8a5b0d9a1acc83.tar.bz2
volse-hubzilla-65542460456a13b8619c1175ed8a5b0d9a1acc83.zip
add versioning info to basic identity export, create skeleton function for import
Diffstat (limited to 'include/identity.php')
-rw-r--r--include/identity.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php
index 94de192c6..a66929b63 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -201,6 +201,9 @@ function identity_basic_export($channel_id) {
*/
$ret = array();
+
+ $ret['compatibility'] = array('project' => FRIENDICA_PLATFORM, 'version' => FRIENDICA_VERSION, 'database' => DB_UPDATE_VERSION);
+
$r = q("select * from channel where channel_id = %d limit 1",
intval($channel_id)
);
@@ -240,4 +243,49 @@ function identity_basic_export($channel_id) {
+function identity_basic_import($arr, $seize_primary = false) {
+
+ $ret = array('result' => false );
+
+ if($arr['channel']) {
+ // import channel
+
+ // create a new xchan (if necessary)
+
+ // create a new hubloc and seize control if applicable
+
+
+ }
+ if($arr['profile']) {
+ // FIXME - change profile assignment to a hash instead of an id we have to fix
+
+
+ }
+
+ if($arr['xchan']) {
+
+ // import any xchan and hubloc which are not yet available on this site
+ // Unset primary for all other hubloc on our own record if $seize_primary
+
+
+ }
+
+ if($arr['abook']) {
+ // import the abook entries
+
+
+ }
+
+
+ if($seize_primary) {
+
+ // send a refresh message to all our friends, telling them we've moved
+
+ }
+
+
+ $ret['result'] = true ;
+ return $ret;
+
+} \ No newline at end of file