Add maintenance operations?

joboyogi

Joined: 2011-08-29
Posts: 2
Posted: Mon, 2011-08-29 21:20

Hello,

Just wondering if there's a way to add some commands to the maintenance operations. I'd like to add the following commands to quickly fix bad upload/resizing:

"

UPDATE gal_items SET thumb_dirty = CASE
WHEN thumb_height >200 THEN 1
END

UPDATE gal_items SET resize_dirty = CASE
WHEN resize_height >700 THEN 1
END

UPDATE gal_items SET thumb_dirty = CASE
WHEN thumb_height IS NULL THEN 1
END

UPDATE gal_items SET resize_dirty = CASE
WHEN resize_height IS NULL THEN 1
END

"

As a feature it would be great if the "200" would just relate to the default thumb_height field and "700" would relate to the default resize_height field.

Is there a way to add this to the current maintenance operations?

Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2011-09-01 23:08

There is a rebuild items module that has similar non direct DB updates.

The tag and EXIF modules have task_Core functions that add tasks to the maintenance page.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team