Image to Post - approval
This commit is contained in:
parent
d7c16176d3
commit
83f8b61c4e
2 changed files with 8 additions and 8 deletions
|
@ -33,7 +33,7 @@ class Approval extends Extension
|
|||
$image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null;
|
||||
}
|
||||
if (empty($image_id)) {
|
||||
throw new SCoreException("Can not approve image: No valid Image ID given.");
|
||||
throw new SCoreException("Can not approve post: No valid Post ID given.");
|
||||
}
|
||||
|
||||
self::approve_image($image_id);
|
||||
|
@ -48,7 +48,7 @@ class Approval extends Extension
|
|||
$image_id = isset($_POST['image_id']) ? $_POST['image_id'] : null;
|
||||
}
|
||||
if (empty($image_id)) {
|
||||
throw new SCoreException("Can not disapprove image: No valid Image ID given.");
|
||||
throw new SCoreException("Can not disapprove image: No valid Post ID given.");
|
||||
}
|
||||
|
||||
self::disapprove_image($image_id);
|
||||
|
|
|
@ -27,14 +27,14 @@ class ApprovalTheme extends Themelet
|
|||
|
||||
public function get_help_html()
|
||||
{
|
||||
return '<p>Search for images that are approved/not approved.</p>
|
||||
return '<p>Search for posts that are approved/not approved.</p>
|
||||
<div class="command_example">
|
||||
<pre>approved:yes</pre>
|
||||
<p>Returns images that have been approved.</p>
|
||||
<p>Returns posts that have been approved.</p>
|
||||
</div>
|
||||
<div class="command_example">
|
||||
<pre>approved:no</pre>
|
||||
<p>Returns images that have not been approved.</p>
|
||||
<p>Returns posts that have not been approved.</p>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class ApprovalTheme extends Themelet
|
|||
public function display_admin_block(SetupBuildingEvent $event)
|
||||
{
|
||||
$sb = new SetupBlock("Approval");
|
||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Images: ");
|
||||
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
|
||||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,9 @@ class ApprovalTheme extends Themelet
|
|||
|
||||
$html = (string)SHM_SIMPLE_FORM(
|
||||
"admin/approval",
|
||||
BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Images"),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'approve_all'], "Approve All Posts"),
|
||||
BR(),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Images"),
|
||||
BUTTON(["name"=>'approval_action', "value"=>'disapprove_all'], "Disapprove All Posts"),
|
||||
);
|
||||
$page->add_block(new Block("Approval", $html));
|
||||
}
|
||||
|
|
Reference in a new issue