diff --git a/ext/post_tags/main.php b/ext/post_tags/main.php
index ff21433c5..9b82db080 100644
--- a/ext/post_tags/main.php
+++ b/ext/post_tags/main.php
@@ -166,13 +166,25 @@ public function onSearchTermParse(SearchTermParseEvent $event): void
}
}
+ public function make_logentry($data) {
+ if (is_array($data)) {
+ $data = implode(',', $data);
+ }
+ return "";
+ }
+
public function onTagSet(TagSetEvent $event): void
{
global $user;
+ error_log("post_tag: new tag set!");
if ($user->can(Permissions::EDIT_IMAGE_TAG) && (!$event->image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK))) {
+ foreach($event->new_tags as $nt) {
+ error_log("new tag ".$nt." is normal tag");
+ }
$event->image->set_tags($event->new_tags);
}
foreach ($event->metatags as $tag) {
+ error_log("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 d5aac017c..fc047b269 100644
--- a/ext/rating/main.php
+++ b/ext/rating/main.php
@@ -95,6 +95,14 @@ public function onInitExt(InitExtEvent $event): void
Image::$prop_types["rating"] = ImagePropType::STRING;
}
+ public function make_logentry($data) {
+ if (is_array($data)) {
+ $data = implode(',', $data);
+ }
+ return "";
+ }
+
+
private function check_permissions(Image $image): bool
{
global $user;
@@ -294,8 +302,10 @@ public function onSearchTermParse(SearchTermParseEvent $event): void
public function onTagTermCheck(TagTermCheckEvent $event): void
{
+ error_log("ratings: tagTermCheck...");
if (preg_match($this->search_regexp, $event->term)) {
$event->metatag = true;
+ error_log("ratings: ...".$event." is meta tag!");
}
}
@@ -304,15 +314,18 @@ public function onTagTermParse(TagTermParseEvent $event): void
global $user;
$matches = [];
+ error_log("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 = "?";
+ error_log("ratings: ...unknown rating!");
}
$ratings = array_intersect(str_split($ratings), Ratings::get_user_class_privs($user));
$rating = $ratings[0];
+ error_log("ratings: rating is ".$rating);
$image = Image::by_id_ex($event->image_id);
send_event(new RatingSetEvent($image, $rating));
}
@@ -391,13 +404,6 @@ public function onBulkAction(BulkActionEvent $event): void
}
}
- public function make_logentry($data) {
- if (is_array($data)) {
- $data = implode(',', $data);
- }
- return "";
- }
-
public function onPageRequest(PageRequestEvent $event): void
{
global $user, $page;