diff options
author | friendica <info@friendica.com> | 2012-10-29 20:47:56 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-10-29 20:47:56 -0700 |
commit | f608373d084eea8d34adc48ef50c7392903b51be (patch) | |
tree | 9fea00c3b0e8cc621a751be0954bda506fc3f988 /include | |
parent | 1a6415807ebf9ae859134c99eb64a90d7363747a (diff) | |
download | volse-hubzilla-f608373d084eea8d34adc48ef50c7392903b51be.tar.gz volse-hubzilla-f608373d084eea8d34adc48ef50c7392903b51be.tar.bz2 volse-hubzilla-f608373d084eea8d34adc48ef50c7392903b51be.zip |
fixing broken things again after the latest round of ripping out the yellow slime and replacing it with red slime.
Diffstat (limited to 'include')
-rw-r--r-- | include/ConversationObject.php | 2 | ||||
-rw-r--r-- | include/ItemObject.php | 6 | ||||
-rw-r--r-- | include/identity.php | 13 |
3 files changed, 16 insertions, 5 deletions
diff --git a/include/ConversationObject.php b/include/ConversationObject.php index d9a3974eb..6448cd632 100644 --- a/include/ConversationObject.php +++ b/include/ConversationObject.php @@ -38,7 +38,7 @@ class Conversation extends BaseObject { $this->profile_owner = local_user(); $this->writable = true; break; - case 'profile': + case 'channel': $this->profile_owner = $a->profile['profile_uid']; $this->writable = can_write_wall($a,$this->profile_owner); break; diff --git a/include/ItemObject.php b/include/ItemObject.php index 84f45054f..8a7bdea3a 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -454,7 +454,7 @@ class Item extends BaseObject { if($conv) { // This will allow us to comment on wall-to-wall items owned by our friends // and community forums even if somebody else wrote the post. - return ($this->writable || ($this->is_visiting() && $conv->get_mode() == 'profile')); + return ($this->writable || ($this->is_visiting() && $conv->get_mode() == 'channel')); } return $this->writable; } @@ -515,7 +515,7 @@ class Item extends BaseObject { '$return_path' => '', '$threaded' => $this->is_threaded(), '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''), - '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'), + '$type' => (($conv->get_mode() === 'channel') ? 'wall-comment' : 'net-comment'), '$id' => $this->get_id(), '$parent' => $this->get_id(), '$qcomment' => $qcomment, @@ -556,7 +556,7 @@ class Item extends BaseObject { $this->wall_to_wall = false; if($this->is_toplevel()) { - if( (! $this->get_data_value('self')) && ($conv->get_mode() !== 'profile')) { + if( (! $this->get_data_value('self')) && ($conv->get_mode() !== 'channel')) { if($this->get_data_value('wall')) { // On the network page, I am the owner. On the display page it will be the profile owner. diff --git a/include/identity.php b/include/identity.php index 21cecaabc..7b0b86ee4 100644 --- a/include/identity.php +++ b/include/identity.php @@ -130,7 +130,7 @@ function create_identity($arr) { // It's ok for this to fail if it's an imported channel, and therefore the hash is a duplicate - $r = q("INSERT INTO `profile` ( `aid`, `uid`, `profile_guid`, `profile_name`, `is_default`, `name`, `photo`, `thumb`) + $r = q("INSERT INTO profile ( aid, uid, profile_guid, profile_name, is_default, name, photo, thumb) VALUES ( %d, %d, '%s', '%s', %d, '%s', '%s', '%s') ", intval($ret['channel']['channel_account_id']), intval($newuid), @@ -142,6 +142,17 @@ function create_identity($arr) { dbesc($a->get_baseurl() . "/photo/profile/m/{$newuid}") ); + $r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_closeness, abook_created, abook_updated, abook_flags ) + values ( %d, %d, '%s', %d, '%s', '%s', %d ) ", + intval($ret['channel']['channel_account_id']), + intval($newuid), + dbesc($hash), + intval(0), + dbesc(datetime_convert()), + dbesc(datetime_convert()), + intval(ABOOK_FLAG_SELF) + ); + // Create a group with no members. This allows somebody to use it // right away as a default group for new contacts. |