removed injection of panel
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
087db2b2a9
commit
e9fbb8879a
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Repository;
|
namespace App\Repository;
|
||||||
|
|
||||||
use App\Controller\DatabaseConnection;
|
use App\Controller\DatabaseConnection;
|
||||||
use App\Controller\PanelController;
|
|
||||||
use App\Entity\Domain;
|
use App\Entity\Domain;
|
||||||
use PDO;
|
use PDO;
|
||||||
use PDOException;
|
use PDOException;
|
||||||
|
@ -13,7 +12,7 @@ use PDOException;
|
||||||
*/
|
*/
|
||||||
class DomainRepository
|
class DomainRepository
|
||||||
{
|
{
|
||||||
public function __construct(private DatabaseConnection $databaseConnection, private PanelController $panelController)
|
public function __construct(private DatabaseConnection $databaseConnection)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,12 +41,10 @@ class DomainRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
* @param int $id
|
||||||
*
|
*
|
||||||
* @return false
|
* @return bool|\App\Entity\Domain
|
||||||
*/
|
*/
|
||||||
public function findByID(int $id): bool|Domain
|
public function findByID(int $id): bool|Domain
|
||||||
{
|
{
|
||||||
|
@ -185,13 +182,6 @@ class DomainRepository
|
||||||
$statement->bindParam(param: 'aaaa', var: $aaaa);
|
$statement->bindParam(param: 'aaaa', var: $aaaa);
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
|
|
||||||
// recreate zonefile
|
|
||||||
if ($panel = $this->panelController->findByID(id: intval(value: $panelID))) {
|
|
||||||
$a = $panel['a'];
|
|
||||||
$aaaa = $panel['aaaa'];
|
|
||||||
}
|
|
||||||
exec(command: '/usr/sbin/rndc reload');
|
|
||||||
|
|
||||||
return $statement->rowCount();
|
return $statement->rowCount();
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
print($e->getMessage());
|
print($e->getMessage());
|
||||||
|
|
Loading…
Reference in New Issue