[pools] derp
This commit is contained in:
parent
71b98a8e8c
commit
b28c3bb638
3 changed files with 7 additions and 13 deletions
|
@ -328,7 +328,7 @@ class Pools extends Extension
|
||||||
}
|
}
|
||||||
$page->set_mode(PageMode::REDIRECT);
|
$page->set_mode(PageMode::REDIRECT);
|
||||||
$page->set_redirect(make_link("pool/view/" . $pool_id));
|
$page->set_redirect(make_link("pool/view/" . $pool_id));
|
||||||
}
|
}
|
||||||
if ($event->page_matches("pool/reverse/{pool_id}", method: "POST")) {
|
if ($event->page_matches("pool/reverse/{pool_id}", method: "POST")) {
|
||||||
$pool_id = $event->get_iarg('pool_id');
|
$pool_id = $event->get_iarg('pool_id');
|
||||||
$pool = $this->get_single_pool($pool_id);
|
$pool = $this->get_single_pool($pool_id);
|
||||||
|
|
|
@ -113,8 +113,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
|
||||||
{
|
{
|
||||||
[$pool_id, $image_ids] = $this->testCreate();
|
[$pool_id, $image_ids] = $this->testCreate();
|
||||||
|
|
||||||
$this->post_page("pool/import", [
|
$this->post_page("pool/import/$pool_id", [
|
||||||
"pool_id" => $pool_id,
|
|
||||||
"pool_tag" => "test"
|
"pool_tag" => "test"
|
||||||
]);
|
]);
|
||||||
$this->assert_text("Pool");
|
$this->assert_text("Pool");
|
||||||
|
@ -128,8 +127,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
|
||||||
{
|
{
|
||||||
[$pool_id, $image_ids] = $this->testCreate();
|
[$pool_id, $image_ids] = $this->testCreate();
|
||||||
|
|
||||||
$page = $this->post_page("pool/remove_posts", [
|
$page = $this->post_page("pool/remove_posts/$pool_id", [
|
||||||
"pool_id" => $pool_id,
|
|
||||||
"check" => [(string)($image_ids[0]), (string)($image_ids[1])]
|
"check" => [(string)($image_ids[0]), (string)($image_ids[1])]
|
||||||
]);
|
]);
|
||||||
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
||||||
|
@ -142,8 +140,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
|
||||||
{
|
{
|
||||||
[$pool_id, $image_ids] = $this->testRemovePosts();
|
[$pool_id, $image_ids] = $this->testRemovePosts();
|
||||||
|
|
||||||
$page = $this->post_page("pool/add_posts", [
|
$page = $this->post_page("pool/add_posts/$pool_id", [
|
||||||
"pool_id" => $pool_id,
|
|
||||||
"check" => [(string)($image_ids[0]), (string)($image_ids[1])]
|
"check" => [(string)($image_ids[0]), (string)($image_ids[1])]
|
||||||
]);
|
]);
|
||||||
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
||||||
|
@ -157,8 +154,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
|
||||||
{
|
{
|
||||||
[$pool_id, $image_ids] = $this->testCreate();
|
[$pool_id, $image_ids] = $this->testCreate();
|
||||||
|
|
||||||
$page = $this->post_page("pool/edit_description", [
|
$page = $this->post_page("pool/edit_description/$pool_id", [
|
||||||
"pool_id" => $pool_id,
|
|
||||||
"description" => "Updated description"
|
"description" => "Updated description"
|
||||||
]);
|
]);
|
||||||
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
||||||
|
@ -184,9 +180,7 @@ class PoolsTest extends ShimmiePHPUnitTestCase
|
||||||
$pool_id = (int)(explode("/", $page->redirect)[4]);
|
$pool_id = (int)(explode("/", $page->redirect)[4]);
|
||||||
send_event(new PoolAddPostsEvent($pool_id, [$image_id_1, $image_id_2]));
|
send_event(new PoolAddPostsEvent($pool_id, [$image_id_1, $image_id_2]));
|
||||||
|
|
||||||
$page = $this->post_page("pool/nuke", [
|
$page = $this->post_page("pool/nuke/$pool_id");
|
||||||
"pool_id" => "$pool_id",
|
|
||||||
]);
|
|
||||||
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
$this->assertEquals(PageMode::REDIRECT, $page->mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ class PoolsTheme extends Themelet
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
$form->appendChild($image_list);
|
$form->appendChild($image_list);
|
||||||
|
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
SHM_SUBMIT("Order", ["name" => "edit", "id" => "edit_pool_order"])
|
SHM_SUBMIT("Order", ["name" => "edit", "id" => "edit_pool_order"])
|
||||||
);
|
);
|
||||||
|
|
Reference in a new issue