changed from content to panel
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
fe1270f3d0
commit
440aea8d61
|
@ -33,7 +33,7 @@ class DomainRepository
|
|||
|
||||
$domains = [];
|
||||
$sql = "
|
||||
SELECT id, name, content
|
||||
SELECT id, name, panel
|
||||
FROM " . DatabaseConnection::TABLE_DOMAINS . "
|
||||
ORDER BY name";
|
||||
|
||||
|
@ -43,7 +43,7 @@ class DomainRepository
|
|||
while ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
||||
//print_r($result);
|
||||
//die();
|
||||
$domain = new Domain(name: $result['name'], id: $result['id'], content: $result['content']);
|
||||
$domain = new Domain(name: $result['name'], panel: $result['panel'], id: $result['id']);
|
||||
$domains[] = $domain;
|
||||
}
|
||||
return $domains;
|
||||
|
@ -75,7 +75,7 @@ class DomainRepository
|
|||
$statement->execute();
|
||||
if ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
||||
|
||||
return new Domain(name: $result['name'], id: $result['id'], content: $result['content']);
|
||||
return new Domain(name: $result['name'], panel: $result['content'], id: $result['id']);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ class DomainRepository
|
|||
$statement->bindParam(param: ':name', var: $name);
|
||||
$statement->execute();
|
||||
if ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
||||
return new Domain(name: $result['name'], id: $result['id'], content: $result['content']);
|
||||
return new Domain(name: $result['name'], panel: $result['content'], id: $result['id']);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@ -133,10 +133,10 @@ class DomainRepository
|
|||
|
||||
try {
|
||||
$name = $domain->getName();
|
||||
$content = $domain->getContent();
|
||||
$panel = $domain->getPanel();
|
||||
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
||||
$statement->bindParam(param: ':name', var: $name);
|
||||
$statement->bindParam(param: ':content', var: $content);
|
||||
$statement->bindParam(param: ':panel', var: $panel);
|
||||
$statement->execute();
|
||||
|
||||
return $this->databaseConnection->getConnection()->lastInsertId();
|
||||
|
@ -166,10 +166,10 @@ class DomainRepository
|
|||
} else {
|
||||
$name = $domain->getName();
|
||||
}
|
||||
if (empty($domain->getContent())) {
|
||||
$content = $current->getContent();
|
||||
if (empty($domain->getPanel())) {
|
||||
$content = $current->getPanel();
|
||||
} else {
|
||||
$content = $domain->getContent();
|
||||
$content = $domain->getPanel();
|
||||
}
|
||||
|
||||
$sql = "
|
||||
|
|
Loading…
Reference in New Issue