diff --git a/core/util.php b/core/util.php index 97bd3a74..70f13364 100644 --- a/core/util.php +++ b/core/util.php @@ -934,7 +934,7 @@ function SHM_USER_FORM(User $duser, string $target, string $title, $body, $foot) $foot = TFOOT(TR(TD(["colspan"=>"2"], INPUT(["type"=>"submit", "value"=>$foot])))); } return SHM_SIMPLE_FORM( - make_link($target), + $target, P( INPUT(["type"=>'hidden', "name"=>'id', "value"=>$duser->id]), TABLE( diff --git a/ext/admin/theme.php b/ext/admin/theme.php index 31aacb37..8e8e9b34 100644 --- a/ext/admin/theme.php +++ b/ext/admin/theme.php @@ -45,7 +45,7 @@ class AdminPageTheme extends Themelet $page->add_block(new Block("Misc Admin Tools", $html)); $html = (string)SHM_SIMPLE_FORM( - make_link("admin/set_tag_case"), + "admin/set_tag_case", INPUT(["type"=>'text', "name"=>'tag', "placeholder"=>'Enter tag with correct case', "class"=>'autocomplete_tags', "autocomplete"=>'off']), SHM_SUBMIT('Set Tag Case'), ); diff --git a/ext/approval/theme.php b/ext/approval/theme.php index 482df536..bde28240 100644 --- a/ext/approval/theme.php +++ b/ext/approval/theme.php @@ -9,13 +9,13 @@ class ApprovalTheme extends Themelet { if ($image->approved===true) { $html = SHM_SIMPLE_FORM( - make_link('disapprove_image/'.$image->id), + 'disapprove_image/'.$image->id, INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image->id]), SHM_SUBMIT("Disapprove") ); } else { $html = SHM_SIMPLE_FORM( - make_link('approve_image/'.$image->id), + 'approve_image/'.$image->id, INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image->id]), SHM_SUBMIT("Approve") ); @@ -51,7 +51,7 @@ class ApprovalTheme extends Themelet global $page; $html = (string)SHM_SIMPLE_FORM( - make_link("admin/approval"), + "admin/approval", BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Images"), BR(), BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Images"), diff --git a/ext/blocks/theme.php b/ext/blocks/theme.php index 9604783d..01661393 100644 --- a/ext/blocks/theme.php +++ b/ext/blocks/theme.php @@ -18,7 +18,7 @@ class BlocksTheme extends Themelet $html = TABLE(["class"=>"form", "style"=>"width: 100%;"]); foreach ($blocks as $block) { $html->appendChild(SHM_SIMPLE_FORM( - make_link("blocks/update"), + "blocks/update", TR( INPUT(["type"=>"hidden", "name"=>"id", "value"=>$block['id']]), TH("Title"), @@ -43,7 +43,7 @@ class BlocksTheme extends Themelet } $html->appendChild(SHM_SIMPLE_FORM( - make_link("blocks/add"), + "blocks/add", TR( TH("Title"), TD(INPUT(["type"=>"text", "name"=>"title", "value"=>""])), diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 6e5e0f7d..9fcc61db 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -27,7 +27,7 @@ class ExtManagerTheme extends Themelet $tbody = TBODY(); $form = SHM_SIMPLE_FORM( - make_link("ext_manager/set"), + "ext_manager/set", TABLE( ["id"=>'extensions', "class"=>'zebra sortable'], THEAD(TR( diff --git a/ext/favorites/theme.php b/ext/favorites/theme.php index 60989a8a..b2c3ca23 100644 --- a/ext/favorites/theme.php +++ b/ext/favorites/theme.php @@ -8,7 +8,7 @@ class FavoritesTheme extends Themelet $name = $is_favorited ? "unset" : "set"; $label = $is_favorited ? "Un-Favorite" : "Favorite"; return SHM_SIMPLE_FORM( - make_link("change_favorite"), + "change_favorite", INPUT(["type"=>"hidden", "name"=>"image_id", "value"=>$image->id]), INPUT(["type"=>"hidden", "name"=>"favorite_action", "value"=>$name]), INPUT(["type"=>"submit", "value"=>$label]), diff --git a/ext/featured/theme.php b/ext/featured/theme.php index 2981283a..ee797c1e 100644 --- a/ext/featured/theme.php +++ b/ext/featured/theme.php @@ -11,7 +11,7 @@ class FeaturedTheme extends Themelet public function get_buttons_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link("featured_image/set"), + "featured_image/set", INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), INPUT(["type"=>'submit', "value"=>'Feature This']), ); diff --git a/ext/image/theme.php b/ext/image/theme.php index eb7c4108..26c268d7 100644 --- a/ext/image/theme.php +++ b/ext/image/theme.php @@ -10,7 +10,7 @@ class ImageIOTheme extends Themelet public function get_deleter_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link("image/delete"), + "image/delete", INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), INPUT(["type"=>'submit', "value"=>'Delete', "onclick"=>'return confirm("Delete the image?");']), ); @@ -22,7 +22,7 @@ class ImageIOTheme extends Themelet public function get_replace_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link("image/replace"), + "image/replace", INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), INPUT(["type"=>'submit', "value"=>'Replace']), ); diff --git a/ext/image_hash_ban/theme.php b/ext/image_hash_ban/theme.php index d81c3605..7da8f699 100644 --- a/ext/image_hash_ban/theme.php +++ b/ext/image_hash_ban/theme.php @@ -20,7 +20,7 @@ class ImageBanTheme extends Themelet public function get_buttons_html(Image $image) { return (string)SHM_SIMPLE_FORM( - make_link("image_hash_ban/add"), + "image_hash_ban/add", INPUT(["type"=>'hidden', "name"=>'c_hash', "value"=>$image->hash]), INPUT(["type"=>'hidden', "name"=>'c_image_id', "value"=>$image->id]), INPUT(["type"=>'text', "name"=>'c_reason']), diff --git a/ext/media/theme.php b/ext/media/theme.php index 05c25d8f..8b504bca 100644 --- a/ext/media/theme.php +++ b/ext/media/theme.php @@ -20,7 +20,7 @@ class MediaTheme extends Themelet } $html = (string)SHM_SIMPLE_FORM( - make_link("admin/media_rescan"), + "admin/media_rescan", "Use this to force scanning for media properties.", TABLE( ["class"=>"form"], @@ -34,7 +34,7 @@ class MediaTheme extends Themelet public function get_buttons_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link("media_rescan/"), + "media_rescan/", INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), SHM_SUBMIT('Scan Media Properties'), ); diff --git a/ext/regen_thumb/theme.php b/ext/regen_thumb/theme.php index 574bc3f5..d5fc52c7 100644 --- a/ext/regen_thumb/theme.php +++ b/ext/regen_thumb/theme.php @@ -9,7 +9,7 @@ class RegenThumbTheme extends Themelet public function get_buttons_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link("regen_thumb/one"), + "regen_thumb/one", INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), SHM_SUBMIT('Regenerate Thumbnail') ); diff --git a/ext/report_image/theme.php b/ext/report_image/theme.php index 3ddfad92..2de8df5d 100644 --- a/ext/report_image/theme.php +++ b/ext/report_image/theme.php @@ -91,7 +91,7 @@ class ReportImageTheme extends Themelet { global $page; $html = (string)SHM_SIMPLE_FORM( - make_link("image_report/remove_reports_by"), + "image_report/remove_reports_by", INPUT(["type"=>'hidden', "name"=>'user_id', "value"=>$duser->id]), SHM_SUBMIT('Delete all reports by this user') ); diff --git a/ext/rotate/theme.php b/ext/rotate/theme.php index d77d0aa8..cd3c5d24 100644 --- a/ext/rotate/theme.php +++ b/ext/rotate/theme.php @@ -9,7 +9,7 @@ class RotateImageTheme extends Themelet public function get_rotate_html(int $image_id): string { return (string)SHM_SIMPLE_FORM( - make_link('rotate/'.$image_id), + 'rotate/'.$image_id, INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), INPUT(["type"=>'number', "name"=>'rotate_deg', "id"=>"rotate_deg", "placeholder"=>"Rotation degrees"]), INPUT(["type"=>'submit', "value"=>'Rotate', "id"=>"rotatebutton"]), diff --git a/ext/rule34/theme.php b/ext/rule34/theme.php index c5d597db..fd9b2e8e 100644 --- a/ext/rule34/theme.php +++ b/ext/rule34/theme.php @@ -9,7 +9,7 @@ class Rule34Theme extends Themelet { global $page; $html = (string)SHM_SIMPLE_FORM( - make_link("rule34/comic_admin"), + "rule34/comic_admin", INPUT(["type"=>'hidden', "name"=>'user_id', "value"=>$duser->id]), LABEL(INPUT(["type"=>'checkbox', "name"=>'is_admin', "checked"=>$current_state]), "Comic Admin"), BR(), diff --git a/ext/trash/theme.php b/ext/trash/theme.php index 68e7e785..21733295 100644 --- a/ext/trash/theme.php +++ b/ext/trash/theme.php @@ -6,7 +6,7 @@ class TrashTheme extends Themelet public function get_image_admin_html(int $image_id) { return (string)SHM_SIMPLE_FORM( - make_link('trash_restore/'.$image_id), + 'trash_restore/'.$image_id, INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]), INPUT(["type"=>'submit', "value"=>'Restore From Trash']), ); diff --git a/ext/user/theme.php b/ext/user/theme.php index 281d9189..76045da0 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -64,7 +64,7 @@ class UserPageTheme extends Themelet } $form = SHM_SIMPLE_FORM( - make_link("user_admin/create"), + "user_admin/create", TABLE( ["class"=>"form"], TBODY( @@ -120,7 +120,7 @@ class UserPageTheme extends Themelet { global $config, $user; $form = SHM_SIMPLE_FORM( - make_link("user_admin/login"), + "user_admin/login", TABLE( ["style"=>"width: 100%", "class"=>"form"], TBODY(