forked from Cavemanon/cavepaintings
PHP4 is dead \o/ \o/ \o/ (Part 1, make use of instanceof)
git-svn-id: file:///home/shish/svn/shimmie2/trunk@994 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
@@ -44,12 +44,12 @@ class DanbooruApi extends Extension
|
||||
public function receive_event($event)
|
||||
{
|
||||
// Check if someone is accessing /api/danbooru (us)
|
||||
if(is_a($event, 'PageRequestEvent') && ($event->page_name == "api") && ($event->get_arg(0) == 'danbooru'))
|
||||
if(($event instanceof PageRequestEvent) && ($event->page_name == "api") && ($event->get_arg(0) == 'danbooru'))
|
||||
{
|
||||
// execute the danbooru processing code
|
||||
$this->api_danbooru($event);
|
||||
}
|
||||
if(is_a($event, 'SearchTermParseEvent'))
|
||||
if($event instanceof SearchTermParseEvent)
|
||||
{
|
||||
$matches = array();
|
||||
if(preg_match("/md5:([0-9a-fA-F]*)/i", $event->term, $matches))
|
||||
|
Reference in New Issue
Block a user