mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-04 03:59:09 -04:00
Merge branch 'master' of https://github.com/bwdutton/gallery3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
dist: bionic
|
||||
language: php
|
||||
php:
|
||||
- 5.6
|
||||
- 7.2
|
||||
|
||||
branches:
|
||||
@@ -8,6 +8,10 @@ branches:
|
||||
- 3.0.x
|
||||
- 3.1.x
|
||||
- master
|
||||
- /^travis\/.*$/
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
services:
|
||||
- mysql
|
||||
|
||||
@@ -25,52 +25,52 @@ use lsolesen\pel\PelTag;
|
||||
use lsolesen\pel\PelTiff;
|
||||
|
||||
class autorotate {
|
||||
static function rotate_item($item) {
|
||||
|
||||
// Only try to rotate photos based on EXIF
|
||||
if ($item->is_photo() && $item->mime_type == "image/jpeg") {
|
||||
$exif_data = exif_read_data($item->file_path());
|
||||
static function rotate_item($item) {
|
||||
|
||||
if (isset($exif_data["Orientation"]) && $exif_data["Orientation"]) {
|
||||
$orientation = $exif_data["Orientation"];
|
||||
$degrees = 0;
|
||||
// Only try to rotate photos based on EXIF
|
||||
if ($item->is_photo() && $item->mime_type == "image/jpeg") {
|
||||
$exif_data = exif_read_data($item->file_path());
|
||||
|
||||
if ($orientation == '3') {
|
||||
$degrees = 180;
|
||||
}
|
||||
else if ($orientation == '8') {
|
||||
$degrees = -90;
|
||||
}
|
||||
else if ($orientation == '6') {
|
||||
$degrees = 90;
|
||||
}
|
||||
if (isset($exif_data["Orientation"]) && $exif_data["Orientation"]) {
|
||||
$orientation = $exif_data["Orientation"];
|
||||
$degrees = 0;
|
||||
|
||||
if($degrees) {
|
||||
$tmpfile = tempnam(TMPPATH, "rotate");
|
||||
gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees));
|
||||
if ($orientation == '3') {
|
||||
$degrees = 180;
|
||||
}
|
||||
else if ($orientation == '8') {
|
||||
$degrees = -90;
|
||||
}
|
||||
else if ($orientation == '6') {
|
||||
$degrees = 90;
|
||||
}
|
||||
|
||||
// Update EXIF info
|
||||
$data = new PelDataWindow(file_get_contents($tmpfile));
|
||||
if (PelJpeg::isValid($data)) {
|
||||
$jpeg = $file = new PelJpeg();
|
||||
$jpeg->load($data);
|
||||
$exif = $jpeg->getExif();
|
||||
if($degrees) {
|
||||
$tmpfile = tempnam(TMPPATH, "rotate");
|
||||
gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees));
|
||||
|
||||
if($exif !== null) {
|
||||
$tiff = $exif->getTiff();
|
||||
$ifd0 = $tiff->getIfd();
|
||||
$orientation = $ifd0->getEntry(PelTag::ORIENTATION);
|
||||
$orientation->setValue(1);
|
||||
file_put_contents($tmpfile, $file->getBytes());
|
||||
}
|
||||
}
|
||||
// Update EXIF info
|
||||
$data = new PelDataWindow(file_get_contents($tmpfile));
|
||||
if (PelJpeg::isValid($data)) {
|
||||
$jpeg = $file = new PelJpeg();
|
||||
$jpeg->load($data);
|
||||
$exif = $jpeg->getExif();
|
||||
|
||||
$item->set_data_file($tmpfile);
|
||||
$item->save();
|
||||
unlink($tmpfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if($exif !== null) {
|
||||
$tiff = $exif->getTiff();
|
||||
$ifd0 = $tiff->getIfd();
|
||||
$orientation = $ifd0->getEntry(PelTag::ORIENTATION);
|
||||
$orientation->setValue(1);
|
||||
file_put_contents($tmpfile, $file->getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
$item->set_data_file($tmpfile);
|
||||
$item->save();
|
||||
unlink($tmpfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,18 +41,18 @@
|
||||
});
|
||||
|
||||
$('body').on('click', '.g-button', function() {
|
||||
var a = $(this);
|
||||
if (a.find('span.ui-icon-seek-next, span.ui-icon-seek-end, span.ui-icon-seek-prev, span.ui-icon-seek-first').length > 0) {
|
||||
event.stopPropagation();
|
||||
$.scrollTo(0, 800, { easing: "swing" });
|
||||
a.parents(".ui-tabs-panel").load(
|
||||
a.attr("href"),
|
||||
function() {
|
||||
fix_links();
|
||||
});
|
||||
var a = $(this);
|
||||
if (a.find('span.ui-icon-seek-next, span.ui-icon-seek-end, span.ui-icon-seek-prev, span.ui-icon-seek-first').length > 0) {
|
||||
event.stopPropagation();
|
||||
$.scrollTo(0, 800, { easing: "swing" });
|
||||
a.parents(".ui-tabs-panel").load(
|
||||
a.attr("href"),
|
||||
function() {
|
||||
fix_links();
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ function formatData($type,$tag,$intel,$data) {
|
||||
case '9000': // ExifVersion
|
||||
case 'a000': // FlashPixVersion
|
||||
case '0002': // InteroperabilityVersion
|
||||
$data=(string) t('version').' '.$data/100;
|
||||
$data=(string) t('version').' '.($data && is_numeric($data) ? $data/100 : $data);
|
||||
break;
|
||||
case 'a300': // FileSource
|
||||
$data = bin2hex($data);
|
||||
|
||||
@@ -24,8 +24,11 @@ class num extends num_Core {
|
||||
* ref: http://us2.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
|
||||
*/
|
||||
static function convert_to_bytes($val) {
|
||||
$val = trim($val);
|
||||
$last = strtolower($val[strlen($val)-1]);
|
||||
$val = strtolower(trim($val));
|
||||
$len = strlen($val);
|
||||
$last = $val[$len-1];
|
||||
$val = $val[$len-2];
|
||||
|
||||
switch($last) {
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
|
||||
@@ -186,7 +186,9 @@ class File_Structure_Test extends Gallery_Unit_Test_Case {
|
||||
break;
|
||||
|
||||
default:
|
||||
if (preg_match("/views/", $path)) {
|
||||
if (preg_match("/modules\/(autorotate|movie_resized)/", $path)) {
|
||||
# including unmodified 3rd party code
|
||||
} elseif (preg_match("/views/", $path)) {
|
||||
$this->_check_view_preamble($path, $errors);
|
||||
} else {
|
||||
$this->_check_php_preamble($path, $errors);
|
||||
|
||||
@@ -62,6 +62,7 @@ class Gallery_I18n_Test extends Gallery_Unit_Test_Case {
|
||||
$this->i18n->locale("de_DE");
|
||||
$locale = $this->i18n->locale();
|
||||
$this->assert_equal("de_DE", $locale);
|
||||
$this->i18n->locale("en_US");
|
||||
}
|
||||
|
||||
public function translate_simple_test() {
|
||||
@@ -106,4 +107,4 @@ class Gallery_I18n_Test extends Gallery_Unit_Test_Case {
|
||||
array('count' => 0));
|
||||
$this->assert_equal('0 Elemente wurden hinzugefuegt.', $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR text
|
||||
modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY_ATTR $comment->author()->avatar_url(32,$theme->url(,true))
|
||||
modules/comment/views/admin_block_recent_comments.html.php 10 DIRTY gallery::date_time($comment->created)
|
||||
modules/comment/views/admin_comments.html.php 5 DIRTY $form
|
||||
modules/comment/views/admin_manage_comments.html.php 45 DIRTY $menu->render()
|
||||
modules/comment/views/admin_manage_comments.html.php 60 DIRTY $menu->render()
|
||||
modules/comment/views/admin_manage_comments_queue.html.php 40 DIRTY $theme->paginator()
|
||||
modules/comment/views/admin_manage_comments_queue.html.php 55 DIRTY_ATTR $comment->id
|
||||
modules/comment/views/admin_manage_comments_queue.html.php 55 DIRTY_ATTR text::alternate("g-odd","g-even")
|
||||
@@ -180,6 +180,10 @@ modules/gallery/views/error_admin.html.php 285 DIRTY_JS $env_i
|
||||
modules/gallery/views/error_admin.html.php 285 DIRTY $var
|
||||
modules/gallery/views/error_admin.html.php 286 DIRTY_ATTR $env_id
|
||||
modules/gallery/views/error_admin.html.php 296 DIRTY Kohana_Exception::safe_dump($value,$key)
|
||||
modules/gallery/views/form_dropzone.html.php 18 DIRTY_JS $simultaneous_upload_limit
|
||||
modules/gallery/views/form_dropzone.html.php 19 DIRTY_JS implode(",",$extensions)
|
||||
modules/gallery/views/form_dropzone.html.php 20 DIRTY_JS $size_limit_megs
|
||||
modules/gallery/views/form_dropzone.html.php 23 DIRTY_JS url::site("uploader/add_photo/{$album->id}")
|
||||
modules/gallery/views/form_uploadify.html.php 16 DIRTY_JS url::site("uploader/status/_S/_E")
|
||||
modules/gallery/views/form_uploadify.html.php 24 DIRTY_JS $flash_minimum_version
|
||||
modules/gallery/views/form_uploadify.html.php 28 DIRTY_JS url::file("lib/uploadify/uploadify.swf.php")
|
||||
@@ -411,6 +415,53 @@ themes/admin_wind/views/paginator.html.php 35 DIRTY_JS $first
|
||||
themes/admin_wind/views/paginator.html.php 44 DIRTY_JS $previous_page_url
|
||||
themes/admin_wind/views/paginator.html.php 70 DIRTY_JS $next_page_url
|
||||
themes/admin_wind/views/paginator.html.php 79 DIRTY_JS $last_page_url
|
||||
themes/widewind/views/album.html.php 19 DIRTY_ATTR $child->id
|
||||
themes/widewind/views/album.html.php 19 DIRTY_ATTR $item_class
|
||||
themes/widewind/views/album.html.php 21 DIRTY_JS $child->url()
|
||||
themes/widewind/views/album.html.php 23 DIRTY $child->thumb_img(array("class"=>"g-thumbnail"))
|
||||
themes/widewind/views/album.html.php 28 DIRTY_ATTR $item_class
|
||||
themes/widewind/views/album.html.php 29 DIRTY_JS $child->url()
|
||||
themes/widewind/views/album.html.php 47 DIRTY $theme->paginator()
|
||||
themes/widewind/views/block.html.php 3 DIRTY_ATTR $anchor
|
||||
themes/widewind/views/block.html.php 5 DIRTY_ATTR $css_id
|
||||
themes/widewind/views/block.html.php 6 DIRTY $title
|
||||
themes/widewind/views/block.html.php 8 DIRTY $content
|
||||
themes/widewind/views/dynamic.html.php 11 DIRTY_ATTR $child->is_album()?"g-album":""
|
||||
themes/widewind/views/dynamic.html.php 13 DIRTY_JS $child->url()
|
||||
themes/widewind/views/dynamic.html.php 14 DIRTY_ATTR $child->id
|
||||
themes/widewind/views/dynamic.html.php 15 DIRTY_ATTR $child->thumb_url()
|
||||
themes/widewind/views/dynamic.html.php 16 DIRTY_ATTR $child->thumb_width
|
||||
themes/widewind/views/dynamic.html.php 17 DIRTY_ATTR $child->thumb_height
|
||||
themes/widewind/views/dynamic.html.php 29 DIRTY $theme->paginator()
|
||||
themes/widewind/views/movie.html.php 5 DIRTY $theme->paginator()
|
||||
themes/widewind/views/movie.html.php 9 DIRTY $item->movie_img(array("class"=>"g-movie","id"=>"g-item-id-{$item->id}"))
|
||||
themes/widewind/views/page.html.php 4 DIRTY $theme->html_attributes()
|
||||
themes/widewind/views/page.html.php 10 DIRTY $page_title
|
||||
themes/widewind/views/page.html.php 32 DIRTY $new_width
|
||||
themes/widewind/views/page.html.php 33 DIRTY $new_height
|
||||
themes/widewind/views/page.html.php 34 DIRTY $thumb_proportion
|
||||
themes/widewind/views/page.html.php 74 DIRTY_JS $theme->url()
|
||||
themes/widewind/views/page.html.php 79 DIRTY $theme->get_combined("css")
|
||||
themes/widewind/views/page.html.php 82 DIRTY $theme->get_combined("script")
|
||||
themes/widewind/views/page.html.php 92 DIRTY $header_text
|
||||
themes/widewind/views/page.html.php 94 DIRTY_JS item::root()->url()
|
||||
themes/widewind/views/page.html.php 98 DIRTY $theme->user_menu()
|
||||
themes/widewind/views/page.html.php 113 DIRTY_ATTR $breadcrumb->last?"g-active":""
|
||||
themes/widewind/views/page.html.php 114 DIRTY_ATTR $breadcrumb->first?"g-first":""
|
||||
themes/widewind/views/page.html.php 115 DIRTY_JS $breadcrumb->url
|
||||
themes/widewind/views/page.html.php 128 DIRTY $content
|
||||
themes/widewind/views/page.html.php 134 DIRTY newView("sidebar.html")
|
||||
themes/widewind/views/page.html.php 141 DIRTY $footer_text
|
||||
themes/widewind/views/paginator.html.php 33 DIRTY_JS $first_page_url
|
||||
themes/widewind/views/paginator.html.php 42 DIRTY_JS $previous_page_url
|
||||
themes/widewind/views/paginator.html.php 70 DIRTY_JS $next_page_url
|
||||
themes/widewind/views/paginator.html.php 79 DIRTY_JS $last_page_url
|
||||
themes/widewind/views/photo.html.php 7 DIRTY_JS $theme->item()->width
|
||||
themes/widewind/views/photo.html.php 7 DIRTY_JS $theme->item()->height
|
||||
themes/widewind/views/photo.html.php 17 DIRTY_JS url::site("items/dimensions/".$theme->item()->id)
|
||||
themes/widewind/views/photo.html.php 31 DIRTY $theme->paginator()
|
||||
themes/widewind/views/photo.html.php 36 DIRTY_JS $item->file_url()
|
||||
themes/widewind/views/photo.html.php 38 DIRTY $item->resize_img(array("id"=>"g-item-id-{$item->id}","class"=>"g-resize"))
|
||||
themes/wind/views/album.html.php 19 DIRTY_ATTR $child->id
|
||||
themes/wind/views/album.html.php 19 DIRTY_ATTR $item_class
|
||||
themes/wind/views/album.html.php 21 DIRTY_JS $child->url()
|
||||
|
||||
@@ -5,26 +5,26 @@
|
||||
var myDropzone;
|
||||
|
||||
Dropzone.options.gAddPhotosForm = {
|
||||
init: function() {
|
||||
this.on("success", function(file) {
|
||||
setTimeout(function() {
|
||||
myDropzone.removeFile(file);
|
||||
}, 5000);
|
||||
});
|
||||
},
|
||||
dictDefaultMessage: 'Drop files here or click to upload',
|
||||
previewTemplate: document.querySelector('#imageStatusTemplate').innerHTML,
|
||||
paramName: "Filedata", // The name that will be used to transfer the file
|
||||
parallelUploads: <?= $simultaneous_upload_limit ?>,
|
||||
acceptedFiles: "<?= implode(",", $extensions) ?>",
|
||||
maxFilesize: <?= $size_limit_megs ?>
|
||||
init: function() {
|
||||
this.on("success", function(file) {
|
||||
setTimeout(function() {
|
||||
myDropzone.removeFile(file);
|
||||
}, 5000);
|
||||
});
|
||||
},
|
||||
dictDefaultMessage: 'Drop files here or click to upload',
|
||||
previewTemplate: document.querySelector('#imageStatusTemplate').innerHTML,
|
||||
paramName: "Filedata", // The name that will be used to transfer the file
|
||||
parallelUploads: <?= $simultaneous_upload_limit ?>,
|
||||
acceptedFiles: "<?= implode(",", $extensions) ?>",
|
||||
maxFilesize: <?= $size_limit_megs ?>
|
||||
};
|
||||
|
||||
myDropzone = new Dropzone("form.dropzone", { url: "<?= url::site("uploader/add_photo/{$album->id}") ?>" });
|
||||
|
||||
$('body').on('click', "#g-upload-cancel-all", function() {
|
||||
myDropzone.removeAllFiles(true);
|
||||
return false;
|
||||
myDropzone.removeAllFiles(true);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -65,31 +65,31 @@
|
||||
|
||||
<!-- css wasn't overriding these values? copy/pasted default icons here and changed the fill -->
|
||||
<div style="display:none" id="imageStatusTemplate">
|
||||
<div class="dz-preview dz-file-preview">
|
||||
<div class="dz-image"><img data-dz-thumbnail /></div>
|
||||
<div class="dz-details"><div class="dz-size"><span data-dz-size></span></div>
|
||||
<div class="dz-filename"><span data-dz-name></span></div></div>
|
||||
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
||||
<div class="dz-success-mark">
|
||||
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>Check</title>
|
||||
<defs></defs>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#008000" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="dz-error-mark">
|
||||
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>Error</title>
|
||||
<defs></defs>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<g sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="red" fill-opacity="0.816519475">
|
||||
<path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dz-preview dz-file-preview">
|
||||
<div class="dz-image"><img data-dz-thumbnail /></div>
|
||||
<div class="dz-details"><div class="dz-size"><span data-dz-size></span></div>
|
||||
<div class="dz-filename"><span data-dz-name></span></div></div>
|
||||
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
||||
<div class="dz-success-mark">
|
||||
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>Check</title>
|
||||
<defs></defs>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#008000" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="dz-error-mark">
|
||||
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<title>Error</title>
|
||||
<defs></defs>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<g sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="red" fill-opacity="0.816519475">
|
||||
<path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@ class Gallery_Unit_Test_Controller extends Controller {
|
||||
|
||||
// Force strict behavior to flush out bugs early
|
||||
ini_set("display_errors", true);
|
||||
//error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
error_reporting(-1);
|
||||
|
||||
// Jump through some hoops to satisfy the way that we check for the site_domain in
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.");
|
||||
|
||||
class movie_resized_event_Core {
|
||||
static function movie_img ($movie_img, $obj) {
|
||||
$resize_file = $obj->resize_path().'.mp4';
|
||||
$relative_file = $obj->relative_path();
|
||||
$resize_url = $obj->resize_url(true);
|
||||
#print pretty_backtrace();
|
||||
static function movie_img ($movie_img, $obj) {
|
||||
$resize_file = $obj->resize_path().'.mp4';
|
||||
$relative_file = $obj->relative_path();
|
||||
$resize_url = $obj->resize_url(true);
|
||||
#print pretty_backtrace();
|
||||
|
||||
if (file_exists($resize_file)) {
|
||||
// in case the resize is a different size
|
||||
list ($width, $height, $mime_type, $ext, $duration) = movie::get_file_metadata($resize_file);
|
||||
if (file_exists($resize_file)) {
|
||||
// in case the resize is a different size
|
||||
list ($width, $height, $mime_type, $ext, $duration) = movie::get_file_metadata($resize_file);
|
||||
|
||||
// copied this from modules/gallery/models/items.php
|
||||
$view = new View("movieplayer.html");
|
||||
$view->width = $width ? $width : $movie_img->width;
|
||||
$view->height = $height ? $height : $movie_img->height;
|
||||
$view->url = str_replace($relative_file, $relative_file.'.mp4', $resize_url);
|
||||
// copied this from modules/gallery/models/items.php
|
||||
$view = new View("movieplayer.html");
|
||||
$view->width = $width ? $width : $movie_img->width;
|
||||
$view->height = $height ? $height : $movie_img->height;
|
||||
$view->url = str_replace($relative_file, $relative_file.'.mp4', $resize_url);
|
||||
|
||||
// add some scalling logic
|
||||
$view->width = $view->width/2;
|
||||
$view->height = $view->height/2;
|
||||
// add some scalling logic
|
||||
$view->width = $view->width/2;
|
||||
$view->height = $view->height/2;
|
||||
|
||||
#$movie_img->view[] = $view->render();
|
||||
$movie_img->view[] = "<video src=\"{$view->url}\" width=\"{$view->width}\" height=\"{$view->height}\" controls style=\"max-width: 100%\"></video>";
|
||||
}
|
||||
}
|
||||
#$movie_img->view[] = $view->render();
|
||||
$movie_img->view[] = "<video src=\"{$view->url}\" width=\"{$view->width}\" height=\"{$view->height}\" controls style=\"max-width: 100%\"></video>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class PasswordHash {
|
||||
var $portable_hashes;
|
||||
var $random_state;
|
||||
|
||||
function PasswordHash($iteration_count_log2, $portable_hashes)
|
||||
function __construct($iteration_count_log2, $portable_hashes)
|
||||
{
|
||||
$this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
@@ -59,4 +59,4 @@
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
----------------------------------*/
|
||||
.ui-dialog { position: relative; padding: .2em; width: 300px; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 0; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; padding: 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<? // @todo Set hover on AlbumGrid list items for guest users ?>
|
||||
<div id="g-info">
|
||||
<?= $theme->album_top() ?>
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div class="g-description"><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<ul id="g-album-grid" class="ui-helper-clearfix">
|
||||
<? if (count($children)): ?>
|
||||
<? foreach ($children as $i => $child): ?>
|
||||
<? $item_class = "g-photo"; ?>
|
||||
<? if ($child->is_album()): ?>
|
||||
<? $item_class = "g-album"; ?>
|
||||
<? endif ?>
|
||||
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
|
||||
<?= $theme->thumb_top($child) ?>
|
||||
<a href="<?= $child->url() ?>">
|
||||
<? if ($child->has_thumb()): ?>
|
||||
<?= $child->thumb_img(array("class" => "g-thumbnail")) ?>
|
||||
<? endif ?>
|
||||
</a>
|
||||
<?= $theme->thumb_bottom($child) ?>
|
||||
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
|
||||
<h2><span class="<?= $item_class ?>"></span>
|
||||
<a href="<?= $child->url() ?>"><?= html::purify($child->title) ?></a></h2>
|
||||
<ul class="g-metadata">
|
||||
<?= $theme->thumb_info($child) ?>
|
||||
</ul>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
<? else: ?>
|
||||
<? if ($user->admin || access::can("add", $item)): ?>
|
||||
<? $addurl = url::site("uploader/index/$item->id") ?>
|
||||
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
|
||||
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
|
||||
<? else: ?>
|
||||
<li><?= t("There aren't any photos here yet!") ?></li>
|
||||
<? endif; ?>
|
||||
<? endif; ?>
|
||||
</ul>
|
||||
<?= $theme->album_bottom() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
@@ -1,153 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?= $theme->html_attributes() ?> xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<? $theme->start_combining("script,css") ?>
|
||||
<title>
|
||||
<? if ($page_title): ?>
|
||||
<?= $page_title ?>
|
||||
<? else: ?>
|
||||
<? if ($theme->item()): ?>
|
||||
<?= $theme->item()->title ?>
|
||||
<? elseif ($theme->tag()): ?>
|
||||
<?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?>
|
||||
<? else: /* Not an item, not a tag, no page_title specified. Help! */ ?>
|
||||
<?= item::root()->title ?>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
</title>
|
||||
<link rel="shortcut icon"
|
||||
href="<?= url::file(module::get_var("gallery", "favicon_url")) ?>"
|
||||
type="image/x-icon" />
|
||||
<link rel="apple-touch-icon-precomposed"
|
||||
href="<?= url::file(module::get_var("gallery", "apple_touch_icon_url")) ?>" />
|
||||
<? if ($theme->page_type == "collection"): ?>
|
||||
<? if (($thumb_proportion = $theme->thumb_proportion($theme->item())) != 1): ?>
|
||||
<? $new_width = round($thumb_proportion * 213) ?>
|
||||
<? $new_height = round($thumb_proportion * 240) ?>
|
||||
<style type="text/css">
|
||||
.g-view #g-content #g-album-grid .g-item {
|
||||
width: <?= $new_width ?>px;
|
||||
height: <?= $new_height ?>px;
|
||||
/* <?= $thumb_proportion ?> */
|
||||
}
|
||||
</style>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
|
||||
<?= $theme->script("json2-min.js") ?>
|
||||
<?= $theme->script("jquery.js") ?>
|
||||
<?= $theme->script("jquery.form.js") ?>
|
||||
<?= $theme->script("jquery-ui.js") ?>
|
||||
<?= $theme->script("gallery.common.js") ?>
|
||||
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
|
||||
<script type="text/javascript">
|
||||
var MSG_CANCEL = <?= t('Cancel')->for_js() ?>;
|
||||
</script>
|
||||
<?= $theme->script("gallery.ajax.js") ?>
|
||||
<?= $theme->script("gallery.dialog.js") ?>
|
||||
<?= $theme->script("superfish/js/superfish.js") ?>
|
||||
<?= $theme->script("jquery.localscroll.js") ?>
|
||||
|
||||
<? /* These are page specific but they get combined */ ?>
|
||||
<? if ($theme->page_subtype == "photo"): ?>
|
||||
<?= $theme->script("jquery.scrollTo.js") ?>
|
||||
<?= $theme->script("gallery.show_full_size.js") ?>
|
||||
<? elseif ($theme->page_subtype == "movie"): ?>
|
||||
<?= $theme->script("flowplayer.js") ?>
|
||||
<? endif ?>
|
||||
|
||||
<?= $theme->head() ?>
|
||||
|
||||
<? /* Theme specific CSS/JS goes last so that it can override module CSS/JS */ ?>
|
||||
<?= $theme->script("ui.init.js") ?>
|
||||
<?= $theme->css("yui/reset-fonts-grids.css") ?>
|
||||
<?= $theme->css("superfish/css/superfish.css") ?>
|
||||
<?= $theme->css("themeroller/ui.base.css") ?>
|
||||
<?= $theme->css("screen.css") ?>
|
||||
<? if (locales::is_rtl()): ?>
|
||||
<?= $theme->css("screen-rtl.css") ?>
|
||||
<? endif; ?>
|
||||
<!--[if lte IE 8]>
|
||||
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
|
||||
media="screen,print,projection" />
|
||||
<![endif]-->
|
||||
|
||||
<!-- LOOKING FOR YOUR CSS? It's all been combined into the link below -->
|
||||
<?= $theme->get_combined("css") ?>
|
||||
|
||||
<!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below -->
|
||||
<?= $theme->get_combined("script") ?>
|
||||
</head>
|
||||
|
||||
<body <?= $theme->body_attributes() ?>>
|
||||
<?= $theme->page_top() ?>
|
||||
<div id="doc3" class="yui-t5 g-view">
|
||||
<?= $theme->site_status() ?>
|
||||
<div id="g-header" class="ui-helper-clearfix">
|
||||
<div id="g-banner">
|
||||
<? if ($header_text = module::get_var("gallery", "header_text")): ?>
|
||||
<?= $header_text ?>
|
||||
<? else: ?>
|
||||
<a id="g-logo" class="g-left" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery home")->for_html_attr() ?>">
|
||||
<img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site")->for_html_attr() ?>" src="<?= url::file("lib/images/logo.png") ?>" />
|
||||
</a>
|
||||
<? endif ?>
|
||||
<?= $theme->user_menu() ?>
|
||||
<?= $theme->header_top() ?>
|
||||
|
||||
<!-- hide the menu until after the page has loaded, to minimize menu flicker -->
|
||||
<div id="g-site-menu" style="visibility: hidden">
|
||||
<?= $theme->site_menu($theme->item() ? "#g-item-id-{$theme->item()->id}" : "") ?>
|
||||
</div>
|
||||
<script type="text/javascript"> $(document).ready(function() { $("#g-site-menu").css("visibility", "visible"); }) </script>
|
||||
|
||||
<?= $theme->header_bottom() ?>
|
||||
</div>
|
||||
|
||||
<? if (!empty($breadcrumbs)): ?>
|
||||
<ul class="g-breadcrumbs">
|
||||
<? foreach ($breadcrumbs as $breadcrumb): ?>
|
||||
<li class="<?= $breadcrumb->last ? "g-active" : "" ?>
|
||||
<?= $breadcrumb->first ? "g-first" : "" ?>">
|
||||
<? if (!$breadcrumb->last): ?> <a href="<?= $breadcrumb->url ?>"><? endif ?>
|
||||
<?= html::purify(text::limit_chars($breadcrumb->title, module::get_var("gallery", "visible_title_length"))) ?>
|
||||
<? if (!$breadcrumb->last): ?></a><? endif ?>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<div id="g-content" class="yui-g">
|
||||
<?= $theme->messages() ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="g-sidebar" class="yui-b">
|
||||
<? if ($theme->page_subtype != "login"): ?>
|
||||
<?= new View("sidebar.html") ?>
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="g-footer" class="ui-helper-clearfix">
|
||||
<?= $theme->footer() ?>
|
||||
<? if ($footer_text = module::get_var("gallery", "footer_text")): ?>
|
||||
<?= $footer_text ?>
|
||||
<? endif ?>
|
||||
|
||||
<? if (module::get_var("gallery", "show_credits")): ?>
|
||||
<ul id="g-credits" class="g-inline">
|
||||
<?= $theme->credits() ?>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?= $theme->page_bottom() ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<? if (access::can("view_full", $theme->item())): ?>
|
||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
||||
$(".g-fullsize-link").click(function() {
|
||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
||||
return false;
|
||||
});
|
||||
|
||||
// After the image is rotated or replaced we have to reload the image dimensions
|
||||
// so that the full size view isn't distorted.
|
||||
$("#g-photo").bind("gallery.change", function() {
|
||||
$.ajax({
|
||||
url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus) {
|
||||
full_dims = data.full;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<? endif ?>
|
||||
|
||||
<div id="g-item">
|
||||
<?= $theme->photo_top() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
|
||||
<div id="g-photo">
|
||||
<?= $theme->resize_top($item) ?>
|
||||
<? if (access::can("view_full", $item)): ?>
|
||||
<a href="<?= $item->file_url() ?>" class="g-fullsize-link" title="<?= t("View full size")->for_html_attr() ?>">
|
||||
<? endif ?>
|
||||
<?= $item->resize_img(array("id"
|
||||
=> "g-item-id-{$item->id}", "class"
|
||||
=> "g-resize", "style"
|
||||
=> "width:100%;max-width:{$item->resize_width}px;height:auto;")) ?>
|
||||
<? if (access::can("view_full", $item)): ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<?= $theme->resize_bottom($item) ?>
|
||||
</div>
|
||||
|
||||
<div id="g-info">
|
||||
<h1><?= html::purify($item->title) ?></h1>
|
||||
<div><?= nl2br(html::purify($item->description)) ?></div>
|
||||
</div>
|
||||
|
||||
<?= $theme->photo_bottom() ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user