diff options
-rw-r--r-- | .build_number | 2 | ||||
-rw-r--r-- | lib/gallery.dialog.js | 4 | ||||
-rw-r--r-- | lib/gallery.panel.js | 2 | ||||
-rw-r--r-- | lib/gallery.show_full_size.js | 2 | ||||
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_upgrade_checker.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/quick.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 6 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_graphics.php | 21 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/upgrade_checker.php | 3 | ||||
-rw-r--r-- | modules/tag/controllers/tag.php | 4 | ||||
-rw-r--r-- | modules/tag/models/tag.php | 2 | ||||
-rw-r--r-- | themes/admin_wind/views/admin.html.php | 6 | ||||
-rw-r--r-- | themes/wind/views/page.html.php | 6 |
15 files changed, 36 insertions, 30 deletions
diff --git a/.build_number b/.build_number index ba31e80f..57366af8 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=64 +build_number=72 diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index ec187186..087b00ab 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -48,7 +48,7 @@ var content = ""; if (mimeType[1] == "application/json") { data = JSON.parse(data); - content = unescape(data.html); + content = data.html; } else { content = data; } @@ -160,7 +160,7 @@ } if (data.html) { - $("#g-dialog").html(unescape(data.html)); + $("#g-dialog").html(data.html); $("#g-dialog").dialog("option", "position", "center"); $("#g-dialog form :submit").removeClass("ui-state-disabled") .attr("disabled", null); diff --git a/lib/gallery.panel.js b/lib/gallery.panel.js index e0605ca3..0683c531 100644 --- a/lib/gallery.panel.js +++ b/lib/gallery.panel.js @@ -48,7 +48,7 @@ var content = ""; if (mimeType[1] == "application/json") { data = JSON.parse(data); - content = unescape(data.html); + content = data.html; } else { content = data; } diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 531d2a3a..0baee882 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -20,7 +20,7 @@ image_size = $.gallery_auto_fit_window(image_width, image_height); } else { image_size = { - top: Math.round((height - image_height) / 2), + top: 12, left: Math.round((width - image_width) / 2), width: Math.round(image_width), height: Math.round(image_height) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 5fd92972..22fb68c6 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -610,7 +610,7 @@ class g2_import_Core { if ($g2_preferred && $g2_preferred instanceof GalleryDerivative) { if (preg_match("/rotate\|(-?\d+)/", $g2_preferred->getDerivativeOperations(), $matches)) { $tmpfile = tempnam(TMPPATH, "rotate"); - gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $matches[1])); + gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $matches[1]), $item); $item->set_data_file($tmpfile); $item->save(); unlink($tmpfile); diff --git a/modules/gallery/controllers/admin_upgrade_checker.php b/modules/gallery/controllers/admin_upgrade_checker.php index a5cfcfc8..29d52a31 100644 --- a/modules/gallery/controllers/admin_upgrade_checker.php +++ b/modules/gallery/controllers/admin_upgrade_checker.php @@ -25,7 +25,7 @@ class Admin_Upgrade_Checker_Controller extends Admin_Controller { if ($message) { $message .= t( " <a href=\"%hide-url\"><i>(remind me later)</i></a>", - array("url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))); + array("hide-url" => url::site("admin/upgrade_checker/remind_me_later?csrf=__CSRF__"))); site_status::info($message, "upgrade_checker"); } else { site_status::clear("upgrade_checker"); diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php index 17abc39f..da4768fd 100644 --- a/modules/gallery/controllers/quick.php +++ b/modules/gallery/controllers/quick.php @@ -38,7 +38,7 @@ class Quick_Controller extends Controller { if ($degrees) { $tmpfile = tempnam(TMPPATH, "rotate") . "." . pathinfo($item->file_path(), PATHINFO_EXTENSION); - gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees)); + gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees), $item); $item->set_data_file($tmpfile); $item->save(); unlink($tmpfile); diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 07817187..fbdb4ad5 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -539,9 +539,9 @@ class gallery_event_Core { $v = new View("user_profile_info.html"); $fields = array("name" => t("Name"), "locale" => t("Language Preference"), - "email" => t("Email"), "full_name" => t("Full name"), "url" => "Web site"); + "email" => t("Email"), "full_name" => t("Full name"), "url" => t("Web site")); if (!$data->user->guest) { - $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => "Web site"); + $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => t("Web site")); } $v->user_profile_data = array(); foreach ($fields as $field => $label) { @@ -549,6 +549,8 @@ class gallery_event_Core { $value = $data->user->$field; if ($field == "locale") { $value = locales::display_name($value); + } elseif ($field == "url") { + $value = html::mark_clean(html::anchor($data->user->$field)); } $v->user_profile_data[(string) $label] = $value; } diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index e63b9336..716bad18 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -24,18 +24,19 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function rotate($input_file, $output_file, $options) { + static function rotate($input_file, $output_file, $options, $item=null) { graphics::init_toolkit(); - module::event("graphics_rotate", $input_file, $output_file, $options); + module::event("graphics_rotate", $input_file, $output_file, $options, $item); Image::factory($input_file) ->quality(module::get_var("gallery", "image_quality")) ->rotate($options["degrees"]) ->save($output_file); - module::event("graphics_rotate_completed", $input_file, $output_file, $options); + module::event("graphics_rotate_completed", $input_file, $output_file, $options, $item); } /** @@ -45,11 +46,12 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function resize($input_file, $output_file, $options) { + static function resize($input_file, $output_file, $options, $item=null) { graphics::init_toolkit(); - module::event("graphics_resize", $input_file, $output_file, $options); + module::event("graphics_resize", $input_file, $output_file, $options, $item); if (@filesize($input_file) == 0) { throw new Exception("@todo EMPTY_INPUT_FILE"); @@ -69,7 +71,7 @@ class gallery_graphics_Core { $image->save($output_file); } - module::event("graphics_resize_completed", $input_file, $output_file, $options); + module::event("graphics_resize_completed", $input_file, $output_file, $options, $item); } /** @@ -86,12 +88,13 @@ class gallery_graphics_Core { * @param string $input_file * @param string $output_file * @param array $options + * @param Item_Model $item (optional) */ - static function composite($input_file, $output_file, $options) { + static function composite($input_file, $output_file, $options, $item=null) { try { graphics::init_toolkit(); - module::event("graphics_composite", $input_file, $output_file, $options); + module::event("graphics_composite", $input_file, $output_file, $options, $item); list ($width, $height) = getimagesize($input_file); list ($w_width, $w_height) = getimagesize($options["file"]); @@ -121,7 +124,7 @@ class gallery_graphics_Core { ->quality(module::get_var("gallery", "image_quality")) ->save($output_file); - module::event("graphics_composite_completed", $input_file, $output_file, $options); + module::event("graphics_composite_completed", $input_file, $output_file, $options, $item); } catch (ErrorException $e) { Kohana_Log::add("error", $e->get_message()); } diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 72c563b7..04501132 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -169,7 +169,7 @@ class graphics_Core { } foreach (self::_get_rules($target) as $rule) { - $args = array($working_file, $output_file, unserialize($rule->args)); + $args = array($working_file, $output_file, unserialize($rule->args), $item); call_user_func_array($rule->operation, $args); $working_file = $output_file; } diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php index ff65608b..c11a9319 100644 --- a/modules/gallery/helpers/upgrade_checker.php +++ b/modules/gallery/helpers/upgrade_checker.php @@ -42,7 +42,8 @@ class upgrade_checker_Core { static function should_auto_check() { if (upgrade_checker::auto_check_enabled() && random::int(1, 100) == 1) { $version_info = upgrade_checker::version_info(); - return (!$version_info || (time() - $version_info->timestamp) > AUTO_CHECK_INTERVAL); + return (!$version_info || + (time() - $version_info->timestamp) > upgrade_checker::AUTO_CHECK_INTERVAL); } return false; } diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php index 7aa038c6..8f885dea 100644 --- a/modules/tag/controllers/tag.php +++ b/modules/tag/controllers/tag.php @@ -19,8 +19,8 @@ */ class Tag_Controller extends Controller { public function __call($function, $args) { - $tag_name = $function; - $tag = ORM::factory("tag")->where("name", "=", $tag_name)->find(); + $tag_id = $function; + $tag = ORM::factory("tag")->where("id", "=", $tag_id)->find(); $page_size = module::get_var("gallery", "page_size", 9); $page = (int) Input::instance()->get("page", "1"); $children_count = $tag->items_count(); diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index 53ccc856..479a7da0 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -132,7 +132,7 @@ class Tag_Model_Core extends ORM { * @param string $query the query string (eg "page=3") */ public function url($query=null) { - $url = url::site("tag/{$this->name}"); + $url = url::site("tag/{$this->id}/{$this->name}"); if ($query) { $url .= "?$query"; } diff --git a/themes/admin_wind/views/admin.html.php b/themes/admin_wind/views/admin.html.php index 9e011c69..a56b6f41 100644 --- a/themes/admin_wind/views/admin.html.php +++ b/themes/admin_wind/views/admin.html.php @@ -41,11 +41,11 @@ media="screen,print,projection" /> <![endif]--> - <!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below --> - <?= $theme->get_combined("script") ?> - <!-- 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() ?>> diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php index 0e5bdf6b..2b86556d 100644 --- a/themes/wind/views/page.html.php +++ b/themes/wind/views/page.html.php @@ -71,11 +71,11 @@ media="screen,print,projection" /> <![endif]--> - <!-- LOOKING FOR YOUR JAVASCRIPT? It's all been combined into the link below --> - <?= $theme->get_combined("script") ?> - <!-- 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() ?>> |