Merge pull request #616 from fabrixxm/master

small fix and feature
This commit is contained in:
fabrixxm 2013-02-15 03:39:00 -08:00
commit 9bf0f60290
2 changed files with 16 additions and 4 deletions

View File

@ -1364,9 +1364,15 @@ if(! function_exists('profile_sidebar')) {
}
}
if ($profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
$profile['edit'] = array($a->get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
$profile['menu'] = array(
'chg_photo' => t('Change profile photo'),
'cr_new' => null,
'entries' => array(),
);
}
@ -1419,6 +1425,7 @@ if(! function_exists('profile_sidebar')) {
if($a->theme['template_engine'] === 'internal')
$location = template_escape($location);
$tpl = get_markup_template('profile_vcard.tpl');
$o .= replace_macros($tpl, array(
'$profile' => $p,

View File

@ -929,8 +929,13 @@ function item_content(&$a) {
$o = '';
if(($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
require_once('include/items.php');
$o = drop_item($a->argv[2]);
require_once('include/items.php');
$o = drop_item($a->argv[2], !is_ajax());
if (is_ajax()){
// ajax return: [<item id>, 0 (no perm) | <owner id>]
echo json_encode(array(intval($a->argv[2]), intval($o)));
kllme();
}
}
return $o;
}