Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
onchange="this.form.submit();"
>
<option value="0">JNONE</option>
<option value="by_me">COM_CONTENT_FILTER_AUTHORS_BY_ME</option>
</field>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,14 @@ protected function getListQuery()
}
elseif (is_array($authorId))
{
// Check to see if by_me is in the array
if (in_array('by_me', $authorId))

// Replace by_me with the current user id in the array
{
$authorId['by_me'] = $user->id;
}

$authorId = ArrayHelper::toInteger($authorId);
$query->whereIn($db->quoteName('a.created_by'), $authorId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
multiple="true"
layout="joomla.form.field.list-fancy-select"
class="multipleAuthors"
filter="intarray"
filter="array"
>
<option value="0">JNONE</option>
<option value="by_me">COM_CONTENT_FILTER_AUTHORS_BY_ME</option>
</field>

<field
Expand Down
1 change: 1 addition & 0 deletions administrator/language/en-GB/com_content.ini
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ COM_CONTENT_FIELDS_TYPE_MODAL_ARTICLE="Article"
COM_CONTENT_FIELDSET_PUBLISHING="Publishing"
COM_CONTENT_FIELDSET_RULES="Permissions"
COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links"
COM_CONTENT_FILTER_AUTHORS_BY_ME="Created by me"
COM_CONTENT_FILTER_FEATURED_NO="Unfeatured Articles"
COM_CONTENT_FILTER_FEATURED_YES="Featured Articles"
COM_CONTENT_FILTER_SEARCH_DESC="Search in title, alias and note. Prefix with ID: or AUTHOR: or CONTENT: to search for an article ID, article author or search in article content."
Expand Down