diff options
author | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-29 22:01:36 +0300 |
---|---|---|
committer | mamouneyya <mamoun.diraneyya@gmail.com> | 2010-09-29 22:01:36 +0300 |
commit | 6aabab4b715ff8ac00cc667e9d0a40c9868410d8 (patch) | |
tree | 85766ce290f3a89b1039969ce31bc47138d76594 | |
parent | 61e55becf46ce899632bff7ce26a7208094618f0 (diff) | |
parent | ef8751468b998baddbc6d5827a392ed6e12e5548 (diff) |
Merge remote branch 'gallery3/master'
Conflicts:
themes/admin_wind/css/screen.css
themes/wind/css/screen.css
22 files changed, 40 insertions, 21 deletions
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php index 98c98894..791de9c0 100644 --- a/modules/gallery/helpers/data_rest.php +++ b/modules/gallery/helpers/data_rest.php @@ -72,7 +72,12 @@ class data_rest_Core { header("Content-Type: {$item->mime_type}"); } Kohana::close_buffers(false); - readfile($file); + + if (isset($p->encoding) && $p->encoding == "base64") { + print base64_encode(file_get_contents($file)); + } else { + readfile($file); + } // We must exit here to keep the regular REST framework reply code from adding more bytes on // at the end or tinkering with headers. 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 <b>exec</b> 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"); } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 7bcf1f31..07f781d1 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -498,7 +498,7 @@ class Item_Model_Core extends ORM_MPTT { $base_slug = $this->slug; while (ORM::factory("item") ->where("parent_id", "=", $this->parent_id) - ->where("id", "<>", $this->id) + ->where("id", $this->id ? "<>" : "IS NOT", $this->id) ->and_open() ->where("name", "=", $this->name) ->or_where("slug", "=", $this->slug) 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 "<script src=\"$proto://apps.cooliris.com/slideshow/go.js\" " . + return "<script src=\"$proto://e.cooliris.com/slideshow/v/37732/go.js\" " . "type=\"text/javascript\"></script>"; } } 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")))); } diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index c7e289c4..273ac116 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -759,7 +759,7 @@ form .g-error { } .g-loading-small { - background: #e8e8e8 url('../images/loading-small.gif') no-repeat center center !important; + background: #e8e8e8 url('..lib/images/loading-small.gif') no-repeat center center !important; } /** ******************************************************************* @@ -1112,7 +1112,7 @@ ul.sf-menu li li li.sfHover ul { } .rtl .g-breadcrumbs li { - background: transparent url('../images/ico-separator-rtl.gif') no-repeat scroll right center; + background: transparent url('..images/ico-separator-rtl.gif') no-repeat scroll right center; padding: 1em 18px 1em 8px; } diff --git a/lib/images/ico-denied-inactive.png b/themes/admin_wind/images/ico-denied-inactive.png Binary files differindex 56db3ff5..56db3ff5 100644 --- a/lib/images/ico-denied-inactive.png +++ b/themes/admin_wind/images/ico-denied-inactive.png diff --git a/lib/images/ico-denied-passive.png b/themes/admin_wind/images/ico-denied-passive.png Binary files differindex 1e992230..1e992230 100644 --- a/lib/images/ico-denied-passive.png +++ b/themes/admin_wind/images/ico-denied-passive.png diff --git a/lib/images/ico-denied.png b/themes/admin_wind/images/ico-denied.png Binary files differindex 08f24936..08f24936 100644 --- a/lib/images/ico-denied.png +++ b/themes/admin_wind/images/ico-denied.png diff --git a/lib/images/ico-lock.png b/themes/admin_wind/images/ico-lock.png Binary files differindex 2ebc4f6f..2ebc4f6f 100644 --- a/lib/images/ico-lock.png +++ b/themes/admin_wind/images/ico-lock.png diff --git a/lib/images/ico-success-inactive.png b/themes/admin_wind/images/ico-success-inactive.png Binary files differindex 74b2032f..74b2032f 100644 --- a/lib/images/ico-success-inactive.png +++ b/themes/admin_wind/images/ico-success-inactive.png diff --git a/lib/images/ico-success-passive.png b/themes/admin_wind/images/ico-success-passive.png Binary files differindex dc8d1ded..dc8d1ded 100644 --- a/lib/images/ico-success-passive.png +++ b/themes/admin_wind/images/ico-success-passive.png diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index d4b03eac..a49b8c28 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -1036,6 +1036,11 @@ div#g-action-status { margin-left: 0; } +/* Autocomplete ~~~~~~~~~~ */ +.ac_loading { + background: white url('../images/loading-small.gif') right center no-repeat !important; +} + /** ******************************************************************* * 9) Right to left language styles *********************************************************************/ diff --git a/themes/wind/images/ico-denied-inactive.png b/themes/wind/images/ico-denied-inactive.png Binary files differnew file mode 100644 index 00000000..56db3ff5 --- /dev/null +++ b/themes/wind/images/ico-denied-inactive.png diff --git a/themes/wind/images/ico-denied-passive.png b/themes/wind/images/ico-denied-passive.png Binary files differnew file mode 100644 index 00000000..1e992230 --- /dev/null +++ b/themes/wind/images/ico-denied-passive.png diff --git a/themes/wind/images/ico-denied.png b/themes/wind/images/ico-denied.png Binary files differnew file mode 100644 index 00000000..08f24936 --- /dev/null +++ b/themes/wind/images/ico-denied.png diff --git a/themes/wind/images/ico-lock.png b/themes/wind/images/ico-lock.png Binary files differnew file mode 100644 index 00000000..2ebc4f6f --- /dev/null +++ b/themes/wind/images/ico-lock.png diff --git a/themes/wind/images/ico-success-inactive.png b/themes/wind/images/ico-success-inactive.png Binary files differnew file mode 100644 index 00000000..74b2032f --- /dev/null +++ b/themes/wind/images/ico-success-inactive.png diff --git a/themes/wind/images/ico-success-passive.png b/themes/wind/images/ico-success-passive.png Binary files differnew file mode 100644 index 00000000..dc8d1ded --- /dev/null +++ b/themes/wind/images/ico-success-passive.png |