summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-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
5 files changed, 12 insertions, 10 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;">