fixes to thing profile assignments
This commit is contained in:
parent
9498ed17ab
commit
b5728fa42e
@ -5,7 +5,7 @@ function contact_profile_assign($current) {
|
|||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$o .= "<select id=\"contact-profile-selector\" name=\"profile-assign\" />\r\n";
|
$o .= "<select id=\"contact-profile-selector\" name=\"profile_assign\" />\r\n";
|
||||||
|
|
||||||
$r = q("SELECT profile_guid, profile_name FROM `profile` WHERE `uid` = %d",
|
$r = q("SELECT profile_guid, profile_name FROM `profile` WHERE `uid` = %d",
|
||||||
intval($_SESSION['uid']));
|
intval($_SESSION['uid']));
|
||||||
|
@ -41,7 +41,7 @@ function connections_post(&$a) {
|
|||||||
|
|
||||||
call_hooks('contact_edit_post', $_POST);
|
call_hooks('contact_edit_post', $_POST);
|
||||||
|
|
||||||
$profile_id = $_POST['profile-assign'];
|
$profile_id = $_POST['profile_assign'];
|
||||||
if($profile_id) {
|
if($profile_id) {
|
||||||
$r = q("SELECT profile_guid FROM profile WHERE profile_guid = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("SELECT profile_guid FROM profile WHERE profile_guid = '%s' AND `uid` = %d LIMIT 1",
|
||||||
dbesc($profile_id),
|
dbesc($profile_id),
|
||||||
|
@ -53,7 +53,7 @@ function connedit_post(&$a) {
|
|||||||
|
|
||||||
call_hooks('contact_edit_post', $_POST);
|
call_hooks('contact_edit_post', $_POST);
|
||||||
|
|
||||||
$profile_id = $_POST['profile-assign'];
|
$profile_id = $_POST['profile_assign'];
|
||||||
if($profile_id) {
|
if($profile_id) {
|
||||||
$r = q("SELECT profile_guid FROM profile WHERE profile_guid = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("SELECT profile_guid FROM profile WHERE profile_guid = '%s' AND `uid` = %d LIMIT 1",
|
||||||
dbesc($profile_id),
|
dbesc($profile_id),
|
||||||
|
@ -44,7 +44,7 @@ function item_post(&$a) {
|
|||||||
|
|
||||||
call_hooks('post_local_start', $_REQUEST);
|
call_hooks('post_local_start', $_REQUEST);
|
||||||
|
|
||||||
logger('postvars ' . print_r($_REQUEST,true), LOGGER_DATA);
|
// logger('postvars ' . print_r($_REQUEST,true), LOGGER_DATA);
|
||||||
|
|
||||||
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
|
$api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false);
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ function thing_init(&$a) {
|
|||||||
if(! local_user())
|
if(! local_user())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$account_id = $a->get_account();
|
$account_id = $a->get_account();
|
||||||
$channel = $a->get_channel();
|
$channel = $a->get_channel();
|
||||||
|
|
||||||
@ -16,7 +19,7 @@ function thing_init(&$a) {
|
|||||||
|
|
||||||
$name = escape_tags($_REQUEST['term']);
|
$name = escape_tags($_REQUEST['term']);
|
||||||
$verb = escape_tags($_REQUEST['verb']);
|
$verb = escape_tags($_REQUEST['verb']);
|
||||||
$profile_guid = escape_tags($_REQUEST['profile']);
|
$profile_guid = escape_tags($_REQUEST['profile_assign']);
|
||||||
$url = $_REQUEST['link'];
|
$url = $_REQUEST['link'];
|
||||||
$photo = $_REQUEST['img'];
|
$photo = $_REQUEST['img'];
|
||||||
|
|
||||||
@ -99,6 +102,7 @@ function thing_init(&$a) {
|
|||||||
$p = q("select profile_guid, is_default from profile where uid = %d $sql limit 1",
|
$p = q("select profile_guid, is_default from profile where uid = %d $sql limit 1",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
|
||||||
if($p)
|
if($p)
|
||||||
$profile = $p[0];
|
$profile = $p[0];
|
||||||
else
|
else
|
||||||
@ -210,7 +214,6 @@ function thing_init(&$a) {
|
|||||||
|
|
||||||
$ret = post_activity_item($arr);
|
$ret = post_activity_item($arr);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user