Permalink
Browse files

fix performance issues

  • Loading branch information...
0bitus committed Sep 25, 2018
1 parent a2b3f5e commit c615dbc0d54e8ff20e0832213fa419db1ad2df0b
Showing with 5 additions and 2 deletions.
  1. +5 −2 process/subscription.php
View
@@ -27,10 +27,13 @@
echo Helper::jsonResponse(FALSE, "error", $LOCAL["msg"]["error"]["empty_termsconditions"]);
exit();
}
if (!empty($_POST["offset"])) {
$offset = intval($_POST["offset"]);
}
$keyHandler = new KeyHandler();
$subscription = new Subscription($_SESSION["user"]["uID"]);
$keys = explode("\n", $_POST["keys"]);
$count = 0;
$count = !empty($offset) ? $offset : 0;
foreach ($keys as $key) {
$key = trim($key);
if (!empty($key)) {
@@ -59,7 +62,7 @@
break;
case "setpass":
$passExpression = "/^[".$CONF["pass_filter"]."]+$/";
$passExpression = "/^[" . $CONF["pass_filter"] . "]+$/";
if (empty($_POST["target"]) || !is_numeric($_POST["target"])) {
echo Helper::jsonResponse(FALSE, "error", $LOCAL["msg"]["error"]["no_subscription_id"]);
exit();

0 comments on commit c615dbc

Please sign in to comment.