From f1af8b488ab12600ad7b8d1eb22b877601e8bc77 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 29 Jul 2023 22:17:38 +0000 Subject: [PATCH] Removed scripts that hook into Misuzu. --- public/_flashii.php | 25 -- public/get-profile-field.php | 19 -- public/git-broadcast.php | 9 +- public/markov-shit.php | 477 -------------------------------- public/recent-forum-posts.php | 56 ---- public/recent-registrations.php | 29 -- 6 files changed, 3 insertions(+), 612 deletions(-) delete mode 100644 public/_flashii.php delete mode 100644 public/get-profile-field.php delete mode 100644 public/markov-shit.php delete mode 100644 public/recent-forum-posts.php delete mode 100644 public/recent-registrations.php diff --git a/public/_flashii.php b/public/_flashii.php deleted file mode 100644 index 8115a81..0000000 --- a/public/_flashii.php +++ /dev/null @@ -1,25 +0,0 @@ -execute('SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION\';'); -} catch(Exception $ex) { - echo json_encode(['error' => 103, 'msg' => $ex->getMessage()]); - exit; -} diff --git a/public/get-profile-field.php b/public/get-profile-field.php deleted file mode 100644 index f9be8cc..0000000 --- a/public/get-profile-field.php +++ /dev/null @@ -1,19 +0,0 @@ -prepare('SELECT `field_value` FROM `msz_profile_fields_values` WHERE `field_id` = ? AND `user_id` = ?'); - $fetch->addParameter(1, $fieldId); - $fetch->addParameter(2, $userId); - $fetch->execute(); - $result = $fetch->getResult(); - - if($result->next()) - echo json_encode(['field_value' => $result->getString(0)]); - else echo '{"error":105}'; -} catch(Exception $ex) { - echo json_encode(['error' => 104, 'msg' => $ex->getMessage()]); -} diff --git a/public/git-broadcast.php b/public/git-broadcast.php index d941b42..11319ff 100644 --- a/public/git-broadcast.php +++ b/public/git-broadcast.php @@ -82,18 +82,15 @@ switch($_SERVER['HTTP_X_GITHUB_EVENT']) { case 'delete': switch($data->ref_type) { case 'tag': - if (acl_check(ACL_BROADCAST)) - $message = "[b][url={$data->repository->html_url}]{$data->repository->full_name}[/url][/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted tag {$data->ref}"; + $message = "[b][url={$data->repository->html_url}]{$data->repository->full_name}[/url][/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted tag {$data->ref}"; break; case 'branch': - if (acl_check(ACL_BROADCAST)) - $message = "[b][url={$data->repository->html_url}]{$data->repository->full_name}[/url][/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted branch {$data->ref}"; + $message = "[b][url={$data->repository->html_url}]{$data->repository->full_name}[/url][/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted branch {$data->ref}"; break; case 'repository': - if (acl_check(ACL_BROADCAST)) - $message = "[b]{$data->repository->full_name}[/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted the repository :crying:"; + $message = "[b]{$data->repository->full_name}[/b]: [url={$data->sender->html_url}]{$data->sender->login}[/url] deleted the repository :crying:"; break; } break; diff --git a/public/markov-shit.php b/public/markov-shit.php deleted file mode 100644 index 1818e57..0000000 --- a/public/markov-shit.php +++ /dev/null @@ -1,477 +0,0 @@ - - - -

msz_changelog_changes -> change_log

- - -

msz_changelog_changes -> change_text

- - -

msz_changelog_tags -> tag_name

- - -

msz_changelog_tags -> tag_description

- - -

msz_comments_posts -> comment_text

- - -

msz_forum_categories -> forum_name

- - -

msz_forum_categories -> forum_description

- - -

msz_forum_posts -> post_text

- - -

msz_forum_topics -> topic_title

- - -

msz_news_categories -> category_name

- - -

msz_news_categories -> category_description

- - -

msz_news_posts -> post_title

- - -

msz_news_posts -> post_text

- - -

msz_roles -> role_name

- - -

msz_roles -> role_title

- - -

msz_roles -> role_description

- - -

msz_users -> username

- - -

msz_users -> user_about_content

- - -

msz_users -> user_signature_content

- - -

msz_users -> user_title

- - -

msz_profile_fields_values -> field_value -> 1

- - -

msz_profile_fields_values -> field_value -> 2

- - -

msz_profile_fields_values -> field_value -> 3

- - -

msz_profile_fields_values -> field_value -> 4

- - -

msz_profile_fields_values -> field_value -> 5

- - -

msz_profile_fields_values -> field_value -> 6

- - -

msz_profile_fields_values -> field_value -> 7

- - -

msz_profile_fields_values -> field_value -> 8

- - -

msz_profile_fields_values -> field_value -> 9

- - -

msz_profile_fields_values -> field_value -> 10

- - -

msz_profile_fields_values -> field_value -> 11

- - -

msz_profile_fields_values -> field_value -> 12

- - -

msz_profile_fields_values -> field_value -> 13

- - -

msz_profile_fields_values -> field_value -> 14

- - -

msz_profile_fields_values -> field_value -> 15

- - -

msz_profile_fields_values -> field_value -> 16

- - -

msz_profile_fields_values -> field_value -> 17

- - -

msz_profile_fields_values -> field_value -> 18

- - -

msz_profile_fields_values -> field_value -> 19

- diff --git a/public/recent-forum-posts.php b/public/recent-forum-posts.php deleted file mode 100644 index 3a1baab..0000000 --- a/public/recent-forum-posts.php +++ /dev/null @@ -1,56 +0,0 @@ -prepare(' - SELECT - p.`post_id`, - t.`topic_id`, t.`topic_title`, - f.`forum_id`, f.`forum_name`, - u.`user_id`, u.`username`, - COALESCE(u.`user_colour`, r.`role_colour`) AS `user_colour`, - ( - SELECT MIN(`post_id`) = p.`post_id` - FROM `msz_forum_posts` - WHERE `topic_id` = p.`topic_id` - ) AS `is_opening_post` - FROM `msz_forum_posts` as p - LEFT JOIN `msz_users` AS u - ON u.`user_id` = p.`user_id` - LEFT JOIN `msz_roles` AS r - ON r.`role_id` = u.`display_role` - LEFT JOIN `msz_forum_topics` AS t - ON t.`topic_id` = p.`topic_id` - LEFT JOIN `msz_forum_categories` AS f - ON f.`forum_id` = p.`forum_id` - WHERE `post_id` > ? - AND `post_deleted` IS NULL - AND `post_created` > NOW() - INTERVAL 7 DAY - AND p.`forum_id` IN (2, 7, 24, 6, 5, 4, 16, 20, 8, 19, 10, 11, 13, 21, 15, 14, 27, 29, 28) - ORDER BY `post_id` - LIMIT 6 - '); - $fetch->addParameter(1, $startId); - $fetch->execute(); - $result = $fetch->getResult(); - - $sets = []; - while($result->next()) - $sets[] = [ - 'post_id' => $result->getInteger(0), - 'topic_id' => $result->getInteger(1), - 'topic_title' => $result->getString(2), - 'forum_id' => $result->getInteger(3), - 'forum_name' => $result->getString(4), - 'user_id' => $result->getInteger(5), - 'username' => $result->getString(6), - 'user_colour' => $result->getInteger(7), - 'is_opening_post' => $result->getInteger(8), - ]; - - echo json_encode($sets); -} catch(Exception $ex) { - echo '{"error":104}'; -} diff --git a/public/recent-registrations.php b/public/recent-registrations.php deleted file mode 100644 index ccc8e07..0000000 --- a/public/recent-registrations.php +++ /dev/null @@ -1,29 +0,0 @@ -prepare(' - SELECT `user_id`, `username` - FROM `msz_users` - WHERE `user_id` > ? - AND `user_created` > NOW() - INTERVAL 7 DAY - ORDER BY `user_id` - LIMIT 10 - '); - $fetch->addParameter(1, $startId); - $fetch->execute(); - $result = $fetch->getResult(); - - $sets = []; - while($result->next()) - $sets[] = [ - 'user_id' => $result->getInteger(0), - 'username' => $result->getString(1), - ]; - - echo json_encode($sets); -} catch(Exception $ex) { - echo json_encode(['error' => 104, 'msg' => $ex->getMessage()]); -}