summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installer/install.sql5
-rw-r--r--modules/gallery/helpers/gallery_installer.php8
-rw-r--r--modules/gallery/module.info2
-rw-r--r--themes/wind/views/page.html.php15
4 files changed, 20 insertions, 10 deletions
diff --git a/installer/install.sql b/installer/install.sql
index 058bc882..3e67a07a 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -244,7 +244,7 @@ CREATE TABLE {modules} (
KEY `weight` (`weight`)
) AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {modules} VALUES (1,1,'gallery',34,1);
+INSERT INTO {modules} VALUES (1,1,'gallery',35,1);
INSERT INTO {modules} VALUES (2,1,'user',3,2);
INSERT INTO {modules} VALUES (3,1,'comment',3,3);
INSERT INTO {modules} VALUES (4,1,'organize',2,4);
@@ -395,7 +395,7 @@ CREATE TABLE {vars} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `module_name` (`module_name`,`name`)
-) AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
+) AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO {vars} VALUES (NULL,'gallery','active_site_theme','wind');
INSERT INTO {vars} VALUES (NULL,'gallery','active_admin_theme','admin_wind');
@@ -412,6 +412,7 @@ INSERT INTO {vars} VALUES (NULL,'gallery','simultaneous_upload_limit','5');
INSERT INTO {vars} VALUES (NULL,'gallery','admin_area_timeout','5400');
INSERT INTO {vars} VALUES (NULL,'gallery','maintenance_mode','0');
INSERT INTO {vars} VALUES (NULL,'gallery','blocks_dashboard_sidebar','a:4:{i:2;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"block_adder\";}i:3;a:2:{i:0;s:7:\"gallery\";i:1;s:5:\"stats\";}i:4;a:2:{i:0;s:7:\"gallery\";i:1;s:13:\"platform_info\";}i:5;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"project_news\";}}');
+INSERT INTO {vars} VALUES (NULL,'gallery','visible_title_length','15');
INSERT INTO {vars} VALUES (NULL,'gallery','date_time_format','Y-M-d H:i:s');
INSERT INTO {vars} VALUES (NULL,'gallery','date_format','Y-M-d');
INSERT INTO {vars} VALUES (NULL,'gallery','blocks_dashboard_center','a:3:{i:6;a:2:{i:0;s:7:\"gallery\";i:1;s:7:\"welcome\";}i:7;a:2:{i:0;s:7:\"gallery\";i:1;s:12:\"photo_stream\";}i:8;a:2:{i:0;s:7:\"gallery\";i:1;s:11:\"log_entries\";}}');
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 569c5118..9aabf22b 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -300,7 +300,8 @@ class gallery_installer {
module::set_var("gallery", "simultaneous_upload_limit", 5);
module::set_var("gallery", "admin_area_timeout", 90 * 60);
module::set_var("gallery", "maintenance_mode", 0);
- module::set_version("gallery", 34);
+ module::set_var("gallery", "visible_title_length", 15);
+ module::set_version("gallery", 35);
}
static function upgrade($version) {
@@ -584,6 +585,11 @@ class gallery_installer {
$db->query("ALTER TABLE {access_caches} ADD KEY (`item_id`)");
module::set_version("gallery", $version = 34);
}
+
+ if ($version == 34) {
+ module::set_var("gallery", "visible_title_length", 15);
+ module::set_version("gallery", $version = 35);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index 084a0945..94942840 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 34
+version = 35
diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php
index 9f94b04f..3c4f6ef5 100644
--- a/themes/wind/views/page.html.php
+++ b/themes/wind/views/page.html.php
@@ -101,19 +101,22 @@
<? $i = 0 ?>
<? foreach ($parents as $parent): ?>
<li<? if ($i == 0) print " class=\"g-first\"" ?>>
- <!-- Adding ?show=<id> causes Gallery3 to display the page
- containing that photo. For now, we just do it for
- the immediate parent so that when you go back up a
- level you're on the right page. -->
+ <? // Adding ?show=<id> causes Gallery3 to display the page
+ // containing that photo. For now, we just do it for
+ // the immediate parent so that when you go back up a
+ // level you're on the right page. ?>
<a href="<?= $parent->url($parent == $theme->item()->parent() ?
"show={$theme->item()->id}" : null) ?>">
- <?= html::purify(text::limit_chars($parent->title, 15)) ?>
+ <!-- limit the title length to something reasonable (defaults to 15) -->
+ <?= html::purify(text::limit_chars($parent->title,
+ module::get_var("gallery", "visible_title_length"))) ?>
</a>
</li>
<? $i++ ?>
<? endforeach ?>
<li class="g-active<? if ($i == 0) print " g-first" ?>">
- <?= html::purify(text::limit_chars($theme->item()->title, 15)) ?>
+ <?= html::purify(text::limit_chars($theme->item()->title,
+ module::get_var("gallery", "visible_title_length"))) ?>
</li>
</ul>
<? endif ?>