Don't show flag user button your own profile

This commit is contained in:
Zach Copley 2009-11-19 19:56:24 -08:00
parent 3d2a2d4173
commit 50827d5e81
2 changed files with 2 additions and 8 deletions

View File

@ -88,7 +88,7 @@ class UserFlagPlugin extends Plugin
{
$user = common_current_user();
if (!empty($user)) {
if (!empty($user) && ($user->id != $profile->id)) {
$action->elementStart('li', 'entity_flag');

View File

@ -86,12 +86,6 @@ class FlagprofileAction extends ProfileFormAction
function handle($args)
{
if ($this->boolean('ajax')) {
common_debug("ajax called for");
} else {
common_debug("no ajax");
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->handlePost();
if (!$this->boolean('ajax')) {
@ -125,7 +119,7 @@ class FlagprofileAction extends ProfileFormAction
}
$ufp->free();
if ($this->boolean('ajax')) {
$this->ajaxResults();
}