From 2a5df20331d84f2b0e6c971782f356f1dfad5116 Mon Sep 17 00:00:00 2001 From: Giraffaman Date: Thu, 21 Mar 2024 21:53:44 +0100 Subject: [PATCH] --- ext/auto_tagger/main.php | 4 ++-- ext/post_tags/main.php | 6 +++--- ext/rating/main.php | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index ac0b5ab6e..26ce65005 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -150,11 +150,11 @@ public function onDatabaseUpgrade(DatabaseUpgradeEvent $event): void public function onTagSet(TagSetEvent $event): void { - make_logentry("auto-tagger: tag set!"); + $this->make_logentry("auto-tagger: tag set!"); $results = $this->apply_auto_tags($event->new_tags); if (!empty($results)) { $event->new_tags = $results; - make_logentry("auto-tagger: new tags: ".$results.""); + $this->make_logentry("auto-tagger: new tags: ".$results.""); } } diff --git a/ext/post_tags/main.php b/ext/post_tags/main.php index e900d9ea0..1ca2320e3 100644 --- a/ext/post_tags/main.php +++ b/ext/post_tags/main.php @@ -176,13 +176,13 @@ public function make_logentry($data) { public function onTagSet(TagSetEvent $event): void { global $user; - make_logentry("post_tag: new tag set!"); + $this->make_logentry("post_tag: new tag set!"); if ($user->can(Permissions::EDIT_IMAGE_TAG) && (!$event->image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK))) { - make_logentry("post_tag: ".$event->new_tags." is normal tag."); + $this->make_logentry("post_tag: ".$event->new_tags." is normal tag."); $event->image->set_tags($event->new_tags); } foreach ($event->metatags as $tag) { - make_logentry("post_tag: ".$tag." is meta tag!"); + $this->make_logentry("post_tag: ".$tag." is meta tag!"); send_event(new TagTermParseEvent($tag, $event->image->id)); } } diff --git a/ext/rating/main.php b/ext/rating/main.php index 550d077b2..14d1cfd7c 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -302,10 +302,10 @@ public function onSearchTermParse(SearchTermParseEvent $event): void public function onTagTermCheck(TagTermCheckEvent $event): void { - make_logentry("ratings: tagTermCheck..."); + $this->make_logentry("ratings: tagTermCheck..."); if (preg_match($this->search_regexp, $event->term)) { $event->metatag = true; - make_logentry("ratings: ...".$event." is meta tag!"); + $this->make_logentry("ratings: ...".$event." is meta tag!"); } } @@ -314,18 +314,18 @@ public function onTagTermParse(TagTermParseEvent $event): void global $user; $matches = []; - make_logentry("ratings: parsing tag term ".$event->term."..."); + $this->make_logentry("ratings: parsing tag term ".$event->term."..."); if (preg_match($this->search_regexp, strtolower($event->term), $matches)) { $ratings = $matches[1] ? $matches[1] : $matches[2][0]; if (count($matches) > 2 && in_array($matches[2], self::UNRATED_KEYWORDS)) { $ratings = "?"; - make_logentry("ratings: ...unknown rating!"); + $this->make_logentry("ratings: ...unknown rating!"); } $ratings = array_intersect(str_split($ratings), Ratings::get_user_class_privs($user)); $rating = $ratings[0]; - make_logentry("ratings: rating is ".$rating); + $this->make_logentry("ratings: rating is ".$rating); $image = Image::by_id_ex($event->image_id); send_event(new RatingSetEvent($image, $rating)); }