From 76e88dae4d3fbca8785047e373126ac02d96c431 Mon Sep 17 00:00:00 2001 From: Shish <shish@shishnet.org> Date: Thu, 12 Dec 2024 20:03:00 +0000 Subject: [PATCH] [tag/source history] privatise some functions which are only used internally --- ext/source_history/main.php | 10 +++++----- ext/tag_history/main.php | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/source_history/main.php b/ext/source_history/main.php index cbfccb69a..589a61d2f 100644 --- a/ext/source_history/main.php +++ b/ext/source_history/main.php @@ -170,7 +170,7 @@ private function process_revert_request(int $revert_id): void $page->set_redirect(make_link('post/view/'.$stored_image_id)); } - protected function process_bulk_revert_request(): void + private function process_bulk_revert_request(): void { if (isset($_POST['revert_name']) && !empty($_POST['revert_name'])) { $revert_name = $_POST['revert_name']; @@ -212,7 +212,7 @@ protected function process_bulk_revert_request(): void /** * @return array<string, mixed>|null */ - public function get_source_history_from_revert(int $revert_id): ?array + private function get_source_history_from_revert(int $revert_id): ?array { global $database; $row = $database->get_row(" @@ -226,7 +226,7 @@ public function get_source_history_from_revert(int $revert_id): ?array /** * @return array<string, mixed> */ - public function get_source_history_from_id(int $image_id): array + private function get_source_history_from_id(int $image_id): array { global $database; return $database->get_all( @@ -243,7 +243,7 @@ public function get_source_history_from_id(int $image_id): array /** * @return array<string, mixed> */ - public function get_global_source_history(int $page_id): array + private function get_global_source_history(int $page_id): array { global $database; return $database->get_all(" @@ -258,7 +258,7 @@ public function get_global_source_history(int $page_id): array /** * This function attempts to revert all changes by a given IP within an (optional) timeframe. */ - public function process_revert_all_changes(?string $name, ?string $ip, ?string $date): void + private function process_revert_all_changes(?string $name, ?string $ip, ?string $date): void { global $database; diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php index 2a498a241..7de51a53d 100644 --- a/ext/tag_history/main.php +++ b/ext/tag_history/main.php @@ -216,7 +216,7 @@ private function process_revert_request(int $revert_id): void $page->set_redirect(make_link('post/view/'.$stored_image_id)); } - protected function process_bulk_revert_request(): void + private function process_bulk_revert_request(): void { if (isset($_POST['revert_name']) && !empty($_POST['revert_name'])) { $revert_name = $_POST['revert_name']; @@ -258,7 +258,7 @@ protected function process_bulk_revert_request(): void /** * @return array<string, mixed>|null */ - public function get_tag_history_from_revert(int $revert_id): ?array + private function get_tag_history_from_revert(int $revert_id): ?array { global $database; $row = $database->get_row(" @@ -272,7 +272,7 @@ public function get_tag_history_from_revert(int $revert_id): ?array /** * @return array<string, mixed> */ - public function get_tag_history_from_id(int $image_id): array + private function get_tag_history_from_id(int $image_id): array { global $database; return $database->get_all( @@ -289,7 +289,7 @@ public function get_tag_history_from_id(int $image_id): array /** * @return array<string, mixed> */ - public function get_global_tag_history(int $page_id): array + private function get_global_tag_history(int $page_id): array { global $database; return $database->get_all(" @@ -304,7 +304,7 @@ public function get_global_tag_history(int $page_id): array /** * @return array<string, mixed>|null */ - public function get_previous_tags(int $image_id, int $id): ?array + private function get_previous_tags(int $image_id, int $id): ?array { global $database; $row = $database->get_row(" @@ -320,7 +320,7 @@ public function get_previous_tags(int $image_id, int $id): ?array /** * This function attempts to revert all changes by a given IP within an (optional) timeframe. */ - public function process_revert_all_changes(?string $name, ?string $ip, ?string $date): void + private function process_revert_all_changes(?string $name, ?string $ip, ?string $date): void { global $database;