aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-19 17:18:13 -0700
committerfriendica <info@friendica.com>2013-08-19 17:18:13 -0700
commit2e14dc242e552629cac5914e85096d423e6fd43c (patch)
treecc63d1a204d50c3574294ef9df92588cc1035a4b
parent20f3d097080fde4315b25523fe29b129cdd7034c (diff)
downloadvolse-hubzilla-2e14dc242e552629cac5914e85096d423e6fd43c.tar.gz
volse-hubzilla-2e14dc242e552629cac5914e85096d423e6fd43c.tar.bz2
volse-hubzilla-2e14dc242e552629cac5914e85096d423e6fd43c.zip
if changing primary hub during an import operation - remove the old xchan and create a fresh xchan pointing at this instance. Also a minor edit to increase the default photo upload limit for new sites. There aren't many cameras left that will take photos < 800k in size.
-rw-r--r--mod/import.php25
-rw-r--r--version.inc2
-rw-r--r--view/en/htconfig.tpl2
3 files changed, 27 insertions, 2 deletions
diff --git a/mod/import.php b/mod/import.php
index c98f4d2eb..08311013a 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -206,10 +206,35 @@ function import_post(&$a) {
// import xchans and contact photos
+ if($seize) {
+
+ // replace our existing xchan if we're seizing control
+
+ $r = q("delete from xchan where xchan_hash = '%s' limit 1",
+ dbesc($channel['channel_hash'])
+ );
+
+ $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_photo_date, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
+ dbesc($channel['channel_hash']),
+ dbesc($channel['channel_guid']),
+ dbesc($channel['channel_guid_sig']),
+ dbesc($channel['channel_pubkey']),
+ dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
+ dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
+ dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
+ dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
+ dbesc(z_root() . '/channel/' . $channel['channel_address']),
+ dbesc($channel['channel_name']),
+ dbesc('zot'),
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert())
+ );
+ }
$xchans = $data['xchan'];
if($xchans) {
foreach($xchans as $xchan) {
+
$r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
dbesc($xchan['xchan_hash'])
);
diff --git a/version.inc b/version.inc
index 7f9c7a59b..717abe607 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-08-18.409
+2013-08-19.410
diff --git a/view/en/htconfig.tpl b/view/en/htconfig.tpl
index 0417e9af2..3e1269441 100644
--- a/view/en/htconfig.tpl
+++ b/view/en/htconfig.tpl
@@ -64,7 +64,7 @@ $a->config['system']['max_import_size'] = 200000;
// maximum size of uploaded photos
-$a->config['system']['maximagesize'] = 800000;
+$a->config['system']['maximagesize'] = 3000000;
// Location of PHP command line processor