Permalink
Browse files

If captured had been used for any sort orders, reset back to weight

  • Loading branch information...
1 parent 76a9e5b commit c01e467466eff51926108d030f21385179fa24d2 @talmdal talmdal committed Sep 21, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 modules/gallery/helpers/gallery_installer.php
View
2 modules/gallery/helpers/gallery_installer.php
@@ -367,6 +367,8 @@ static function upgrade($version) {
if ($version == 12) {
// remove the capture field if exif is not installed and it has no data
if (!module::is_active("exif")) {
+ $db->query("update g3_items set sort_order = 'weight'
+ where type = 'album' and sort_order = 'captured';");
$total_records = $db->query("SELECT COUNT(id) as total_records FROM {items}")
->current()->total_records;
$count_null = $db->query("SELECT COUNT(id) as count_null FROM {items} where `captured`is NULL")

0 comments on commit c01e467

Please sign in to comment.