From b28c3bb638b29258ac1d6e27a644ef2bd9e7cf22 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 11 Feb 2024 19:01:42 +0000 Subject: [PATCH] [pools] derp --- ext/pools/main.php | 2 +- ext/pools/test.php | 16 +++++----------- ext/pools/theme.php | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/ext/pools/main.php b/ext/pools/main.php index 199c2f9a..341e5ab8 100644 --- a/ext/pools/main.php +++ b/ext/pools/main.php @@ -328,7 +328,7 @@ class Pools extends Extension } $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("pool/view/" . $pool_id)); - } + } if ($event->page_matches("pool/reverse/{pool_id}", method: "POST")) { $pool_id = $event->get_iarg('pool_id'); $pool = $this->get_single_pool($pool_id); diff --git a/ext/pools/test.php b/ext/pools/test.php index 4790bc7c..9f181e75 100644 --- a/ext/pools/test.php +++ b/ext/pools/test.php @@ -113,8 +113,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase { [$pool_id, $image_ids] = $this->testCreate(); - $this->post_page("pool/import", [ - "pool_id" => $pool_id, + $this->post_page("pool/import/$pool_id", [ "pool_tag" => "test" ]); $this->assert_text("Pool"); @@ -128,8 +127,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase { [$pool_id, $image_ids] = $this->testCreate(); - $page = $this->post_page("pool/remove_posts", [ - "pool_id" => $pool_id, + $page = $this->post_page("pool/remove_posts/$pool_id", [ "check" => [(string)($image_ids[0]), (string)($image_ids[1])] ]); $this->assertEquals(PageMode::REDIRECT, $page->mode); @@ -142,8 +140,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase { [$pool_id, $image_ids] = $this->testRemovePosts(); - $page = $this->post_page("pool/add_posts", [ - "pool_id" => $pool_id, + $page = $this->post_page("pool/add_posts/$pool_id", [ "check" => [(string)($image_ids[0]), (string)($image_ids[1])] ]); $this->assertEquals(PageMode::REDIRECT, $page->mode); @@ -157,8 +154,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase { [$pool_id, $image_ids] = $this->testCreate(); - $page = $this->post_page("pool/edit_description", [ - "pool_id" => $pool_id, + $page = $this->post_page("pool/edit_description/$pool_id", [ "description" => "Updated description" ]); $this->assertEquals(PageMode::REDIRECT, $page->mode); @@ -184,9 +180,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase $pool_id = (int)(explode("/", $page->redirect)[4]); send_event(new PoolAddPostsEvent($pool_id, [$image_id_1, $image_id_2])); - $page = $this->post_page("pool/nuke", [ - "pool_id" => "$pool_id", - ]); + $page = $this->post_page("pool/nuke/$pool_id"); $this->assertEquals(PageMode::REDIRECT, $page->mode); } } diff --git a/ext/pools/theme.php b/ext/pools/theme.php index 53038ade..e3931d03 100644 --- a/ext/pools/theme.php +++ b/ext/pools/theme.php @@ -293,7 +293,7 @@ class PoolsTheme extends Themelet )); } $form->appendChild($image_list); - + $form->appendChild( SHM_SUBMIT("Order", ["name" => "edit", "id" => "edit_pool_order"]) );