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:
@@ -12,14 +12,14 @@ class Notes extends Extension {
|
||||
public function receive_event($event) {
|
||||
if(is_null($this->theme)) $this->theme = get_theme_object("notes", "NotesTheme");
|
||||
|
||||
if(is_a($event, 'InitExtEvent')) {
|
||||
if($event instanceof InitExtEvent) {
|
||||
global $config;
|
||||
if($config->get_int("ext_notes_version") < 1) {
|
||||
$this->install();
|
||||
}
|
||||
}
|
||||
|
||||
if(is_a($event, 'DisplayingImageEvent')) {
|
||||
if($event instanceof DisplayingImageEvent) {
|
||||
global $database;
|
||||
$notes = $database->get_all("SELECT * FROM image_notes WHERE image_id = ?", array($event->image->id));
|
||||
$this->theme->display_notes($event->page, $notes);
|
||||
|
Reference in New Issue
Block a user