Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1193 from GiveToken/develop
Browse files Browse the repository at this point in the history
Develop Merge to get Gary's Hotfix
  • Loading branch information
wogsland authored Sep 13, 2016
2 parents 686f42b + 3b89ea7 commit cf9505f
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 157 deletions.
4 changes: 2 additions & 2 deletions affiliates.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
recruiters. Do you know recruiters that might benefit from
our service? Introduce us to them using
<a href="mailto:affiliate@GoSizzle.io">affiliate@GoSizzle.io</a>
and will cut you in on 50% for their first 6 months of service.
That's up to $825 per lead! Just email us to get started.
and we will cut you in on 10% of their first purchase.
That's up to $1,260 per lead! Just email us to get started.
</p>
</div>
</div>
Expand Down
21 changes: 17 additions & 4 deletions ajax/recruiting_token/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,29 @@
$token->save();

// need to make sure token has an id before saving cities
foreach ($token->getCities() as $currentCity) {
$token->removeCity($currentCity->id);
}
if (isset($_POST['city_id']) && '' != $_POST['city_id']) {
// Polymer bug: convert the city name into an id
$city_id = (new City())->getIdFromName($_POST['city_id']);
if (0 >= (int) $city_id) {
throw new Exception('Invalid City');
}
$token->addCity($city_id);

$cityAlreadyAssociated = false;
foreach ($token->getCities() as $currentCity) {
if ($currentCity->id != $city_id) {
$token->removeCity($currentCity->id);
} else {
$cityAlreadyAssociated = true;
}
}

if (!$cityAlreadyAssociated) {
$token->addCity($city_id);
}
} else {
foreach ($token->getCities() as $currentCity) {
$token->removeCity($currentCity->id);
}
}

$response['status'] = "SUCCESS";
Expand Down
Loading

0 comments on commit cf9505f

Please sign in to comment.