Skip to content

Commit

Permalink
Merge pull request #673 from Spuds/lkfx
Browse files Browse the repository at this point in the history
Quick fix for Likes
  • Loading branch information
norv committed Jul 14, 2013
2 parents 35303e2 + 0c62d51 commit 608e3d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sources/controllers/Likes.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function pre_dispatch()

/**
* Likes a post due to its awesomeness
* Pemission checks are done in prepare_likes
* Permission checks are done in prepare_likes
* It redirects back to the referrer afterward.
* It is accessed via ?action=like,sa=likepost
*/
Expand Down Expand Up @@ -97,7 +97,7 @@ public function action_unlikepost()
}

/**
* Check that few things are in order (in additon to permissions) for likes.
* Checks that few things are in order (in additon to permissions) for likes.
* @param type $id_liked
* @return type
*/
Expand Down
2 changes: 1 addition & 1 deletion sources/subs/Likes.subs.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function like_post($id_liker, $liked_message, $direction)
if (!empty($liked_message))
{
// You can't like your own stuff, no matter how brilliant you think you are
if ($liked_message['id_member'] === $id_liker)
if ($liked_message['id_member'] == $id_liker)
fatal_lang_error('cant_like_yourself', false);

addlike($id_liker, $liked_message, $direction);
Expand Down
2 changes: 2 additions & 0 deletions themes/default/languages/Errors.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
$txt['ban_ban_item_empty'] = 'Ban trigger not found';
$txt['impossible_insert_new_bangroup'] = 'An error occurred while inserting the new ban';

$txt['cant_like_yourself']= 'Liking your own posts ... its like laughing at your own jokes when there is no one else around ... lol ... Wait did I just lol myself?';

$txt['ban_name_exists'] = 'The name of this ban (%1$s) already exists. Please choose a different name.';
$txt['ban_trigger_already_exists'] = 'This ban trigger (%1$s) already exists in %2$s.';
$txt['attach_check_nag'] = 'Unable to continue due to incomplete data (%1$s).';
Expand Down

0 comments on commit 608e3d1

Please sign in to comment.