offer fix
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
<?php
|
||||
|
||||
class CpeprovisioningController extends mfBaseController
|
||||
{
|
||||
class CpeprovisioningController extends mfBaseController {
|
||||
protected function init() {
|
||||
// disable error display for all requests to avoid information leakage
|
||||
ini_set('display_errors', '0');
|
||||
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
||||
|
||||
if (defined('TT_CPE_PROV_ALLOW_COUNTS_IP') &&
|
||||
in_array($_SERVER['REMOTE_ADDR'], TT_CPE_PROV_ALLOW_COUNTS_IP) &&
|
||||
!mfLoginController::isLoggedIn()) {
|
||||
@@ -26,13 +21,10 @@ class CpeprovisioningController extends mfBaseController
|
||||
$this->me->loadMe();
|
||||
$this->layout()->set("me", $this->me);
|
||||
|
||||
if (!$this->me->is(["Admin"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
if (!$this->me->is(["Admin"])) $this->redirect("Dashboard");
|
||||
}
|
||||
|
||||
protected function indexAction()
|
||||
{
|
||||
protected function indexAction() {
|
||||
$cpecounter = 0;
|
||||
$r = $this->request;
|
||||
$page = $r->s;
|
||||
@@ -120,8 +112,7 @@ class CpeprovisioningController extends mfBaseController
|
||||
$this->layout()->set("products", $cpeproducts);
|
||||
}
|
||||
|
||||
private function getPreparedFilter($filter)
|
||||
{
|
||||
private function getPreparedFilter($filter) {
|
||||
$new_filter = [];
|
||||
|
||||
if (!is_array($filter)) $filter = [];
|
||||
@@ -161,8 +152,7 @@ class CpeprovisioningController extends mfBaseController
|
||||
return $new_filter;
|
||||
}
|
||||
|
||||
protected function saveAction()
|
||||
{
|
||||
protected function saveAction() {
|
||||
$r = $this->request;
|
||||
$id = $r->id;
|
||||
//var_dump($r);exit;
|
||||
@@ -397,8 +387,7 @@ class CpeprovisioningController extends mfBaseController
|
||||
self::returnJson(['success' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
protected function apiGetAction()
|
||||
{
|
||||
protected function apiGetAction(){
|
||||
$p = json_decode(file_get_contents('php://input'), true) ?? [];
|
||||
|
||||
// --- Pagination and Sorting setup ---
|
||||
@@ -528,8 +517,7 @@ class CpeprovisioningController extends mfBaseController
|
||||
]);
|
||||
}
|
||||
|
||||
protected function newIndexAction()
|
||||
{
|
||||
protected function newIndexAction() {
|
||||
$this->layout()->set('additionalJS', ['js/pages/Cpeprovisioning/Cpeprovisioning.js']);
|
||||
$this->layout()->set('additionalHead', ['<link rel="stylesheet" href="/js/pages/Cpeprovisioning/Cpeprovisioning.css">']);
|
||||
|
||||
@@ -650,6 +638,4 @@ class CpeprovisioningController extends mfBaseController
|
||||
|
||||
self::returnJson(['open_count' => $openCount]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user