fixes
This commit is contained in:
parent
8e79aa95a9
commit
ff71a89948
5 changed files with 7 additions and 8 deletions
|
@ -62,9 +62,11 @@ abstract class Extension
|
|||
public static function determine_enabled_extensions(): void
|
||||
{
|
||||
self::$enabled_extensions = [];
|
||||
$extras = defined("EXTRA_EXTS") ? explode(",", EXTRA_EXTS) : [];
|
||||
|
||||
foreach (array_merge(
|
||||
ExtensionInfo::get_core_extensions(),
|
||||
explode(",", EXTRA_EXTS)
|
||||
$extras
|
||||
) as $key) {
|
||||
$ext = ExtensionInfo::get_by_key($key);
|
||||
if ($ext===null || !$ext->is_supported()) {
|
||||
|
@ -361,7 +363,7 @@ abstract class DataHandlerExtension extends Extension
|
|||
// Locked Stuff.
|
||||
if (!empty($event->metadata['locked'])) {
|
||||
$locked = $event->metadata['locked'];
|
||||
send_event(new LockSetEvent($image, !empty($locked)));
|
||||
send_event(new LockSetEvent($image, $locked));
|
||||
}
|
||||
}
|
||||
} elseif ($supported_mime && !$check_contents) {
|
||||
|
|
|
@ -115,9 +115,6 @@ class Blotter extends Extension
|
|||
$this->theme->display_permission_denied();
|
||||
} else {
|
||||
$id = int_escape($_POST['id']);
|
||||
if (!isset($id)) {
|
||||
die("No ID!");
|
||||
}
|
||||
$database->execute("DELETE FROM blotter WHERE id=:id", ["id"=>$id]);
|
||||
log_info("blotter", "Removed Entry #$id");
|
||||
$page->set_mode(PageMode::REDIRECT);
|
||||
|
|
|
@ -175,7 +175,7 @@ class BulkActions extends Extension
|
|||
if (empty($data)) {
|
||||
throw new BulkActionException("No ids specified in bulk_selected_ids");
|
||||
}
|
||||
if (is_array($data) && !empty($data)) {
|
||||
if (is_array($data)) {
|
||||
$items = $this->yield_items($data);
|
||||
}
|
||||
} elseif (isset($_POST['bulk_query']) && $_POST['bulk_query'] != "") {
|
||||
|
|
|
@ -112,7 +112,7 @@ class OuroborosPost extends _SafeOuroborosImage
|
|||
* Mainly just acts as a wrapper and validation layer
|
||||
* @noinspection PhpMissingParentConstructorInspection
|
||||
*/
|
||||
public function __construct(array $post, string $md5 = '')
|
||||
public function __construct(array $post)
|
||||
{
|
||||
if (array_key_exists('tags', $post)) {
|
||||
// implode(explode()) to resolve aliases and sanitise
|
||||
|
|
|
@ -162,7 +162,7 @@ class TagList extends Extension
|
|||
if (is_null($results)) {
|
||||
$tags = explode(" ", $tags_config);
|
||||
|
||||
if (empty($tags)) {
|
||||
if (count($tags) == 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue