diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-12-28 23:10:05 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-12-28 23:10:05 -0800 |
| commit | b42fcb9cda4dafdb9db86770f54965b3fb2fc7ab (patch) | |
| tree | ef645fcb4a409cfd0c0eefcdb60c841b68d84258 /modules/gallery/helpers/gallery_installer.php | |
| parent | 9f3c6e4bee9f2ccae04b7b241c07845b9f233cfd (diff) | |
Use db::expr instead of "new Database_Expression". Resolves #1560.
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index a6b8e6a2..fb7933f7 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -503,7 +503,7 @@ class gallery_installer { foreach (db::build() ->from("items") ->select("id", "slug") - ->where(new Database_Expression("`slug` REGEXP '[^_A-Za-z0-9-]'"), "=", 1) + ->where(db::expr("`slug` REGEXP '[^_A-Za-z0-9-]'"), "=", 1) ->execute() as $row) { $new_slug = item::convert_filename_to_slug($row->slug); if (empty($new_slug)) { @@ -540,7 +540,7 @@ class gallery_installer { if ($version == 25) { db::build() ->update("items") - ->set("title", new Database_Expression("`name`")) + ->set("title", db::expr("`name`")) ->and_open() ->where("title", "IS", null) ->or_where("title", "=", "") @@ -581,7 +581,7 @@ class gallery_installer { $db->query("ALTER TABLE {modules} ADD COLUMN `weight` int(9) DEFAULT NULL"); $db->query("ALTER TABLE {modules} ADD KEY (`weight`)"); db::update("modules") - ->set("weight", new Database_Expression("`id`")) + ->set("weight", db::expr("`id`")) ->execute(); module::set_version("gallery", $version = 32); } |
