Added trash link

This commit is contained in:
Matthew Barbour 2019-10-10 10:28:10 -05:00 committed by Shish
parent 3a14857b40
commit 4897063adc

View file

@ -60,6 +60,16 @@ class Trash extends Extension
}
}
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
{
global $user;
if($event->parent=="posts") {
if($user->can(Permissions::VIEW_TRASH)) {
$event->add_nav_link("posts_trash", new Link('/post/list/in%3Atrash/1'), "Trash",null, 60);
}
}
}
const SEARCH_REGEXP = "/^in:trash$/";
public function onSearchTermParse(SearchTermParseEvent $event)