mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 09:43:51 -04:00
Use db::expr instead of "new Database_Expression". Resolves #1560.
This commit is contained in:
@@ -74,7 +74,7 @@ class gallery_task_Core {
|
||||
// Choose the dirty images in a random order so that if we run this task multiple times
|
||||
// concurrently each task is rebuilding different images simultaneously.
|
||||
$result = graphics::find_dirty_images_query()->select("id")
|
||||
->select(new Database_Expression("RAND() as r"))
|
||||
->select(db::expr("RAND() as r"))
|
||||
->order_by("r", "ASC")
|
||||
->execute();
|
||||
$total_count = $task->get("total_count", $result->count());
|
||||
@@ -608,7 +608,7 @@ class gallery_task_Core {
|
||||
static function find_dupe_slugs() {
|
||||
return db::build()
|
||||
->select_distinct(
|
||||
array("parent_slug" => new Database_Expression("CONCAT(`parent_id`, ':', LOWER(`slug`))")))
|
||||
array("parent_slug" => db::expr("CONCAT(`parent_id`, ':', LOWER(`slug`))")))
|
||||
->select("id")
|
||||
->select(array("C" => "COUNT(\"*\")"))
|
||||
->from("items")
|
||||
@@ -620,7 +620,7 @@ class gallery_task_Core {
|
||||
static function find_dupe_names() {
|
||||
return db::build()
|
||||
->select_distinct(
|
||||
array("parent_name" => new Database_Expression("CONCAT(`parent_id`, ':', LOWER(`name`))")))
|
||||
array("parent_name" => db::expr("CONCAT(`parent_id`, ':', LOWER(`name`))")))
|
||||
->select("id")
|
||||
->select(array("C" => "COUNT(\"*\")"))
|
||||
->from("items")
|
||||
|
||||
Reference in New Issue
Block a user