Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion core/components/com_kb/site/controllers/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@ public function execute()
* @return void
*/
public function displayTask()
{
{
$category = new Category;
$category->set('alias', 'all');
$category->set('title', Lang::txt('COM_KB_ALL_ARTICLES'));
$category->set('id', 0);
$category->set('published', 1);
$category->set('path', 'all');

$this->view->set('category', $category);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the duplication noted above:

  • Lines 50, 57 and 59 pick up trailing tabs (git diff --check flags them; the rest of the file has none).
  • The standalone $this->view->set('category', $category) sits right above the existing fluent ->set('archive')->setLayout()->display() chain; fold it into the chain.
  • If the display layout is going to adopt the category sidebar from category.php, note that markup reads $this->catid (active-state highlighting) and $this->filters['search'], neither of which displayTask sets. Either set catid = 0 and a filters array here too, or move the sidebar into a shared partial that takes explicit arguments.


$this->view
->set('archive', $this->archive)
->setLayout('display')
Expand Down Expand Up @@ -79,6 +88,7 @@ public function categoryTask()
$category->set('title', Lang::txt('COM_KB_ALL_ARTICLES'));
$category->set('id', 0);
$category->set('published', 1);
$category->set('path', 'all');
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions core/components/com_kb/site/language/en-GB/en-GB.com_kb.ini
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ COM_KB_HAVE_A_FEATURE_REQUEST="Have an idea or feature request?"
COM_KB_FEATURE_TELL_US="Let us know!"
COM_KB_POPULAR_ARTICLES="Most Popular Articles"
COM_KB_RECENT_ARTICLES="Most Recent Articles"
COM_KB_CONTACT_US="Contact Us"
COM_KB_CONTACT_INFORMATION="Contact Information"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing in core/components/com_kb references COM_KB_CONTACT_US or COM_KB_CONTACT_INFORMATION. If these serve the doi template override, they belong in that template's language file (or app/bootstrap/site/language/overrides/en-GB.override.ini); if they serve a core display.php change, that change needs to be in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that I need mention that the override view changes are in PR: https://gitlab.hubzero.org/hub-purr/tpl_doi/-/merge_requests/18.


; Search form
COM_KB_SEARCH="Search"
Expand Down
Loading