From 1f2a408be0310c7f70df2c916424dec1a2e25d6c Mon Sep 17 00:00:00 2001 From: ken restivo Date: Wed, 18 Nov 2015 00:03:59 -0800 Subject: Use provided account_id instead of user's logged in account_id. Necessary for bulk importer. --- mod/import.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/import.php b/mod/import.php index a33cf339b..1b8bc3098 100644 --- a/mod/import.php +++ b/mod/import.php @@ -128,7 +128,7 @@ function import_account(&$a, $account_id) { } else { $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1", - intval(get_account_id()), + intval($account_id), dbesc($channel['channel_guid']) ); if($r) @@ -166,7 +166,7 @@ function import_account(&$a, $account_id) { if($data['photo']) { require_once('include/photo/photo_driver.php'); - import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],get_account_id(),$channel['channel_id']); + import_channel_photo(base64url_decode($data['photo']['data']),$data['photo']['type'],$account_id,$channel['channel_id']); } if(is_array($data['profile'])) @@ -335,7 +335,7 @@ function import_account(&$a, $account_id) { unset($abook['abook_id']); unset($abook['abook_rating']); unset($abook['abook_rating_text']); - $abook['abook_account'] = get_account_id(); + $abook['abook_account'] = $account_id; $abook['abook_channel'] = $channel['channel_id']; if(! array_key_exists('abook_blocked',$abook)) { $abook['abook_blocked'] = (($abook['abook_flags'] & 0x0001 ) ? 1 : 0); -- cgit v1.2.3 From 312cc415cec39f3b7a45f268acda5f0dd2500e3e Mon Sep 17 00:00:00 2001 From: ken restivo Date: Wed, 18 Nov 2015 00:26:18 -0800 Subject: Pass in account_id. Required for bulk identity importer. --- include/import.php | 8 ++++---- mod/import.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/import.php b/include/import.php index 0fd1ab2a5..ffaea6c1a 100644 --- a/include/import.php +++ b/include/import.php @@ -2,7 +2,7 @@ require_once('include/menu.php'); -function import_channel($channel) { +function import_channel($channel, $account_id) { if(! array_key_exists('channel_system',$channel)) { $channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0); @@ -48,7 +48,7 @@ function import_channel($channel) { } unset($channel['channel_id']); - $channel['channel_account_id'] = get_account_id(); + $channel['channel_account_id'] = $account_id; $channel['channel_primary'] = (($seize) ? 1 : 0); if($channel['channel_pageflags'] & PAGE_ALLOWCODE) { @@ -72,7 +72,7 @@ function import_channel($channel) { } $r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1", - intval(get_account_id()), + intval($account_id), $channel['channel_guid'] // Already dbesc'd ); if(! $r) { @@ -83,7 +83,7 @@ function import_channel($channel) { // reset $channel = $r[0]; - set_default_login_identity(get_account_id(),$channel['channel_id'],false); + set_default_login_identity($account_id,$channel['channel_id'],false); logger('import step 1'); $_SESSION['import_step'] = 1; ref_session_write(session_id(), serialize($_SESSION)); diff --git a/mod/import.php b/mod/import.php index 1b8bc3098..02e71233a 100644 --- a/mod/import.php +++ b/mod/import.php @@ -123,7 +123,7 @@ function import_account(&$a, $account_id) { if(array_key_exists('channel',$data)) { if($completed < 1) { - $channel = import_channel($data['channel']); + $channel = import_channel($data['channel'], $account_id); } else { -- cgit v1.2.3 From 106b3257e42b25e0e103a4d6e3cb1609a2004de6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 18 Nov 2015 02:45:22 -0800 Subject: wsod viewing photo widget --- include/widgets.php | 1 + version.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/widgets.php b/include/widgets.php index 2b1fb2859..3f8e1f18c 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -7,6 +7,7 @@ require_once('include/dir_fns.php'); require_once('include/contact_widgets.php'); +require_once('include/attach.php'); function widget_profile($args) { diff --git a/version.inc b/version.inc index b6659c788..a1de68ee0 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-17.1219 +2015-11-18.1220 -- cgit v1.2.3