more types
This commit is contained in:
parent
955d787fa3
commit
2688843d80
4 changed files with 6 additions and 7 deletions
|
@ -274,7 +274,7 @@ class AutoTagger extends Extension
|
|||
/**
|
||||
* @param string[] $tags_mixed
|
||||
*/
|
||||
private function apply_auto_tags(array $tags_mixed): ?array
|
||||
private function apply_auto_tags(array $tags_mixed): array
|
||||
{
|
||||
global $database;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class BulkImportExport extends DataHandlerExtension
|
|||
|
||||
$tmpfile = tempnam(sys_get_temp_dir(), "shimmie_bulk_import");
|
||||
$stream = $zip->getStream($item->hash);
|
||||
if ($zip === false) {
|
||||
if ($stream === false) {
|
||||
throw new SCoreException("Could not import " . $item->hash . ": File not in zip");
|
||||
}
|
||||
|
||||
|
|
|
@ -72,12 +72,11 @@ class Index extends Extension
|
|||
}
|
||||
|
||||
$total_pages = (int)ceil(Search::count_images($search_terms) / $config->get_int(IndexConfig::IMAGES));
|
||||
$images = [];
|
||||
|
||||
if (SPEED_HAX && $total_pages > $fast_page_limit && !$user->can("big_search")) {
|
||||
$total_pages = $fast_page_limit;
|
||||
}
|
||||
|
||||
$images = null;
|
||||
if (SPEED_HAX) {
|
||||
if ($count_search_terms === 0 && ($page_number < 10)) {
|
||||
// extra caching for the first few post/list pages
|
||||
|
@ -88,8 +87,7 @@ class Index extends Extension
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$images) {
|
||||
if (is_null($images)) {
|
||||
$images = Search::find_images(($page_number - 1) * $page_size, $page_size, $search_terms);
|
||||
}
|
||||
} catch (PermissionDeniedException $pde) {
|
||||
|
|
|
@ -18,7 +18,8 @@ class ResolutionLimit extends Extension
|
|||
$min_h = $config->get_int("upload_min_height", -1);
|
||||
$max_w = $config->get_int("upload_max_width", -1);
|
||||
$max_h = $config->get_int("upload_max_height", -1);
|
||||
$ratios = explode(" ", $config->get_string("upload_ratios", ""));
|
||||
$rs = $config->get_string("upload_ratios", "");
|
||||
$ratios = trim($rs) ? explode(" ", $rs) : [];
|
||||
|
||||
$image = $event->image;
|
||||
|
||||
|
|
Reference in a new issue