From 9d40f6fc0055d21725878ceaddc0fd079cb8b732 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 20:29:49 -0800 Subject: Paginator: don't try to set the position for "other" page types. --- modules/gallery/libraries/Theme_View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index b1167d0e..b64deab9 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -172,7 +172,7 @@ class Theme_View_Core extends Gallery_View { $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; $v->last_visible_position = min($this->page * $this->page_size, $v->total); - } else { + } else if ($this->page_type == "item") { $v->position = $this->position; $v->total = $this->sibling_count; if ($this->previous_item) { -- cgit v1.2.3 From b341b6b45db4a7d84d625594ee31dff6cfefb2b7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 20:30:12 -0800 Subject: The search results page is a "collection" page type. --- modules/search/controllers/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/search/controllers/search.php b/modules/search/controllers/search.php index 539e063f..2f1aeb76 100644 --- a/modules/search/controllers/search.php +++ b/modules/search/controllers/search.php @@ -33,7 +33,7 @@ class Search_Controller extends Controller { $max_pages = max(ceil($count / $page_size), 1); - $template = new Theme_View("page.html", "other", "search"); + $template = new Theme_View("page.html", "collection", "search"); $template->set_global("page", $page); $template->set_global("max_pages", $max_pages); $template->set_global("page_size", $page_size); -- cgit v1.2.3 From befb8244200ce365950a172c3d957d0043efd5d6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 21:16:59 -0800 Subject: Fixes #898 --- modules/gallery/helpers/gallery_event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 3139951f..02bfdf28 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -228,8 +228,8 @@ class gallery_event_Core { ->label(t("Advanced")) ->url(url::site("admin/advanced_settings"))) ->append(Menu::factory("link") - ->id("identity_drivers") - ->label(t("Identity drivers")) + ->id("authentication") + ->label(t("Authentication")) ->url(url::site("admin/identity")))) ->append(Menu::factory("link") ->id("modules") -- cgit v1.2.3 From 4c5e2000f606d696a056fcfed231df5be8a42ada Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 20 Nov 2009 21:23:11 -0800 Subject: Don't call theme::get_info() on themes that don't have a theme.info. Fixes #896. --- modules/gallery/controllers/admin_themes.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index 23685c90..6991acd2 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -30,11 +30,13 @@ class Admin_Themes_Controller extends Admin_Controller { private function _get_themes() { $themes = array(); foreach (scandir(THEMEPATH) as $theme_name) { - if ($theme_name[0] == ".") { - continue; - } + if (file_exists(THEMEPATH . "$theme_name/theme.info")) { + if ($theme_name[0] == ".") { + continue; + } - $themes[$theme_name] = theme::get_info($theme_name); + $themes[$theme_name] = theme::get_info($theme_name); + } } return $themes; } -- cgit v1.2.3 From ee9c92139763c6c0d3be7f3156603a5de5382fc3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 21 Nov 2009 09:28:30 -0800 Subject: Don't use realpath when calculating the relative paths of embedded references in css files. This fixes ticket #910 --- modules/gallery/libraries/Gallery_View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php index bdfd2fc9..3bf56d0f 100644 --- a/modules/gallery/libraries/Gallery_View.php +++ b/modules/gallery/libraries/Gallery_View.php @@ -125,7 +125,7 @@ class Gallery_View_Core extends View { if (preg_match_all($PATTERN, $css, $matches, PREG_SET_ORDER)) { $search = $replace = array(); foreach ($matches as $match) { - $relative = substr(realpath(dirname($css_file) . "/$match[1]"), $docroot_length); + $relative = dirname($css_file) . "/$match[1]"; if (!empty($relative)) { $search[] = $match[0]; $replace[] = "url('" . url::abs_file($relative) . "')"; -- cgit v1.2.3 From 6bdb8c3d551cef6e2f12289ad4793ab106a4f7f3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 21 Nov 2009 09:35:38 -0800 Subject: Correct inconsistent captialization. Fixes #906 --- modules/gallery/views/form_uploadify.html.php | 4 ++-- modules/user/controllers/admin_users.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 7448db84..5e99c8d5 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -23,7 +23,7 @@ fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4", fileDesc: for_js() ?>, cancelImg: "", - buttonText: for_js() ?>, + buttonText: for_js() ?>, simUploadLimit: 10, wmode: "transparent", hideButton: true, /* should be true */ @@ -114,7 +114,7 @@
- +
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index cc2d881e..b3284385 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -340,7 +340,7 @@ class Admin_Users_Controller extends Admin_Controller { ->rules($minimum_length ? "required|length[$minimum_length, 40]" : "length[40]"); module::event("user_add_form_admin", $user, $form); - $group->submit("")->value(t("Add User")); + $group->submit("")->value(t("Add user")); return $form; } -- cgit v1.2.3 From 17d89a9df15720ad235835dd04f26cca4bcbfce8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 21 Nov 2009 10:58:26 -0800 Subject: Truncate the text of the title/description for results on the search page. Partial fix for ticket #580. --- modules/search/views/search.html.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'modules') diff --git a/modules/search/views/search.html.php b/modules/search/views/search.html.php index fdf22a9e..2e139ecf 100644 --- a/modules/search/views/search.html.php +++ b/modules/search/views/search.html.php @@ -23,18 +23,15 @@
    - - is_album()): ?> - - -
  • + is_album() ? "g-album" : "g-photo" ?> +
  • thumb_img() ?>

    - title) ?> -

    -
  • -- cgit v1.2.3 From d6695e83e245d3d478ba4ecf1e3a2a5bb52665d3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 21 Nov 2009 11:17:38 -0800 Subject: Make email a required field. We're using the Kohana default error messages when this fails, not the Gallery translation system so this is not a great solution. However, it's the same as the other model-based rules we have currently so it's no worse. Fixes ticket #897. --- modules/user/models/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/user/models/user.php b/modules/user/models/user.php index 184ce70a..bd61def8 100644 --- a/modules/user/models/user.php +++ b/modules/user/models/user.php @@ -23,7 +23,7 @@ class User_Model extends ORM implements User_Definition { var $rules = array( "name" => "required|length[1,32]", "full_name" => "length[0,255]", - "email" => "valid_email|length[1,255]", + "email" => "required|valid_email|length[1,255]", "password" => "length[1,40]", "url" => "valid_url", "locale" => "length[2,10]"); -- cgit v1.2.3