summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/controllers/admin_themes.php10
-rw-r--r--modules/gallery/helpers/gallery_event.php4
-rw-r--r--modules/gallery/libraries/Gallery_View.php2
-rw-r--r--modules/gallery/libraries/Theme_View.php2
-rw-r--r--modules/gallery/views/form_uploadify.html.php4
-rw-r--r--modules/search/controllers/search.php2
-rw-r--r--modules/search/views/search.html.php15
-rw-r--r--modules/user/controllers/admin_users.php2
-rw-r--r--modules/user/models/user.php2
9 files changed, 21 insertions, 22 deletions
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;
}
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")
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) . "')";
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) {
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: <?= t("Photos and movies")->for_js() ?>,
cancelImg: "<?= url::file("lib/uploadify/cancel.png") ?>",
- buttonText: <?= t("Select Photos ...")->for_js() ?>,
+ buttonText: <?= t("Select photos...")->for_js() ?>,
simUploadLimit: 10,
wmode: "transparent",
hideButton: true, /* should be true */
@@ -114,7 +114,7 @@
</div>
<div id="g-add-photos-canvas" style="text-align: center;">
- <a id="g-add-photos-button" class="ui-corner-all" style="padding-bottom: 1em;" href="#"><?= t("Select Photos...") ?></a>
+ <a id="g-add-photos-button" class="ui-corner-all" style="padding-bottom: 1em;" href="#"><?= t("Select photos...") ?></a>
<span id="g-uploadify"></span>
</div>
<div id="g-add-photos-status" style="text-align: center;">
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);
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 @@
<? if (count($items)): ?>
<ul id="g-album-grid" class="ui-helper-clearfix">
<? foreach ($items as $item): ?>
- <? $item_class = "g-photo"; ?>
- <? if ($item->is_album()): ?>
- <? $item_class = "g-album"; ?>
- <? endif ?>
- <li class="g-item <?= $item_class ?>">
+ <? $item_class = $item->is_album() ? "g-album" : "g-photo" ?>
+ <li class="g-item <?= $item_class ?>">
<a href="<?= $item->url() ?>">
<?= $item->thumb_img() ?>
<p>
- <?= html::purify($item->title) ?>
- </p>
- <div>
- <?= nl2br(html::purify($item->description)) ?>
+ <?= html::purify(text::limit_chars($item->title, 32, "…")) ?>
+ </p>
+ <div>
+ <?= nl2br(html::purify(text::limit_chars($item->description, 64, "…"))) ?>
</div>
</a>
</li>
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;
}
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]");