From 3b8475908feded1a982cf9a7e43e0dd18755c470 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 22 Sep 2010 20:55:27 -0700 Subject: Use alternate path to the CoolIris slideshow that fixes the problem with Adobe not properly signing TextLayout.swz. Fixes #1390. --- modules/slideshow/helpers/slideshow_theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/slideshow/helpers/slideshow_theme.php b/modules/slideshow/helpers/slideshow_theme.php index 3203b7bc..a3d6ef37 100644 --- a/modules/slideshow/helpers/slideshow_theme.php +++ b/modules/slideshow/helpers/slideshow_theme.php @@ -20,7 +20,7 @@ class slideshow_theme_Core { static function page_bottom($theme) { $proto = request::protocol(); - return ""; } } -- cgit v1.2.3 From 790bf4e871b1a1555dc32287ab222b6694d402a2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 22 Sep 2010 21:35:49 -0700 Subject: Prioritize using the value in graphics_toolkit_path over the standard path so that if you change that value in Admin > Settings > Advanced we prefer it over other paths (which may be restricted by open_basedir). Fixes #1395. --- modules/gallery/helpers/gallery.php | 13 +++++++++++++ modules/gallery/helpers/graphics.php | 9 ++++----- modules/gallery/helpers/movie.php | 9 ++++----- 3 files changed, 21 insertions(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index ca8c92c9..3cf0eacd 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -140,4 +140,17 @@ class gallery_Core { return $file_name; } + /** + * Set the PATH environment variable to the paths specified. + * @param array Array of paths. Each array entry can contain a colon separated list of paths. + */ + static function set_path_env($paths) { + $path_env = array(); + foreach ($paths as $path) { + if ($path) { + array_push($path_env, $path); + } + } + putenv("PATH=" . implode(":", $path_env)); + } } \ No newline at end of file diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 2868a28d..dd521d84 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -313,11 +313,10 @@ class graphics_Core { $toolkits->graphicsmagick->installed = false; $toolkits->graphicsmagick->error = t("GraphicsMagick requires the exec function"); } else { - $graphics_path = module::get_var("gallery", "graphics_toolkit_path", null); - $extra_binary_paths = module::get_var("gallery", "extra_binary_paths", null); - - putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") . - ":" . $extra_binary_paths); + gallery::set_path_env( + array(module::get_var("gallery", "graphics_toolkit_path"), + getenv("PATH"), + module::get_var("gallery", "extra_binary_paths"))); // @todo: consider refactoring the two segments below into a loop since they are so // similar. diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 50339541..78358b6b 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -85,11 +85,10 @@ class movie_Core { static function find_ffmpeg() { if (!($ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) || !file_exists($ffmpeg_path)) { - $graphics_path = module::get_var("gallery", "graphics_toolkit_path", null); - $extra_binary_paths = module::get_var("gallery", "extra_binary_paths", null); - - putenv("PATH=" . getenv("PATH") . (empty($graphics_path) ? "" : ":$graphics_path") . - ":" . $extra_binary_paths); + gallery::set_path_env( + array(module::get_var("gallery", "graphics_toolkit_path"), + getenv("PATH"), + module::get_var("gallery", "extra_binary_paths"))); if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); } -- cgit v1.2.3 From 7116f820ca2b6338abdca233a4b1d42d29a41150 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 22 Sep 2010 21:43:44 -0700 Subject: Remove the 4 character minimum for group name length. Fixes ticket #1396. --- modules/user/controllers/admin_users.php | 8 +++----- modules/user/models/group.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index c22fcc2e..23032ab3 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -381,8 +381,8 @@ class Admin_Users_Controller extends Admin_Controller { $form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name")) ->error_messages("required", t("You must enter a group name")) ->error_messages("length", - t("The group name must be between %min_length and %max_length characters", - array("min_length" => 4, "max_length" => 255))); + t("The group name must be less than %max_length characters", + array("max_length" => 255))); $form_group->submit("")->value(t("Save")); return $form; } @@ -392,9 +392,7 @@ class Admin_Users_Controller extends Admin_Controller { $form_group = $form->group("add_group")->label(t("Add group")); $form_group->input("name")->label(t("Name"))->id("g-name"); $form_group->inputs["name"]->error_messages("conflict", t("There is already a group with that name")) - ->error_messages("required", t("You must enter a group name")) - ->error_messages("length", t("The group name must be at least %min_length characters", - array("min_length" => 4))); + ->error_messages("required", t("You must enter a group name")); $form_group->submit("")->value(t("Add group")); return $form; } diff --git a/modules/user/models/group.php b/modules/user/models/group.php index 57b12963..b27c7250 100644 --- a/modules/user/models/group.php +++ b/modules/user/models/group.php @@ -41,7 +41,7 @@ class Group_Model extends ORM implements Group_Definition { // validate() is recursive, only modify the rules on the outermost call. if (!$array) { $this->rules = array( - "name" => array("rules" => array("required", "length[4,255]"), + "name" => array("rules" => array("required", "length[1,255]"), "callbacks" => array(array($this, "valid_name")))); } -- cgit v1.2.3