Skip to content
Browse files

Dev should not pay for own

  • Loading branch information...
1 parent e9de877 commit 48be90191bfa113028da137dc72a6b34374443a3 @singpolyma committed Aug 23, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 apps/app.php
View
4 apps/app.php
@@ -107,9 +107,9 @@
}
// Check if the user has already bought this, or it's free
// XXX if we ever allow charging for upgrades, this logic will have to do magic with version numbers matching
- $gratis = $package['price'] == 0 || $user_rating !== FALSE;
+ $gratis = $package['price'] == 0 || $user_rating !== FALSE || $package['developer_user_id'] == $LOGIN_DATA['user_id'];
// Make sure they have enough
- if(!$gratis && $package['price'] > $LOGIN_DATA['balance'] && $package['developer_user_id'] != $LOGIN_DATA['user_id']) {
+ if(!$gratis && $package['price'] > $LOGIN_DATA['balance']) {
header('HTTP/1.1 403 Forbidden', true, 403);
header('Content-Type: text/plain; charset=utf-8');
die("Balance too low.\n");

0 comments on commit 48be901

Please sign in to comment.
Something went wrong with that request. Please try again.