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 = [];
|
$domains = [];
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT id, name, content
|
SELECT id, name, panel
|
||||||
FROM " . DatabaseConnection::TABLE_DOMAINS . "
|
FROM " . DatabaseConnection::TABLE_DOMAINS . "
|
||||||
ORDER BY name";
|
ORDER BY name";
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class DomainRepository
|
||||||
while ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
while ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
||||||
//print_r($result);
|
//print_r($result);
|
||||||
//die();
|
//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;
|
$domains[] = $domain;
|
||||||
}
|
}
|
||||||
return $domains;
|
return $domains;
|
||||||
|
@ -75,7 +75,7 @@ class DomainRepository
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
if ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ class DomainRepository
|
||||||
$statement->bindParam(param: ':name', var: $name);
|
$statement->bindParam(param: ':name', var: $name);
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
if ($result = $statement->fetch(mode: PDO::FETCH_ASSOC)) {
|
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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -133,10 +133,10 @@ class DomainRepository
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$name = $domain->getName();
|
$name = $domain->getName();
|
||||||
$content = $domain->getContent();
|
$panel = $domain->getPanel();
|
||||||
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
$statement = $this->databaseConnection->getConnection()->prepare(query: $sql);
|
||||||
$statement->bindParam(param: ':name', var: $name);
|
$statement->bindParam(param: ':name', var: $name);
|
||||||
$statement->bindParam(param: ':content', var: $content);
|
$statement->bindParam(param: ':panel', var: $panel);
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
|
|
||||||
return $this->databaseConnection->getConnection()->lastInsertId();
|
return $this->databaseConnection->getConnection()->lastInsertId();
|
||||||
|
@ -166,10 +166,10 @@ class DomainRepository
|
||||||
} else {
|
} else {
|
||||||
$name = $domain->getName();
|
$name = $domain->getName();
|
||||||
}
|
}
|
||||||
if (empty($domain->getContent())) {
|
if (empty($domain->getPanel())) {
|
||||||
$content = $current->getContent();
|
$content = $current->getPanel();
|
||||||
} else {
|
} else {
|
||||||
$content = $domain->getContent();
|
$content = $domain->getPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
|
|
Loading…
Reference in New Issue