From 3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 21 Jun 2021 19:18:35 +0200 Subject: Rename "attr" method of Item class to "get" --- core/include/feed/main.php | 4 ++-- core/include/home.php | 2 +- core/include/page/list.php | 2 +- core/include/page/main.php | 2 +- core/include/post/list.php | 2 +- core/include/post/main.php | 2 +- core/include/search/main.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'core/include') diff --git a/core/include/feed/main.php b/core/include/feed/main.php index 765f296..76bf23e 100644 --- a/core/include/feed/main.php +++ b/core/include/feed/main.php @@ -23,7 +23,7 @@ if(!isset($param) OR $param !== 'page') { 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 = Template\Factory::build('feed/item_post'); $ItemTemplate->set('POST', generateItemTemplateData($Post)); @@ -50,7 +50,7 @@ if(!isset($param) OR $param !== 'post') { foreach($pageIDs as $pageID) { try { $Page = Page\Factory::build($pageID); - $User = User\Factory::build($Page->attr('user')); + $User = User\Factory::build($Page->get('user')); $ItemTemplate = Template\Factory::build('feed/item_page'); $ItemTemplate->set('PAGE', generateItemTemplateData($Page)); diff --git a/core/include/home.php b/core/include/home.php index dfa2a36..507db7a 100644 --- a/core/include/home.php +++ b/core/include/home.php @@ -13,7 +13,7 @@ $postIDs = $Statement->fetchAll($Database::FETCH_COLUMN); 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/core/include/page/list.php b/core/include/page/list.php index 42e887f..ec2cd00 100644 --- a/core/include/page/list.php +++ b/core/include/page/list.php @@ -36,7 +36,7 @@ $pageIDs = $Database->query(sprintf($execSQL, Page\Attribute::TABLE))->fetchAll( foreach($pageIDs as $pageID) { try { $Page = Page\Factory::build($pageID); - $User = User\Factory::build($Page->attr('user')); + $User = User\Factory::build($Page->get('user')); $ItemTemplate = generatePageItemTemplate($Page, $User); diff --git a/core/include/page/main.php b/core/include/page/main.php index 32a2ec4..01ef40d 100644 --- a/core/include/page/main.php +++ b/core/include/page/main.php @@ -17,7 +17,7 @@ try { $Page = Page\Factory::build($param); } - $User = User\Factory::build($Page->attr('user')); + $User = User\Factory::build($Page->get('user')); $page_data = generateItemTemplateData($Page); $user_data = generateItemTemplateData($User); diff --git a/core/include/post/list.php b/core/include/post/list.php index 3fd9a44..9b2eec9 100644 --- a/core/include/post/list.php +++ b/core/include/post/list.php @@ -36,7 +36,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/core/include/post/main.php b/core/include/post/main.php index 537873c..57cc402 100644 --- a/core/include/post/main.php +++ b/core/include/post/main.php @@ -17,7 +17,7 @@ try { $Post = Post\Factory::build($param); } - $User = User\Factory::build($Post->attr('user')); + $User = User\Factory::build($Post->get('user')); $post_data = generateItemTemplateData($Post); $user_data = generateItemTemplateData($User); diff --git a/core/include/search/main.php b/core/include/search/main.php index 95cffda..8a02790 100644 --- a/core/include/search/main.php +++ b/core/include/search/main.php @@ -40,7 +40,7 @@ if(isset($postIDs) AND !empty($postIDs)) { 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); } -- cgit v1.2.3