Remove bypass aproval config
This commit is contained in:
parent
76e28b9a14
commit
65e6bae1f4
2 changed files with 1 additions and 4 deletions
|
@ -9,7 +9,6 @@ abstract class ApprovalConfig
|
|||
public const VERSION = "ext_approval_version";
|
||||
public const IMAGES = "approve_images";
|
||||
public const COMMENTS = "approve_comments";
|
||||
public const BYPASS = "approval_bypass";
|
||||
}
|
||||
|
||||
class Approval extends Extension
|
||||
|
@ -23,7 +22,6 @@ class Approval extends Extension
|
|||
|
||||
$config->set_default_bool(ApprovalConfig::IMAGES, false);
|
||||
$config->set_default_bool(ApprovalConfig::COMMENTS, false);
|
||||
$config->set_default_bool(ApprovalConfig::BYPASS, false);
|
||||
|
||||
Image::$bool_props[] = "approved";
|
||||
}
|
||||
|
@ -32,7 +30,7 @@ class Approval extends Extension
|
|||
{
|
||||
global $user, $config;
|
||||
|
||||
if ($config->get_bool(ApprovalConfig::IMAGES) && $config->get_bool(ApprovalConfig::BYPASS) && $user->can(Permissions::BYPASS_IMAGE_APPROVAL)) {
|
||||
if ($config->get_bool(ApprovalConfig::IMAGES) && $user->can(Permissions::BYPASS_IMAGE_APPROVAL)) {
|
||||
self::approve_image($event->image->id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ class ApprovalTheme extends Themelet
|
|||
{
|
||||
$sb = $event->panel->create_new_block("Approval");
|
||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
|
||||
$sb->add_bool_option(ApprovalConfig::BYPASS, "<br>Enable Bypass (if user has permission): ");
|
||||
}
|
||||
|
||||
public function display_admin_form()
|
||||
|
|
Reference in a new issue