aboutsummaryrefslogtreecommitdiffstats
path: root/admin/post
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-21 19:18:35 +0200
committerThomas Lange <code@nerdmind.de>2021-06-21 19:18:35 +0200
commit3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7 (patch)
tree9d3ba9fcb9162963e26edbb7bda0709aaf2c8a41 /admin/post
parentec424df850d6e5acc85d49ebd67703cf11f5a8d4 (diff)
downloadblog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.tar.gz
blog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.tar.xz
blog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.zip
Rename "attr" method of Item class to "get"
Diffstat (limited to 'admin/post')
-rw-r--r--admin/post/index.php2
-rw-r--r--admin/post/insert.php6
-rw-r--r--admin/post/search.php2
-rw-r--r--admin/post/update.php6
4 files changed, 8 insertions, 8 deletions
diff --git a/admin/post/index.php b/admin/post/index.php
index e18a634..bb38676 100644
--- a/admin/post/index.php
+++ b/admin/post/index.php
@@ -34,7 +34,7 @@ $postIDs = $Database->query(sprintf($execSQL, Post\Attribute::TABLE))->fetchAll(
foreach($postIDs as $postID) {
try {
$Post = Post\Factory::build($postID);
- $User = User\Factory::build($Post->attr('user'));
+ $User = User\Factory::build($Post->get('user'));
$ItemTemplate = generatePostItemTemplate($Post, $User);
diff --git a/admin/post/insert.php b/admin/post/insert.php
index 6b1876e..b4e2542 100644
--- a/admin/post/insert.php
+++ b/admin/post/insert.php
@@ -41,9 +41,9 @@ $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', U
foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
$User = User\Factory::build($userID);
$userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
+ 'ID' => $User->get('id'),
+ 'FULLNAME' => $User->get('fullname'),
+ 'USERNAME' => $User->get('username'),
];
}
diff --git a/admin/post/search.php b/admin/post/search.php
index 8fe6a51..ec2391c 100644
--- a/admin/post/search.php
+++ b/admin/post/search.php
@@ -18,7 +18,7 @@ if($search = HTTP::GET('q')) {
foreach($postIDs as $postID) {
try {
$Post = Post\Factory::build($postID);
- $User = User\Factory::build($Post->attr('user'));
+ $User = User\Factory::build($Post->get('user'));
$posts[] = generatePostItemTemplate($Post, $User);
}
diff --git a/admin/post/update.php b/admin/post/update.php
index 6fb621d..e22a54a 100644
--- a/admin/post/update.php
+++ b/admin/post/update.php
@@ -44,9 +44,9 @@ try {
foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) {
$User = User\Factory::build($userID);
$userAttributes[] = [
- 'ID' => $User->attr('id'),
- 'FULLNAME' => $User->attr('fullname'),
- 'USERNAME' => $User->attr('username'),
+ 'ID' => $User->get('id'),
+ 'FULLNAME' => $User->get('fullname'),
+ 'USERNAME' => $User->get('username'),
];
}