diff --git a/core/basethemelet.class.php b/core/basethemelet.class.php index 27b5d818..06fadc20 100644 --- a/core/basethemelet.class.php +++ b/core/basethemelet.class.php @@ -91,7 +91,7 @@ class BaseThemelet { private function build_paginator($current_page, $total_pages, $base_url, $query) { $next = $current_page + 1; $prev = $current_page - 1; - $rand = rand(1, $total_pages); + $rand = mt_rand(1, $total_pages); $at_start = ($current_page <= 1 || $total_pages <= 1); $at_end = ($current_page >= $total_pages); diff --git a/ext/artists/main.php b/ext/artists/main.php index 984b12af..0b1d40b7 100644 --- a/ext/artists/main.php +++ b/ext/artists/main.php @@ -45,7 +45,7 @@ class Artists extends Extension { public function onSearchTermParse(SearchTermParseEvent $event) { $matches = array(); - if(preg_match("/^author[=|:](.*)$/", $event->term, $matches)) { + if(preg_match("/^author[=|:](.*)$/i", $event->term, $matches)) { $char = $matches[1]; $event->add_querylet(new Querylet("Author = :author_char", array("author_char"=>$char))); } diff --git a/ext/comment/main.php b/ext/comment/main.php index 1c472626..107b2247 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -262,7 +262,7 @@ class CommentList extends Extension { public function onSearchTermParse(SearchTermParseEvent $event) { $matches = array(); - if(preg_match("/^comments([:]?<|[:]?>|[:]?<=|[:]?>=|[:|=])(\d+)$/", $event->term, $matches)) { + if(preg_match("/^comments([:]?<|[:]?>|[:]?<=|[:]?>=|[:|=])(\d+)$/i", $event->term, $matches)) { $cmp = ltrim($matches[1], ":") ?: "="; $comments = $matches[2]; $event->add_querylet(new Querylet("images.id IN (SELECT DISTINCT image_id FROM comments GROUP BY image_id HAVING count(image_id) $cmp $comments)")); diff --git a/ext/favorites/main.php b/ext/favorites/main.php index 6517377e..21ce0829 100644 --- a/ext/favorites/main.php +++ b/ext/favorites/main.php @@ -117,7 +117,7 @@ class Favorites extends Extension { public function onSearchTermParse(SearchTermParseEvent $event) { $matches = array(); - if(preg_match("/^favorites([:]?<|[:]?>|[:]?<=|[:]?>=|[:|=])(\d+)$/", $event->term, $matches)) { + if(preg_match("/^favorites([:]?<|[:]?>|[:]?<=|[:]?>=|[:|=])(\d+)$/i", $event->term, $matches)) { $cmp = ltrim($matches[1], ":") ?: "="; $favorites = $matches[2]; $event->add_querylet(new Querylet("images.id IN (SELECT id FROM images WHERE favorites $cmp $favorites)")); diff --git a/ext/index/main.php b/ext/index/main.php index 3c5e66b8..a251f484 100644 --- a/ext/index/main.php +++ b/ext/index/main.php @@ -109,6 +109,7 @@ *
  • downvoted_by=Username -- search for a user's dislikes *
  • upvoted_by_id=UserID -- search for a user's likes by user ID *
  • downvoted_by_id=UserID -- search for a user's dislikes by user ID + *
  • order=score_(ASC, DESC) -- find all images sorted from by score * *
  • Image Rating *