diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2013-02-07 15:09:15 -0500 | 
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2013-02-07 15:09:15 -0500 | 
| commit | 59371077c28a9af149bdc0f4aa97ce8037755dcb (patch) | |
| tree | 7dc58475d21b62cb2711cc94a1c3c959477cdf49 /modules/gallery/helpers | |
| parent | 27ec3b4c6c9e5bd9fa61fd613b9b68af37eab1e4 (diff) | |
| parent | 0f7eecbf9b99bcf214c7a07ad8df771d18db787f (diff) | |
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers')
| -rw-r--r-- | modules/gallery/helpers/graphics.php | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 7c8e89d5..4df57fba 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -314,12 +314,19 @@ class graphics_Core {    }    /** -   * Mark thumbnails and resizes as dirty.  They will have to be rebuilt. +   * Mark thumbnails and resizes as dirty.  They will have to be rebuilt.  Optionally, only those of +   * a specified type and/or mime type can be marked (e.g. $type="movie" to rebuild movies only).     */ -  static function mark_dirty($thumbs, $resizes) { +  static function mark_dirty($thumbs, $resizes, $type=null, $mime_type=null) {      if ($thumbs || $resizes) {        $db = db::build()          ->update("items"); +      if ($type) { +        $db->where("type", "=", $type); +      } +      if ($mime_type) { +        $db->where("mime_type", "=", $mime_type); +      }        if ($thumbs) {          $db->set("thumb_dirty", 1);        } | 
