diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/controllers/file.php | 2 | ||||
-rw-r--r-- | application/views/file/fragments/thumbnail.php | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index 57e9d4d1d..a9c1ef12a 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -168,6 +168,7 @@ class File extends MY_Controller { case "image/png": case "image/gif": $filedata["tooltip"] = $this->_tooltip_for_image($filedata); + $filedata["orientation"] = libraries\Image::get_exif_orientation($file); $this->output_cache->add_merge( array("items" => array($filedata)), 'file/fragments/thumbnail' @@ -553,6 +554,7 @@ class File extends MY_Controller { continue; } $query[$key]["tooltip"] = $this->_tooltip_for_image($item); + $query[$key]["orientation"] = libraries\Image::get_exif_orientation($this->mfile->file($item["hash"])); } $this->data["items"] = $query; diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php index 0d7455369..61d15f325 100644 --- a/application/views/file/fragments/thumbnail.php +++ b/application/views/file/fragments/thumbnail.php @@ -3,7 +3,7 @@ <div class="container container-wide"> <div class="upload_thumbnails"><!-- <?php foreach($items as $key => $item): ?> - --><a rel="gallery" class="colorbox" href="<?php echo site_url("/".$item["id"])."/"; ?>" title="<?php echo htmlentities($item["filename"]); ?>" data-content="<?php echo htmlentities($item["tooltip"]); ?>" data-id="<?php echo $item["id"]; ?>"><img class="thumb" src="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"></a><!-- + --><a rel="gallery" class="colorbox" data-orientation="<?php echo $item["orientation"]; ?>" href="<?php echo site_url("/".$item["id"])."/"; ?>" title="<?php echo htmlentities($item["filename"]); ?>" data-content="<?php echo htmlentities($item["tooltip"]); ?>" data-id="<?php echo $item["id"]; ?>"><img class="thumb" src="<?php echo site_url("file/thumbnail/".$item["id"]); ?>"></a><!-- <?php endforeach; ?> --> </div> |