summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-07-25 09:25:31 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-07-25 09:25:31 -0600
commiteca46d76a7832f771d377edb3939ea1aded2fac9 (patch)
treed4f0323202c7eb6eab60ff6e14f9905b625e349b
parent63511316be51f193d37c4f3b9dd3455a9ab60de8 (diff)
parent50d6cc0150b930d79d3e8b90956ffa9655fcc9c5 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
-rwxr-xr-xinstaller/install.sql189
-rw-r--r--modules/comment/helpers/comment_theme.php2
-rw-r--r--modules/comment/views/admin_block_recent_comments.html.php2
-rw-r--r--modules/comment/views/admin_comments.html.php2
-rw-r--r--modules/comment/views/comment.html.php2
-rw-r--r--modules/comment/views/comments.html.php2
-rw-r--r--modules/digibug/config/digibug.php29
-rw-r--r--modules/digibug/controllers/digibug.php50
-rw-r--r--modules/digibug/helpers/digibug_menu.php2
-rw-r--r--modules/digibug/helpers/digibug_theme.php2
-rw-r--r--modules/digibug/tests/Digibug_Controller_Test.php78
-rw-r--r--modules/gallery/controllers/albums.php5
-rw-r--r--modules/gallery/controllers/movies.php5
-rw-r--r--modules/gallery/controllers/photos.php5
-rw-r--r--modules/gallery/helpers/access.php35
-rw-r--r--modules/gallery/helpers/album.php14
-rw-r--r--modules/gallery/helpers/gallery.php2
-rw-r--r--modules/gallery/helpers/gallery_installer.php18
-rw-r--r--modules/gallery/helpers/gallery_quick.php16
-rw-r--r--modules/gallery/helpers/gallery_theme.php20
-rw-r--r--modules/gallery/helpers/photo.php14
-rw-r--r--modules/gallery/libraries/Gallery_View.php66
-rw-r--r--modules/gallery/module.info2
-rw-r--r--modules/gallery/tests/Access_Helper_Test.php37
-rw-r--r--modules/gallery/tests/xss_data.txt92
-rw-r--r--modules/gallery/views/admin_maintenance_task.html.php23
-rw-r--r--modules/gallery/views/item_edit.html.php9
-rw-r--r--modules/gallery/views/permissions_form.html.php2
-rw-r--r--modules/notification/helpers/notification.php12
-rw-r--r--modules/notification/helpers/notification_menu.php4
-rw-r--r--modules/organize/helpers/organize_theme.php6
-rw-r--r--modules/search/helpers/search.php2
-rw-r--r--modules/server_add/helpers/server_add_theme.php8
-rw-r--r--modules/server_add/views/server_add_tree_dialog.html.php2
-rw-r--r--modules/tag/controllers/tags.php21
-rw-r--r--modules/tag/helpers/tag.php2
-rw-r--r--modules/tag/helpers/tag_event.php12
-rw-r--r--modules/tag/helpers/tag_theme.php6
-rw-r--r--modules/tag/js/tag.js17
-rw-r--r--modules/tag/models/tag.php10
-rw-r--r--modules/tag/views/tag_block.html.php12
-rw-r--r--modules/user/controllers/admin_users.php4
-rw-r--r--modules/user/controllers/users.php1
-rw-r--r--modules/user/helpers/user.php6
-rw-r--r--modules/user/helpers/user_theme.php2
-rw-r--r--modules/user/views/admin_users.html.php2
-rw-r--r--system/libraries/ORM.php4
-rw-r--r--system/libraries/drivers/Database.php4
-rw-r--r--themes/admin_default/css/admin_screen.css458
-rw-r--r--themes/admin_default/css/screen.css1149
-rw-r--r--themes/admin_default/images/ico-album.pngbin0 -> 397 bytes
-rw-r--r--themes/admin_default/images/ico-error.pngbin0 -> 701 bytes
-rw-r--r--themes/admin_default/images/ico-info.pngbin0 -> 778 bytes
-rw-r--r--themes/admin_default/images/ico-print.pngbin0 -> 989 bytes
-rw-r--r--themes/admin_default/images/ico-separator.gifbin0 -> 106 bytes
-rw-r--r--themes/admin_default/images/ico-success.pngbin0 -> 537 bytes
-rw-r--r--themes/admin_default/images/ico-view-comments.pngbin0 -> 768 bytes
-rw-r--r--themes/admin_default/images/ico-view-fullsize.pngbin0 -> 1046 bytes
-rw-r--r--themes/admin_default/images/ico-view-hybrid.pngbin0 -> 494 bytes
-rw-r--r--themes/admin_default/images/ico-view-slideshow.pngbin0 -> 960 bytes
-rw-r--r--themes/admin_default/images/ico-warning.pngbin0 -> 666 bytes
-rw-r--r--themes/admin_default/images/loading-lg.gifbin0 -> 8238 bytes
-rw-r--r--themes/admin_default/images/loading-sm.gifbin0 -> 673 bytes
-rw-r--r--themes/admin_default/views/admin.html.php28
-rw-r--r--themes/default/views/header.html.php2
-rw-r--r--themes/default/views/page.html.php36
66 files changed, 1959 insertions, 576 deletions
diff --git a/installer/install.sql b/installer/install.sql
index bda576d1..36ccaaff 100755
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -1,40 +1,40 @@
DROP TABLE IF EXISTS {access_caches};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {access_caches} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) default NULL,
- `view_full_1` smallint(6) NOT NULL default '0',
- `edit_1` smallint(6) NOT NULL default '0',
- `add_1` smallint(6) NOT NULL default '0',
- `view_full_2` smallint(6) NOT NULL default '0',
- `edit_2` smallint(6) NOT NULL default '0',
- `add_2` smallint(6) NOT NULL default '0',
+ `view_full_1` binary(1) NOT NULL default '0',
+ `edit_1` binary(1) NOT NULL default '0',
+ `add_1` binary(1) NOT NULL default '0',
+ `view_full_2` binary(1) NOT NULL default '0',
+ `edit_2` binary(1) NOT NULL default '0',
+ `add_2` binary(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {access_caches} VALUES (1,1,1,0,0,1,0,0);
+SET character_set_client = @saved_cs_client;
+INSERT INTO {access_caches} VALUES (1,1,'1','0','0','1','0','0');
DROP TABLE IF EXISTS {access_intents};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {access_intents} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) default NULL,
- `view_1` tinyint(1) default NULL,
- `view_full_1` tinyint(1) default NULL,
- `edit_1` tinyint(1) default NULL,
- `add_1` tinyint(1) default NULL,
- `view_2` tinyint(1) default NULL,
- `view_full_2` tinyint(1) default NULL,
- `edit_2` tinyint(1) default NULL,
- `add_2` tinyint(1) default NULL,
+ `view_1` binary(1) default NULL,
+ `view_full_1` binary(1) default NULL,
+ `edit_1` binary(1) default NULL,
+ `add_1` binary(1) default NULL,
+ `view_2` binary(1) default NULL,
+ `view_full_2` binary(1) default NULL,
+ `edit_2` binary(1) default NULL,
+ `add_2` binary(1) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {access_intents} VALUES (1,1,1,1,0,0,1,1,0,0);
+SET character_set_client = @saved_cs_client;
+INSERT INTO {access_intents} VALUES (1,1,'1','1','0','0','1','1','0','0');
DROP TABLE IF EXISTS {caches};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {caches} (
`id` int(9) NOT NULL auto_increment,
`key` varchar(255) NOT NULL,
@@ -44,10 +44,10 @@ CREATE TABLE {caches} (
PRIMARY KEY (`id`),
KEY `tags` (`tags`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {comments};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {comments} (
`author_id` int(9) default NULL,
`created` int(9) NOT NULL,
@@ -73,10 +73,10 @@ CREATE TABLE {comments} (
`updated` int(9) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {graphics_rules};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {graphics_rules} (
`id` int(9) NOT NULL auto_increment,
`active` tinyint(1) default '0',
@@ -87,12 +87,12 @@ CREATE TABLE {graphics_rules} (
`target` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {graphics_rules} VALUES (1,1,'a:3:{s:5:\"width\";i:200;s:6:\"height\";i:200;s:6:\"master\";i:2;}','gallery','resize',100,'thumb');
INSERT INTO {graphics_rules} VALUES (2,1,'a:3:{s:5:\"width\";i:640;s:6:\"height\";i:480;s:6:\"master\";i:2;}','gallery','resize',100,'resize');
DROP TABLE IF EXISTS {groups};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {groups} (
`id` int(9) NOT NULL auto_increment,
`name` char(64) default NULL,
@@ -100,25 +100,25 @@ CREATE TABLE {groups} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {groups} VALUES (1,'Everybody',1);
INSERT INTO {groups} VALUES (2,'Registered Users',1);
DROP TABLE IF EXISTS {groups_users};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {groups_users} (
`group_id` int(9) NOT NULL,
`user_id` int(9) NOT NULL,
PRIMARY KEY (`group_id`,`user_id`),
UNIQUE KEY `user_id` (`user_id`,`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {groups_users} VALUES (1,1);
INSERT INTO {groups_users} VALUES (1,2);
INSERT INTO {groups_users} VALUES (2,2);
DROP TABLE IF EXISTS {incoming_translations};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {incoming_translations} (
`id` int(9) NOT NULL auto_increment,
`key` char(32) NOT NULL,
@@ -130,10 +130,10 @@ CREATE TABLE {incoming_translations} (
UNIQUE KEY `key` (`key`,`locale`),
KEY `locale_key` (`locale`,`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {items};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {items} (
`id` int(9) NOT NULL auto_increment,
`album_cover_item_id` int(9) default NULL,
@@ -164,18 +164,18 @@ CREATE TABLE {items} (
`view_count` int(9) default '0',
`weight` int(9) NOT NULL default '0',
`width` int(9) default NULL,
- `view_1` smallint(6) NOT NULL default '0',
- `view_2` smallint(6) NOT NULL default '0',
+ `view_1` binary(1) default '0',
+ `view_2` binary(1) default '0',
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`),
KEY `type` (`type`),
KEY `random` (`rand_key`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {items} VALUES (1,NULL,NULL,UNIX_TIMESTAMP(),'',NULL,1,1,NULL,NULL,NULL,0,NULL,'',1,NULL,NULL,2,'weight','ASC',1,NULL,NULL,'Gallery','album',UNIX_TIMESTAMP(),0,1,NULL,1,1);
+SET character_set_client = @saved_cs_client;
+INSERT INTO {items} VALUES (1,NULL,NULL,UNIX_TIMESTAMP(),'',NULL,1,1,NULL,NULL,NULL,0,NULL,'',1,NULL,NULL,2,'weight','ASC',1,NULL,NULL,'Gallery','album',UNIX_TIMESTAMP(),0,1,NULL,'1','1');
DROP TABLE IF EXISTS {items_tags};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {items_tags} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) NOT NULL,
@@ -184,10 +184,10 @@ CREATE TABLE {items_tags} (
KEY `tag_id` (`tag_id`,`id`),
KEY `item_id` (`item_id`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {logs};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {logs} (
`id` int(9) NOT NULL auto_increment,
`category` varchar(64) default NULL,
@@ -200,10 +200,10 @@ CREATE TABLE {logs} (
`user_id` int(9) default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {messages};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {messages} (
`id` int(9) NOT NULL auto_increment,
`key` varchar(255) default NULL,
@@ -212,10 +212,10 @@ CREATE TABLE {messages} (
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {modules};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {modules} (
`id` int(9) NOT NULL auto_increment,
`active` tinyint(1) default '0',
@@ -224,8 +224,8 @@ CREATE TABLE {modules} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {modules} VALUES (1,1,'gallery',6);
+SET character_set_client = @saved_cs_client;
+INSERT INTO {modules} VALUES (1,1,'gallery',7);
INSERT INTO {modules} VALUES (2,1,'user',1);
INSERT INTO {modules} VALUES (3,1,'comment',2);
INSERT INTO {modules} VALUES (4,1,'organize',1);
@@ -235,8 +235,8 @@ INSERT INTO {modules} VALUES (7,1,'search',1);
INSERT INTO {modules} VALUES (8,1,'slideshow',1);
INSERT INTO {modules} VALUES (9,1,'tag',1);
DROP TABLE IF EXISTS {outgoing_translations};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {outgoing_translations} (
`id` int(9) NOT NULL auto_increment,
`base_revision` int(9) default NULL,
@@ -248,10 +248,10 @@ CREATE TABLE {outgoing_translations} (
UNIQUE KEY `key` (`key`,`locale`),
KEY `locale_key` (`locale`,`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {permissions};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {permissions} (
`id` int(9) NOT NULL auto_increment,
`display_name` varchar(64) default NULL,
@@ -259,14 +259,14 @@ CREATE TABLE {permissions} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {permissions} VALUES (1,'View','view');
INSERT INTO {permissions} VALUES (2,'View Full Size','view_full');
INSERT INTO {permissions} VALUES (3,'Edit','edit');
INSERT INTO {permissions} VALUES (4,'Add','add');
DROP TABLE IF EXISTS {search_records};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {search_records} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) default NULL,
@@ -276,21 +276,21 @@ CREATE TABLE {search_records} (
KEY `item_id` (`item_id`),
FULLTEXT KEY `data` (`data`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {search_records} VALUES (1,1,0,' Gallery');
DROP TABLE IF EXISTS {sessions};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {sessions} (
`session_id` varchar(127) NOT NULL,
`data` text NOT NULL,
`last_activity` int(10) unsigned NOT NULL,
PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {tags};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {tags} (
`id` int(9) NOT NULL auto_increment,
`name` varchar(64) NOT NULL,
@@ -298,10 +298,10 @@ CREATE TABLE {tags} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {tasks};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {tasks} (
`id` int(9) NOT NULL auto_increment,
`callback` varchar(128) default NULL,
@@ -316,10 +316,10 @@ CREATE TABLE {tasks} (
PRIMARY KEY (`id`),
KEY `owner_id` (`owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {themes};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {themes} (
`id` int(9) NOT NULL auto_increment,
`name` varchar(64) default NULL,
@@ -327,12 +327,12 @@ CREATE TABLE {themes} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {themes} VALUES (1,'default',1);
INSERT INTO {themes} VALUES (2,'admin_default',1);
DROP TABLE IF EXISTS {users};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {users} (
`id` int(9) NOT NULL auto_increment,
`name` varchar(32) NOT NULL,
@@ -350,12 +350,12 @@ CREATE TABLE {users} (
UNIQUE KEY `name` (`name`),
UNIQUE KEY `hash` (`hash`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {users} VALUES (1,'guest','Guest User','',0,0,NULL,0,1,NULL,NULL,NULL);
INSERT INTO {users} VALUES (2,'admin','Gallery Administrator','',0,0,NULL,1,0,NULL,NULL,NULL);
DROP TABLE IF EXISTS {vars};
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE {vars} (
`id` int(9) NOT NULL auto_increment,
`module_name` varchar(64) NOT NULL,
@@ -363,8 +363,8 @@ CREATE TABLE {vars} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `module_name` (`module_name`,`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
INSERT INTO {vars} VALUES (1,'gallery','active_site_theme','default');
INSERT INTO {vars} VALUES (2,'gallery','active_admin_theme','admin_default');
INSERT INTO {vars} VALUES (3,'gallery','page_size','9');
@@ -374,11 +374,10 @@ INSERT INTO {vars} VALUES (6,'gallery','default_locale','en_US');
INSERT INTO {vars} VALUES (7,'gallery','image_quality','75');
INSERT INTO {vars} VALUES (9,'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 (14,'gallery','blocks_dashboard_center','a:4:{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\";}i:9;a:2:{i:0;s:7:\"comment\";i:1;s:15:\"recent_comments\";}}');
-INSERT INTO {vars} VALUES (17,'gallery','version','3.0 pre beta 2 (git)');
-INSERT INTO {vars} VALUES (18,'gallery','choose_default_tookit','1');
-INSERT INTO {vars} VALUES (19,'gallery','date_format','Y-M-d');
-INSERT INTO {vars} VALUES (20,'gallery','date_time_format','Y-M-d H:i:s');
-INSERT INTO {vars} VALUES (21,'gallery','time_format','H:i:s');
-INSERT INTO {vars} VALUES (22,'gallery','show_credits','1');
-INSERT INTO {vars} VALUES (23,'gallery','credits','Powered by <a href=\"%url\">Gallery %version</a>');
-INSERT INTO {vars} VALUES (25,'comment','spam_caught','0');
+INSERT INTO {vars} VALUES (17,'gallery','choose_default_tookit','1');
+INSERT INTO {vars} VALUES (18,'gallery','date_format','Y-M-d');
+INSERT INTO {vars} VALUES (19,'gallery','date_time_format','Y-M-d H:i:s');
+INSERT INTO {vars} VALUES (20,'gallery','time_format','H:i:s');
+INSERT INTO {vars} VALUES (21,'gallery','show_credits','1');
+INSERT INTO {vars} VALUES (22,'gallery','credits','Powered by <a href=\"%url\">Gallery %version</a>');
+INSERT INTO {vars} VALUES (24,'comment','spam_caught','0');
diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php
index 89b2f57c..b807e2cf 100644
--- a/modules/comment/helpers/comment_theme.php
+++ b/modules/comment/helpers/comment_theme.php
@@ -19,7 +19,7 @@
*/
class comment_theme_Core {
static function head($theme) {
- $theme->script("modules/comment/js/comment.js");
+ $theme->script("comment.js");
return "";
}
diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php
index 4ff24f86..516a8181 100644
--- a/modules/comment/views/admin_block_recent_comments.html.php
+++ b/modules/comment/views/admin_block_recent_comments.html.php
@@ -2,7 +2,7 @@
<ul>
<? foreach ($comments as $i => $comment): ?>
<li class="<?= ($i % 2 == 0) ? "gEvenRow" : "gOddRow" ?>">
- <img src="<?= $comment->author()->avatar_url(32, $theme->theme_url("images/avatar.jpg", true)) ?>"
+ <img src="<?= $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true)) ?>"
class="gAvatar"
alt="<?= p::clean($comment->author_name()) ?>"
width="32"
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php
index ad0ae8f3..9fe7164b 100644
--- a/modules/comment/views/admin_comments.html.php
+++ b/modules/comment/views/admin_comments.html.php
@@ -106,7 +106,7 @@
<tr id="gComment-<?= $comment->id ?>" class="<?= ($i % 2 == 0) ? "gEvenRow" : "gOddRow" ?>">
<td>
<a href="#">
- <img src="<?= $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true)) ?>"
+ <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
class="gAvatar"
alt="<?= p::clean($comment->author_name()) ?>"
width="40"
diff --git a/modules/comment/views/comment.html.php b/modules/comment/views/comment.html.php
index ab72a0c8..3d17411c 100644
--- a/modules/comment/views/comment.html.php
+++ b/modules/comment/views/comment.html.php
@@ -2,7 +2,7 @@
<li id="gComment-<?= $comment->id; ?>">
<p class="gAuthor">
<a href="#">
- <img src="<?= $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true)) ?>"
+ <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
class="gAvatar"
alt="<?= p::clean($comment->author_name()) ?>"
width="40"
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index fa25a4e0..f7251389 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -10,7 +10,7 @@
<li id="gComment-<?= $comment->id ?>">
<p class="gAuthor">
<a href="#">
- <img src="<?= $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true)) ?>"
+ <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"
class="gAvatar"
alt="<?= p::clean($comment->author_name()) ?>"
width="40"
diff --git a/modules/digibug/config/digibug.php b/modules/digibug/config/digibug.php
new file mode 100644
index 00000000..6cd165d1
--- /dev/null
+++ b/modules/digibug/config/digibug.php
@@ -0,0 +1,29 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+/**
+ * PHP Mail Configuration parameters
+ * from => email address that appears as the from address
+ * line-length => word wrap length (PHP documentations suggest no larger tha 70 characters
+ * reply-to => what goes into the reply to header
+ */
+$config["ranges"] = array(
+ "Digibug1" => array("low" => "65.249.152.0", "high" => "65.249.159.255"),
+ "Digibug2" => array("low" => "208.122.55.0", "high" => "208.122.55.255")
+);
diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php
index d881db9b..e0f4b6bf 100644
--- a/modules/digibug/controllers/digibug.php
+++ b/modules/digibug/controllers/digibug.php
@@ -21,7 +21,7 @@ class Digibug_Controller extends Controller {
public function print_photo($id) {
access::verify_csrf();
$item = ORM::factory("item", $id);
- access::required("view_full", $item);
+ access::required("view", $item);
if (access::group_can(group::everybody(), "view_full", $item)) {
$full_url = $item->file_url(true);
@@ -56,6 +56,30 @@ class Digibug_Controller extends Controller {
}
public function print_proxy($type, $id) {
+ // If its a request for the full size then make sure we are coming from an
+ // authorized address
+ if ($type == "full") {
+ $remote_addr = ip2long($this->input->server("REMOTE_ADDR"));
+ if ($remote_addr === false) {
+ Kohana::show_404();
+ }
+ $config = Kohana::config("digibug");
+
+ $authorized = false;
+ foreach ($config["ranges"] as $ip_range) {
+ $low = ip2long($ip_range["low"]);
+ $high = ip2long($ip_range["high"]);
+ $authorized = $low !== false && $high !== false &&
+ $low <= $remote_addr && $remote_addr <= $high;
+ if ($authorized) {
+ break;
+ }
+ }
+ if (!$authorized) {
+ Kohana::show_404();
+ }
+ }
+
$proxy = ORM::factory("digibug_proxy", array("uuid" => $id));
if (!$proxy->loaded || !$proxy->item->loaded) {
Kohana::show_404();
@@ -69,16 +93,18 @@ class Digibug_Controller extends Controller {
// We don't need to save the session for this request
Session::abort_save();
- // Dump out the image
- header("Content-Type: $proxy->item->mime_type");
- Kohana::close_buffers(false);
- $fd = fopen($file, "rb");
- fpassthru($fd);
- fclose($fd);
+ if (!TEST_MODE) {
+ // Dump out the image
+ header("Content-Type: $proxy->item->mime_type");
+ Kohana::close_buffers(false);
+ $fd = fopen($file, "rb");
+ fpassthru($fd);
+ fclose($fd);
- // If the request was for the image and not the thumb, then delete the proxy.
- if ($type == "full") {
- $proxy->delete();
+ // If the request was for the image and not the thumb, then delete the proxy.
+ if ($type == "full") {
+ $proxy->delete();
+ }
}
$this->_clean_expired();
@@ -89,8 +115,8 @@ class Digibug_Controller extends Controller {
}
private function _clean_expired() {
- Database::instance()>query(
- "DELETE FROM {digibug_proxy} " .
+ Database::instance()->query(
+ "DELETE FROM {digibug_proxies} " .
"WHERE request_date <= (CURDATE() - INTERVAL 10 DAY) " .
"LIMIT 20");
}
diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php
index c95cada2..3f70fa24 100644
--- a/modules/digibug/helpers/digibug_menu.php
+++ b/modules/digibug/helpers/digibug_menu.php
@@ -37,7 +37,7 @@ class digibug_menu {
}
static function thumb($menu, $theme, $item) {
- if ($item->type == "photo" && access::can("view_full", $item)) {
+ if ($item->type == "photo") {
$menu->get("options_menu")
->append(
Menu::factory("link")
diff --git a/modules/digibug/helpers/digibug_theme.php b/modules/digibug/helpers/digibug_theme.php
index f94d07c6..ceda55b5 100644
--- a/modules/digibug/helpers/digibug_theme.php
+++ b/modules/digibug/helpers/digibug_theme.php
@@ -19,6 +19,6 @@
*/
class digibug_theme_Core {
static function head($theme) {
- $theme->script("modules/digibug/js/digibug.js");
+ $theme->script("digibug.js");
}
}
diff --git a/modules/digibug/tests/Digibug_Controller_Test.php b/modules/digibug/tests/Digibug_Controller_Test.php
new file mode 100644
index 00000000..859ff637
--- /dev/null
+++ b/modules/digibug/tests/Digibug_Controller_Test.php
@@ -0,0 +1,78 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class Digibug_Controller_Test extends Unit_Test_Case {
+ private $_proxy;
+ private $_item;
+ private $_server;
+
+ public function teardown() {
+ $_SERVER = $this->_server;
+
+ if ($this->_proxy) {
+ $this->_proxy->delete();
+ }
+ }
+
+ public function setup() {
+ $this->_server = $_SERVER;
+
+ $root = ORM::factory("item", 1);
+ $this->_album = album::create($root, rand(), "test album");
+ access::deny(group::everybody(), "view_full", $this->_album);
+ access::deny(group::registered_users(), "view_full", $this->_album);
+
+ $rand = rand();
+ $this->_item = photo::create($this->_album, MODPATH . "gallery/tests/test.jpg", "$rand.jpg",
+ $rand, $rand);
+ $this->_proxy = ORM::factory("digibug_proxy");
+ $this->_proxy->uuid = md5(rand());
+ $this->_proxy->item_id = $this->_item->id;
+ $this->_proxy->save();
+ }
+
+ public function digibug_request_thumb_test() {
+ $controller = new Digibug_Controller();
+ $controller->print_proxy("thumb", $this->_proxy->uuid);
+ }
+
+ public function digibug_request_full_malicious_ip_test() {
+ $_SERVER["REMOTE_ADDR"] = "123.123.123.123";
+ try {
+ $controller = new Digibug_Controller();
+ $controller->print_proxy("full", $this->_proxy->uuid);
+ $this->assert_true(false, "Should have failed with an 404 exception");
+ } catch (Kohana_404_Exception $e) {
+ // expected behavior
+ }
+ }
+
+ public function digibug_request_full_authorized_ip_test() {
+ $config = Kohana::config("digibug");
+ $this->assert_true(!empty($config), "The Digibug config is empty");
+
+ $ranges = array_values($config["ranges"]);
+ $low = ip2long($ranges[0]["low"]);
+ $high = ip2long($ranges[0]["high"]);
+
+ $_SERVER["REMOTE_ADDR"] = long2ip(rand($low, $high));
+ $controller = new Digibug_Controller();
+ $controller->print_proxy("full", $this->_proxy->uuid);
+ }
+}
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 56b74cb1..4fefd3a1 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -166,7 +166,8 @@ class Albums_Controller extends Items_Controller {
access::required("view", $album);
access::required("edit", $album);
- $form = album::get_edit_form($album);
+ $view = album::get_edit_form($album);
+ $form = $view->form;
if ($valid = $form->validate()) {
// Make sure that there's not a conflict
if ($album->id != 1 &&
@@ -202,7 +203,7 @@ class Albums_Controller extends Items_Controller {
} else {
print json_encode(
array("result" => "error",
- "form" => $form->__toString()));
+ "form" => $view->__toString()));
}
}
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php
index c8227d74..1391c4b4 100644
--- a/modules/gallery/controllers/movies.php
+++ b/modules/gallery/controllers/movies.php
@@ -70,7 +70,8 @@ class Movies_Controller extends Items_Controller {
access::required("view", $photo);
access::required("edit", $photo);
- $form = photo::get_edit_form($photo);
+ $view = photo::get_edit_form($photo);
+ $form = $view->form;
if ($valid = $form->validate()) {
// Make sure that there's not a conflict
if (Database::instance()
@@ -101,7 +102,7 @@ class Movies_Controller extends Items_Controller {
} else {
print json_encode(
array("result" => "error",
- "form" => $form->__toString()));
+ "form" => $view->__toString()));
}
}
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php
index 8ee24da8..9d9b25a1 100644
--- a/modules/gallery/controllers/photos.php
+++ b/modules/gallery/controllers/photos.php
@@ -61,7 +61,8 @@ class Photos_Controller extends Items_Controller {
access::required("view", $photo);
access::required("edit", $photo);
- $form = photo::get_edit_form($photo);
+ $view = photo::get_edit_form($photo);
+ $form = $view->form;
if ($valid = $form->validate()) {
if ($form->edit_item->filename->value != $photo->name) {
// Make sure that there's not a conflict
@@ -94,7 +95,7 @@ class Photos_Controller extends Items_Controller {
} else {
print json_encode(
array("result" => "error",
- "form" => $form->__toString()));
+ "form" => $view->__toString()));
}
}
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php
index 224b51e0..c84527f4 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -66,9 +66,10 @@
* the Access_Intent_Model
*/
class access_Core {
- const DENY = 0;
- const ALLOW = 1;
- const UNKNOWN = 2;
+ const DENY = false;
+ const ALLOW = true;
+ const INHERIT = null; // access_intent
+ const UNKNOWN = null; // cache (access_cache, items)
/**
* Does the active user have this permission on this item?
@@ -100,8 +101,8 @@ class access_Core {
$resource = $perm_name == "view" ?
$item : model_cache::get("access_cache", $item->id, "item_id");
- foreach (user::group_ids() as $id) {
- if ($resource->__get("{$perm_name}_$id") === self::ALLOW) {
+ foreach ($user->groups as $group) {
+ if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) {
return true;
}
}
@@ -141,7 +142,7 @@ class access_Core {
* @param Group_Model $group
* @param string $perm_name
* @param Item_Model $item
- * @return integer access::ALLOW, access::DENY or null for no intent
+ * @return boolean access::ALLOW, access::DENY or access::INHERIT (null) for no intent
*/
static function group_intent($group, $perm_name, $item) {
$intent = model_cache::get("access_intent", $item->id, "item_id");
@@ -169,7 +170,7 @@ class access_Core {
->where("`right` >= $item->right")
->where("items.id <> $item->id")
->join("access_intents", "items.id", "access_intents.item_id")
- ->where("access_intents.view_$group->id", 0)
+ ->where("access_intents.view_$group->id", self::DENY)
->orderby("level", "DESC")
->limit(1)
->find();
@@ -253,7 +254,7 @@ class access_Core {
if ($item->id == 1) {
throw new Exception("@todo CANT_RESET_ROOT_PERMISSION");
}
- self::_set($group, $perm_name, $item, null);
+ self::_set($group, $perm_name, $item, self::INHERIT);
}
/**
@@ -455,9 +456,10 @@ class access_Core {
$db = Database::instance();
$field = "{$perm_name}_{$group->id}";
$cache_table = $perm_name == "view" ? "items" : "access_caches";
- $db->query("ALTER TABLE {{$cache_table}} ADD `$field` SMALLINT NOT NULL DEFAULT 0");
- $db->query("ALTER TABLE {access_intents} ADD `$field` BOOLEAN DEFAULT NULL");
- $db->update("access_intents", array($field => 0), array("item_id" => 1));
+ $not_null = $cache_table == "items" ? "" : "NOT NULL";
+ $db->query("ALTER TABLE {{$cache_table}} ADD `$field` BINARY $not_null DEFAULT FALSE");
+ $db->query("ALTER TABLE {access_intents} ADD `$field` BINARY DEFAULT NULL");
+ $db->update("access_intents", array($field => self::DENY), array("item_id" => 1));
model_cache::clear();
ORM::factory("access_intent")->clear_cache();
}
@@ -513,7 +515,7 @@ class access_Core {
->where("left >=", $item->left)
->where("right <=", $item->right)
->where("type", "album")
- ->where("access_intents.$field IS NOT", null)
+ ->where("access_intents.$field IS NOT", self::INHERIT)
->orderby("level", "DESC")
->find_all();
foreach ($query as $row) {
@@ -557,12 +559,12 @@ class access_Core {
//
// @todo To optimize this, we wouldn't need to propagate from the parent, we could just
// propagate from here with the parent's intent.
- if ($access->$field === null) {
+ if ($access->$field === self::INHERIT) {
$tmp_item = ORM::factory("item")
->join("access_intents", "items.id", "access_intents.item_id")
->where("left <", $item->left)
->where("right >", $item->right)
- ->where("$field IS NOT", null)
+ ->where("$field IS NOT", self::UNKNOWN)
->orderby("left", "DESC")
->limit(1)
->find();
@@ -578,12 +580,13 @@ class access_Core {
->join("items", "items.id", "access_intents.item_id")
->where("left >=", $item->left)
->where("right <=", $item->right)
- ->where("$field IS NOT", null)
+ ->where("$field IS NOT", self::INHERIT)
->orderby("level", "ASC")
->find_all();
foreach ($query as $row) {
+ $value = ($row->$field === self::ALLOW) ? "TRUE" : "FALSE";
$db->query(
- "UPDATE {access_caches} SET `$field` = {$row->$field} " .
+ "UPDATE {access_caches} SET `$field` = $value " .
"WHERE `item_id` IN " .
" (SELECT `id` FROM {items} " .
" WHERE `left` >= $row->left " .
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index 5f10bd02..0263e0e1 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -94,9 +94,11 @@ class album_Core {
}
static function get_edit_form($parent) {
- $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gEditAlbumForm"));
- $form->hidden("_method")->value("put");
- $group = $form->group("edit_item")->label(t("Edit Album"));
+ $view = new View("item_edit.html");
+ $view->script = array();
+ $view->form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gEditAlbumForm"));
+ $view->form->hidden("_method")->value("put");
+ $group = $view->form->group("edit_item")->label(t("Edit Album"));
$group->input("title")->label(t("Title"))->value($parent->title);
$group->textarea("description")->label(t("Description"))->value($parent->description);
@@ -127,11 +129,11 @@ class album_Core {
"DESC" => t("Descending")))
->selected($parent->sort_order);
- module::event("item_edit_form", $parent, $form);
+ module::event("item_edit_form", $parent, $view);
$group->hidden("type")->value("album");
$group->submit("")->value(t("Modify"));
- $form->add_rules_from(ORM::factory("item"));
- return $form;
+ $view->form->add_rules_from(ORM::factory("item"));
+ return $view;
}
}
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index a32ac484..2fa7ad1c 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class gallery_Core {
- const VERSION = "3.0 beta 2";
+ const VERSION = "3.0 git (pre-beta3)";
/**
* If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index 28c1990f..db13307f 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -305,6 +305,24 @@ class gallery_installer {
module::clear_var("gallery", "version");
module::set_version("gallery", $version = 7);
}
+
+ if ($version == 7) {
+ $groups = ORM::factory("group")->find_all();
+ $permissions = ORM::factory("permission")->find_all();
+ foreach($groups as $group) {
+ foreach($permissions as $permission) {
+ // Update access intents
+ $db->query("ALTER TABLE {access_intents} MODIFY COLUMN {$permission->name}_{$group->id} BINARY(1) DEFAULT NULL");
+ // Update access cache
+ if ($permission->name === "view") {
+ $db->query("ALTER TABLE {items} MODIFY COLUMN {$permission->name}_{$group->id} BINARY(1) DEFAULT FALSE");
+ } else {
+ $db->query("ALTER TABLE {access_caches} MODIFY COLUMN {$permission->name}_{$group->id} BINARY(1) NOT NULL DEFAULT FALSE");
+ }
+ }
+ }
+ module::set_version("gallery", $version = 8);
+ }
}
static function uninstall() {
diff --git a/modules/gallery/helpers/gallery_quick.php b/modules/gallery/helpers/gallery_quick.php
index d0ffc584..8a92890b 100644
--- a/modules/gallery/helpers/gallery_quick.php
+++ b/modules/gallery/helpers/gallery_quick.php
@@ -108,12 +108,20 @@ class gallery_quick_Core {
"href" => url::site("move/browse/$item->id"));
}
- if (access::can("edit", $item->parent())) {
- $disabledState =
- $item->type == "album" && empty($item->album_cover_item_id) ? " ui-state-disabled" : "";
+ $parent = $item->parent();
+ if (access::can("edit", $parent)) {
+ // We can't make this item the highlight if it's an album with no album cover, or if it's
+ // already the album cover.
+ if (($item->type == "album" && empty($item->album_cover_item_id)) ||
+ ($item->type == "album" && $parent->album_cover_item_id == $item->album_cover_item_id) ||
+ $parent->album_cover_item_id == $item->id) {
+ $disabledState = " ui-state-disabled";
+ } else {
+ $disabledState = " ";
+ }
$elements["right"][] = (object)array(
"title" => $cover_title,
- "class" => "gButtonLink{$disabledState}",
+ "class" => "gButtonLink$disabledState",
"icon" => "ui-icon-star",
"href" => url::site("quick/make_album_cover/$item->id?csrf=$csrf&page_type=$page_type"));
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index f245ea31..998eb289 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -22,12 +22,12 @@ class gallery_theme_Core {
$session = Session::instance();
$buf = "";
if ($session->get("debug")) {
- $theme->css("modules/gallery/css/debug.css");
+ $theme->css("debug.css");
}
if (($theme->page_type == "album" || $theme->page_type == "photo")
&& access::can("edit", $theme->item())) {
- $theme->css("modules/gallery/css/quick.css");
- $theme->script("modules/gallery/js/quick.js");
+ $theme->css("quick.css");
+ $theme->script("quick.js");
}
if (module::is_active("rss")) {
@@ -43,9 +43,9 @@ class gallery_theme_Core {
}
if ($session->get("l10n_mode", false)) {
- $theme->css("modules/gallery/css/l10n_client.css");
- $theme->script("lib/jquery.cookie.js");
- $theme->script("modules/gallery/js/l10n_client.js");
+ $theme->css("l10n_client.css");
+ $theme->script("jquery.cookie.js");
+ $theme->script("l10n_client.js");
}
return $buf;
@@ -80,13 +80,13 @@ class gallery_theme_Core {
static function admin_head($theme) {
$session = Session::instance();
if ($session->get("debug")) {
- $theme->css("modules/gallery/css/debug.css");
+ $theme->css("debug.css");
}
if ($session->get("l10n_mode", false)) {
- $theme->css("modules/gallery/css/l10n_client.css");
- $theme->script("lib/jquery.cookie.js");
- $theme->script("modules/gallery/js/l10n_client.js");
+ $theme->css("l10n_client.css");
+ $theme->script("jquery.cookie.js");
+ $theme->script("l10n_client.js");
}
}
diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php
index 5cf37de1..299195e9 100644
--- a/modules/gallery/helpers/photo.php
+++ b/modules/gallery/helpers/photo.php
@@ -135,9 +135,11 @@ class photo_Core {
}
static function get_edit_form($photo) {
- $form = new Forge("photos/$photo->id", "", "post", array("id" => "gEditPhotoForm"));
- $form->hidden("_method")->value("put");
- $group = $form->group("edit_item")->label(t("Edit Photo"));
+ $view = new View("item_edit.html");
+ $view->script = array();
+ $view->form = new Forge("photos/$photo->id", "", "post", array("id" => "gEditPhotoForm"));
+ $view->form->hidden("_method")->value("put");
+ $group = $view->form->group("edit_item")->label(t("Edit Photo"));
$group->input("title")->label(t("Title"))->value($photo->title);
$group->textarea("description")->label(t("Description"))->value($photo->description);
$group->input("filename")->label(t("Filename"))->value($photo->name)
@@ -147,11 +149,11 @@ class photo_Core {
->callback("item::validate_no_trailing_period")
->error_messages("no_trailing_period", t("The photo name can't end in \".\""));
- module::event("item_edit_form", $photo, $form);
+ module::event("item_edit_form", $photo, $view);
$group->submit("")->value(t("Modify"));
- $form->add_rules_from(ORM::factory("item"));
- return $form;
+ $view->form->add_rules_from(ORM::factory("item"));
+ return $view;
}
/**
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 31231ca6..219cc883 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -27,24 +27,20 @@ class Gallery_View_Core extends View {
* @param $file the relative path to a script from the gallery3 directory
*/
public function script($file) {
- $this->scripts[$file] = 1;
- }
-
- /**
- * Add a script to the combined scripts list.
- * @param $file the relative path to a script from the base of the active theme
- * @param
- */
- public function theme_script($file) {
- $file = "themes/{$this->theme_name}/$file";
- $this->scripts[$file] = 1;
+ $base_file = str_replace(".js", "", $file);
+ if (($path = Kohana::find_file("js", $base_file, false, "js")) ||
+ file_exists($path = DOCROOT . "lib/$file")) {
+ $this->scripts[$path] = 1;
+ } else {
+ Kohana::log("error", "Can't find script file: $file");
+ }
}
/**
* Provide a url to a resource within the current theme. This allows us to refer to theme
* resources without naming the theme itself which makes themes easier to copy.
*/
- public function theme_url($path, $absolute_url=false) {
+ public function url($path, $absolute_url=false) {
$arg = "themes/{$this->theme_name}/$path";
return $absolute_url ? url::abs_file($arg) : url::file($arg);
}
@@ -53,27 +49,23 @@ class Gallery_View_Core extends View {
* Add a css file to the combined css list.
* @param $file the relative path to a script from the gallery3 directory
*/
- public function css($file, $theme_relative=false) {
- $this->css[$file] = 1;
- }
-
- /**
- * Add a css file to the combined css list.
- * @param $file the relative path to a script from the base of the active theme
- * @param
- */
- public function theme_css($file) {
- $file = "themes/{$this->theme_name}/$file";
- $this->css[$file] = 1;
+ public function css($file) {
+ $base_file = str_replace(".css", "", $file);
+ if (($path = Kohana::find_file("css", $base_file, false, "css")) ||
+ file_exists($path = DOCROOT . "lib/$file")) {
+ $this->css[$path] = 1;
+ } else {
+ Kohana::log("error", "Can't find css file: $file");
+ }
}
/**
* Combine a series of files into a single one and cache it in the database.
*/
- protected function combine_files($files, $type) {
+ protected function combine_files($paths, $type) {
$links = array();
- if (empty($files)) {
+ if (empty($paths)) {
return;
}
@@ -81,16 +73,10 @@ class Gallery_View_Core extends View {
// entries.
$key = array(url::abs_file(""));
- foreach (array_keys($files) as $file) {
- $path = DOCROOT . $file;
- if (file_exists($path)) {
- $stats = stat($path);
- $links[$file] = $path;
- // 7 == size, 9 == mtime, see http://php.net/stat
- $key[] = "$file $stats[7] $stats[9]";
- } else {
- Kohana::log("error", "missing file ($type): $file");
- }
+ foreach (array_keys($paths) as $path) {
+ $stats = stat($path);
+ // 7 == size, 9 == mtime, see http://php.net/stat
+ $key[] = "$path $stats[7] $stats[9]";
}
$key = md5(join(" ", $key));
@@ -99,11 +85,13 @@ class Gallery_View_Core extends View {
if (empty($contents)) {
$contents = "";
- foreach ($links as $file => $link) {
+ $docroot_len = strlen(DOCROOT);
+ foreach (array_keys($paths) as $path) {
+ $relative = substr($path, $docroot_len);
if ($type == "css") {
- $contents .= "/* $file */\n" . $this->process_css($link) . "\n";
+ $contents .= "/* $relative */\n" . $this->process_css($path) . "\n";
} else {
- $contents .= "/* $file */\n" . file_get_contents($link) . "\n";
+ $contents .= "/* $relative */\n" . file_get_contents($path) . "\n";
}
}
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index cefcaa08..ba367878 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 7
+version = 8
diff --git a/modules/gallery/tests/Access_Helper_Test.php b/modules/gallery/tests/Access_Helper_Test.php
index 1352b493..59cec453 100644
--- a/modules/gallery/tests/Access_Helper_Test.php
+++ b/modules/gallery/tests/Access_Helper_Test.php
@@ -64,6 +64,43 @@ class Access_Helper_Test extends Unit_Test_Case {
$this->assert_false(array_key_exists("access_test_{$group->id}", $fields));
}
+ public function user_can_access_test() {
+ $access_test = group::create("access_test");
+
+ $root = ORM::factory("item", 1);
+ access::allow($access_test, "view", $root);
+
+ $item = album::create($root, rand(), "test album");
+
+ access::deny(group::everybody(), "view", $item);
+ access::deny(group::registered_users(), "view", $item);
+
+ $user = user::create("access_test", "Access Test", "");
+ foreach ($user->groups as $group) {
+ $user->remove($group);
+ }
+ $user->add($access_test);
+ $user->save();
+
+ $this->assert_true(access::user_can($user, "view", $item), "Should be able to view");
+ }
+
+ public function user_can_no_access_test() {
+ $root = ORM::factory("item", 1);
+ $item = album::create($root, rand(), "test album");
+
+ access::deny(group::everybody(), "view", $item);
+ access::deny(group::registered_users(), "view", $item);
+
+ $user = user::create("access_test", "Access Test", "");
+ foreach ($user->groups as $group) {
+ $user->remove($group);
+ }
+ $user->save();
+
+ $this->assert_false(access::user_can($user, "view", $item), "Should be unable to view");
+ }
+
public function adding_and_removing_items_adds_ands_removes_rows_test() {
$root = ORM::factory("item", 1);
$item = album::create($root, rand(), "test album");
diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt
index ce2fa2a5..2940a8df 100644
--- a/modules/gallery/tests/xss_data.txt
+++ b/modules/gallery/tests/xss_data.txt
@@ -2,7 +2,7 @@ modules/akismet/views/admin_akismet.html.php 14 DIRTY $form
modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY $api_key
modules/akismet/views/admin_akismet_stats.html.php 9 DIRTY $blog_url
modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY $i
-modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY $comment->author()->avatar_url(32, $theme->theme_url("images/avatar.jpg", true))
+modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true))
modules/comment/views/admin_block_recent_comments.html.php 7 $comment->author_name()
modules/comment/views/admin_block_recent_comments.html.php 10 DIRTY $comment->created
modules/comment/views/admin_block_recent_comments.html.php 12 $comment->author_name()
@@ -15,7 +15,7 @@ modules/comment/views/admin_comments.html.php 72 DIRTY $counts->
modules/comment/views/admin_comments.html.php 75 DIRTY $csrf
modules/comment/views/admin_comments.html.php 106 DIRTY $comment->id
modules/comment/views/admin_comments.html.php 106 DIRTY $i
-modules/comment/views/admin_comments.html.php 109 DIRTY $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true))
+modules/comment/views/admin_comments.html.php 109 DIRTY $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true))
modules/comment/views/admin_comments.html.php 111 $comment->author_name()
modules/comment/views/admin_comments.html.php 115 $comment->author_email()
modules/comment/views/admin_comments.html.php 116 $comment->author_email()
@@ -35,7 +35,7 @@ modules/comment/views/admin_comments.html.php 175 DIRTY $comment-
modules/comment/views/admin_comments.html.php 183 DIRTY $comment->id
modules/comment/views/admin_comments.html.php 196 DIRTY $pager
modules/comment/views/comment.html.php 2 DIRTY $comment->id
-modules/comment/views/comment.html.php 5 DIRTY $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true))
+modules/comment/views/comment.html.php 5 DIRTY $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true))
modules/comment/views/comment.html.php 7 $comment->author_name()
modules/comment/views/comment.html.php 12 DIRTY $comment->created
modules/comment/views/comment.html.php 13 $comment->author_name()
@@ -58,7 +58,7 @@ modules/comment/views/comment.mrss.php 34 DIRTY $child->t
modules/comment/views/comment.mrss.php 35 DIRTY $child->thumb_height
modules/comment/views/comment.mrss.php 35 DIRTY $child->thumb_width
modules/comment/views/comments.html.php 10 DIRTY $comment->id
-modules/comment/views/comments.html.php 13 DIRTY $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true))
+modules/comment/views/comments.html.php 13 DIRTY $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true))
modules/comment/views/comments.html.php 15 $comment->author_name()
modules/comment/views/comments.html.php 20 DIRTY $comment->created
modules/comment/views/comments.html.php 21 $comment->author_name()
@@ -108,7 +108,7 @@ modules/gallery/views/admin_block_photo_stream.html.php 6 DIRTY $photo->w
modules/gallery/views/admin_block_photo_stream.html.php 6 DIRTY $photo->height
modules/gallery/views/admin_block_photo_stream.html.php 7 DIRTY $photo->thumb_url()
modules/gallery/views/admin_block_photo_stream.html.php 7 $photo->title
-modules/gallery/views/admin_block_platform.html.php 16 DIRTY $load_average
+modules/gallery/views/admin_block_platform.html.php 19 DIRTY $load_average
modules/gallery/views/admin_block_stats.html.php 7 DIRTY $album_count
modules/gallery/views/admin_block_stats.html.php 10 DIRTY $photo_count
modules/gallery/views/admin_dashboard.html.php 5 DIRTY $csrf
@@ -207,6 +207,8 @@ modules/gallery/views/admin_themes_preview.html.php 4 DIRTY $info->na
modules/gallery/views/admin_themes_preview.html.php 7 DIRTY $url
modules/gallery/views/after_install.html.php 11 $user->name
modules/gallery/views/after_install.html.php 15 DIRTY $user->id
+modules/gallery/views/item_edit.html.php 4 DIRTY $script
+modules/gallery/views/item_edit.html.php 8 DIRTY $form
modules/gallery/views/kohana_error_page.php 102 DIRTY $message
modules/gallery/views/kohana_error_page.php 104 DIRTY $file
modules/gallery/views/kohana_error_page.php 104 DIRTY $line
@@ -303,8 +305,8 @@ modules/info/views/info_block.html.php 10 $item->de
modules/info/views/info_block.html.php 16 $item->name
modules/info/views/info_block.html.php 22 DIRTY $item->captured
modules/info/views/info_block.html.php 29 DIRTY $item->owner->url
-modules/info/views/info_block.html.php 29 $item->owner->full_name
-modules/info/views/info_block.html.php 31 $item->owner->name
+modules/info/views/info_block.html.php 29 $item->owner->display_name()
+modules/info/views/info_block.html.php 31 $item->owner->display_name()
modules/notification/views/comment_published.html.php 4 $subject
modules/notification/views/comment_published.html.php 7 $subject
modules/notification/views/comment_published.html.php 11 $comment->text
@@ -442,8 +444,8 @@ modules/tag/views/admin_tags.html.php 50 DIRTY $tag->id
modules/tag/views/admin_tags.html.php 50 $tag->name
modules/tag/views/admin_tags.html.php 51 DIRTY $tag->count
modules/tag/views/admin_tags.html.php 52 DIRTY $tag->id
-modules/tag/views/tag_block.html.php 3 DIRTY $cloud
-modules/tag/views/tag_block.html.php 5 DIRTY $form
+modules/tag/views/tag_block.html.php 13 DIRTY $cloud
+modules/tag/views/tag_block.html.php 15 DIRTY $form
modules/tag/views/tag_cloud.html.php 4 DIRTY $tag->count
modules/tag/views/tag_cloud.html.php 4 DIRTY $max_count
modules/tag/views/tag_cloud.html.php 5 DIRTY $tag->count
@@ -454,7 +456,7 @@ modules/user/views/admin_users.html.php 36 DIRTY $csrf
modules/user/views/admin_users.html.php 67 DIRTY $user->id
modules/user/views/admin_users.html.php 67 DIRTY $user->admin
modules/user/views/admin_users.html.php 68 DIRTY $user->id
-modules/user/views/admin_users.html.php 69 DIRTY $user->avatar_url(20, $theme->theme_url("images/avatar.jpg", true))
+modules/user/views/admin_users.html.php 69 DIRTY $user->avatar_url(20, $theme->url("images/avatar.jpg", true))
modules/user/views/admin_users.html.php 71 $user->name
modules/user/views/admin_users.html.php 74 $user->name
modules/user/views/admin_users.html.php 77 $user->full_name
@@ -475,9 +477,7 @@ modules/user/views/admin_users_group.html.php 22 DIRTY $group->i
modules/user/views/admin_users_group.html.php 25 $user->name
modules/user/views/admin_users_group.html.php 25 $group->name
modules/user/views/login.html.php 12 DIRTY $user->id
-modules/user/views/login.html.php 15 $user->full_name
-modules/user/views/login.html.php 15 $user->name
-modules/user/views/login.html.php 15 $user->full_name
+modules/user/views/login.html.php 15 $user->display_name()
modules/user/views/login.html.php 18 DIRTY $csrf
modules/user/views/login_ajax.html.php 37 DIRTY $form
modules/user/views/reset_password.html.php 9 $user->full_name
@@ -488,20 +488,20 @@ modules/watermark/views/admin_watermarks.html.php 19 DIRTY $width
modules/watermark/views/admin_watermarks.html.php 19 DIRTY $height
modules/watermark/views/admin_watermarks.html.php 19 DIRTY $url
modules/watermark/views/admin_watermarks.html.php 21 DIRTY $position
-themes/admin_default/views/admin.html.php 10 DIRTY $theme->css("lib/yui/reset-fonts-grids.css")
-themes/admin_default/views/admin.html.php 11 DIRTY $theme->css("lib/themeroller/ui.base.css")
-themes/admin_default/views/admin.html.php 12 DIRTY $theme->css("lib/superfish/css/superfish.css")
-themes/admin_default/views/admin.html.php 13 DIRTY $theme->css("themes/default/css/screen.css")
-themes/admin_default/views/admin.html.php 14 DIRTY $theme->theme_css("css/screen.css")
-themes/admin_default/views/admin.html.php 16 DIRTY $theme->theme_url("css/fix-ie.css")
-themes/admin_default/views/admin.html.php 20 DIRTY $theme->script("lib/jquery.js")
-themes/admin_default/views/admin.html.php 21 DIRTY $theme->script("lib/jquery.form.js")
-themes/admin_default/views/admin.html.php 22 DIRTY $theme->script("lib/jquery-ui.js")
-themes/admin_default/views/admin.html.php 23 DIRTY $theme->script("lib/gallery.common.js")
-themes/admin_default/views/admin.html.php 28 DIRTY $theme->script("lib/gallery.dialog.js")
-themes/admin_default/views/admin.html.php 29 DIRTY $theme->script("lib/superfish/js/superfish.js")
-themes/admin_default/views/admin.html.php 30 DIRTY $theme->theme_script("js/jquery.dropshadow.js")
-themes/admin_default/views/admin.html.php 31 DIRTY $theme->theme_script("js/ui.init.js")
+themes/admin_default/views/admin.html.php 10 DIRTY $theme->css("yui/reset-fonts-grids.css")
+themes/admin_default/views/admin.html.php 11 DIRTY $theme->css("themeroller/ui.base.css")
+themes/admin_default/views/admin.html.php 12 DIRTY $theme->css("superfish/css/superfish.css")
+themes/admin_default/views/admin.html.php 13 DIRTY $theme->css("screen.css")
+themes/admin_default/views/admin.html.php 14 DIRTY $theme->css("admin_screen.css")
+themes/admin_default/views/admin.html.php 16 DIRTY $theme->url("fix-ie.css")
+themes/admin_default/views/admin.html.php 20 DIRTY $theme->script("jquery.js")
+themes/admin_default/views/admin.html.php 21 DIRTY $theme->script("jquery.form.js")
+themes/admin_default/views/admin.html.php 22 DIRTY $theme->script("jquery-ui.js")
+themes/admin_default/views/admin.html.php 23 DIRTY $theme->script("gallery.common.js")
+themes/admin_default/views/admin.html.php 28 DIRTY $theme->script("gallery.dialog.js")
+themes/admin_default/views/admin.html.php 29 DIRTY $theme->script("superfish/js/superfish.js")
+themes/admin_default/views/admin.html.php 30 DIRTY $theme->script("jquery.dropshadow.js")
+themes/admin_default/views/admin.html.php 31 DIRTY $theme->script("ui.init.js")
themes/admin_default/views/admin.html.php 33 DIRTY $theme->admin_head()
themes/admin_default/views/admin.html.php 36 DIRTY $theme->body_attributes()
themes/admin_default/views/admin.html.php 37 DIRTY $theme->admin_page_top()
@@ -569,7 +569,7 @@ themes/default/views/footer.html.php 4 DIRTY $footer_t
themes/default/views/footer.html.php 9 DIRTY $theme->credits()
themes/default/views/header.html.php 2 DIRTY $theme->header_top()
themes/default/views/header.html.php 4 DIRTY $header_text
-themes/default/views/header.html.php 7 DIRTY $theme->theme_url("images/logo.png")
+themes/default/views/header.html.php 7 DIRTY $theme->url("images/logo.png")
themes/default/views/header.html.php 12 DIRTY $theme->site_menu()
themes/default/views/header.html.php 15 DIRTY $theme->header_bottom()
themes/default/views/header.html.php 21 DIRTY $parent->id
@@ -590,27 +590,27 @@ themes/default/views/page.html.php 13 $theme->i
themes/default/views/page.html.php 15 $theme->item()->title
themes/default/views/page.html.php 17 $theme->item()->title
themes/default/views/page.html.php 20 $theme->tag()->name
-themes/default/views/page.html.php 26 DIRTY $theme->theme_url("images/favicon.ico")
-themes/default/views/page.html.php 27 DIRTY $theme->css("lib/yui/reset-fonts-grids.css")
-themes/default/views/page.html.php 28 DIRTY $theme->css("lib/superfish/css/superfish.css")
-themes/default/views/page.html.php 29 DIRTY $theme->css("lib/themeroller/ui.base.css")
-themes/default/views/page.html.php 30 DIRTY $theme->theme_css("css/screen.css")
-themes/default/views/page.html.php 32 DIRTY $theme->theme_url("css/fix-ie.css")
+themes/default/views/page.html.php 26 DIRTY $theme->url("images/favicon.ico")
+themes/default/views/page.html.php 27 DIRTY $theme->css("yui/reset-fonts-grids.css")
+themes/default/views/page.html.php 28 DIRTY $theme->css("superfish/css/superfish.css")
+themes/default/views/page.html.php 29 DIRTY $theme->css("themeroller/ui.base.css")
+themes/default/views/page.html.php 30 DIRTY $theme->css("screen.css")
+themes/default/views/page.html.php 32 DIRTY $theme->url("css/fix-ie.css")
themes/default/views/page.html.php 41 DIRTY $new_width
themes/default/views/page.html.php 42 DIRTY $new_height
themes/default/views/page.html.php 43 DIRTY $thumb_proportion
-themes/default/views/page.html.php 48 DIRTY $theme->script("lib/jquery.js")
-themes/default/views/page.html.php 49 DIRTY $theme->script("lib/jquery.form.js")
-themes/default/views/page.html.php 50 DIRTY $theme->script("lib/jquery-ui.js")
-themes/default/views/page.html.php 51 DIRTY $theme->script("lib/gallery.common.js")
-themes/default/views/page.html.php 56 DIRTY $theme->script("lib/gallery.dialog.js")
-themes/default/views/page.html.php 57 DIRTY $theme->script("lib/gallery.form.js")
-themes/default/views/page.html.php 58 DIRTY $theme->script("lib/superfish/js/superfish.js")
-themes/default/views/page.html.php 59 DIRTY $theme->script("lib/jquery.localscroll.js")
-themes/default/views/page.html.php 60 DIRTY $theme->theme_script("js/ui.init.js")
-themes/default/views/page.html.php 64 DIRTY $theme->script("lib/jquery.scrollTo.js")
-themes/default/views/page.html.php 65 DIRTY $theme->script("lib/gallery.show_full_size.js")
-themes/default/views/page.html.php 67 DIRTY $theme->script("lib/flowplayer.js")
+themes/default/views/page.html.php 48 DIRTY $theme->script("jquery.js")
+themes/default/views/page.html.php 49 DIRTY $theme->script("jquery.form.js")
+themes/default/views/page.html.php 50 DIRTY $theme->script("jquery-ui.js")
+themes/default/views/page.html.php 51 DIRTY $theme->script("gallery.common.js")
+themes/default/views/page.html.php 56 DIRTY $theme->script("gallery.dialog.js")
+themes/default/views/page.html.php 57 DIRTY $theme->script("gallery.form.js")
+themes/default/views/page.html.php 58 DIRTY $theme->script("superfish/js/superfish.js")
+themes/default/views/page.html.php 59 DIRTY $theme->script("jquery.localscroll.js")
+themes/default/views/page.html.php 60 DIRTY $theme->script("ui.init.js")
+themes/default/views/page.html.php 64 DIRTY $theme->script("jquery.scrollTo.js")
+themes/default/views/page.html.php 65 DIRTY $theme->script("gallery.show_full_size.js")
+themes/default/views/page.html.php 67 DIRTY $theme->script("flowplayer.js")
themes/default/views/page.html.php 70 DIRTY $theme->head()
themes/default/views/page.html.php 73 DIRTY $theme->body_attributes()
themes/default/views/page.html.php 74 DIRTY $theme->page_top()
diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php
index 5c2c03a1..c81fe571 100644
--- a/modules/gallery/views/admin_maintenance_task.html.php
+++ b/modules/gallery/views/admin_maintenance_task.html.php
@@ -1,11 +1,32 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
+ var target_value;
+ var animation = null;
+ var delta = 1;
+ animate_progress_bar = function() {
+ var current_value = Number($(".gProgressBar div").css("width").replace("%", ""));
+ if (current_value != target_value) {
+ var new_value = Math.min(current_value + delta, target_value);
+ if (target_value - current_value > delta) {
+ delta += .075;
+ }
+ $(".gProgressBar").progressbar("value", new_value);
+ animation = setTimeout(function() { animate_progress_bar(target_value); }, 100);
+ } else {
+ animation = null;
+ delta = 1;
+ }
+ }
+
update = function() {
$.ajax({
url: "<?= url::site("admin/maintenance/run/$task->id?csrf=$csrf") ?>",
dataType: "json",
success: function(data) {
- $(".gProgressBar").progressbar("value", data.task.percent_complete);
+ target_value = data.task.percent_complete;
+ if (!animation) {
+ animate_progress_bar();
+ }
$("#gStatus").html("" + data.task.status);
if (data.task.done) {
$("#gPauseButton").hide();
diff --git a/modules/gallery/views/item_edit.html.php b/modules/gallery/views/item_edit.html.php
new file mode 100644
index 00000000..9aa2fb64
--- /dev/null
+++ b/modules/gallery/views/item_edit.html.php
@@ -0,0 +1,9 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<? if (!empty($script)): ?>
+<script>
+ <?= implode("\n", $script) ?>
+</script>
+<? endif ?>
+<div id="gEditFormContainer">
+ <?= $form ?>
+</div> \ No newline at end of file
diff --git a/modules/gallery/views/permissions_form.html.php b/modules/gallery/views/permissions_form.html.php
index 0f60070a..ee5e3a24 100644
--- a/modules/gallery/views/permissions_form.html.php
+++ b/modules/gallery/views/permissions_form.html.php
@@ -26,7 +26,7 @@
</a>
</td>
<? else: ?>
- <? if ($intent === null): ?>
+ <? if ($intent === access::INHERIT): ?>
<? if ($allowed): ?>
<td class="gAllowed">
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php
index e246af2c..d91a37e8 100644
--- a/modules/notification/helpers/notification.php
+++ b/modules/notification/helpers/notification.php
@@ -67,6 +67,8 @@ class notification {
}
static function get_subscribers($item) {
+ // @todo don't access the user table directly
+ // @todo only return distinct email addresses
$users = ORM::factory("user")
->join("subscriptions", "users.id", "subscriptions.user_id")
->join("items", "subscriptions.item_id", "items.id")
@@ -77,9 +79,11 @@ class notification {
$subscribers = array();
foreach ($users as $user) {
- $subscribers[] = $user->email;
+ if (access::user_can($user, "view", $item)) {
+ $subscribers[$user->email] = 1;
+ }
}
- return $subscribers;
+ return array_keys($subscribers);
}
static function send_item_updated($item) {
@@ -103,8 +107,8 @@ class notification {
array("title" => $item->title, "parent_title" => $parent->title)) :
($item->is_photo() ?
t("Photo %title added to %parent_title",
- array("title" => $item->title, "parent_title" => $parent->title))
- : t("Movie %title added to %parent_title",
+ array("title" => $item->title, "parent_title" => $parent->title)) :
+ t("Movie %title added to %parent_title",
array("title" => $item->title, "parent_title" => $parent->title)));
self::_notify_subscribers($item, $v->render(), $v->subject);
diff --git a/modules/notification/helpers/notification_menu.php b/modules/notification/helpers/notification_menu.php
index 87478b8a..73d1dd03 100644
--- a/modules/notification/helpers/notification_menu.php
+++ b/modules/notification/helpers/notification_menu.php
@@ -22,10 +22,10 @@ class notification_menu_Core {
if (!user::active()->guest) {
$item = $theme->item();
- if ($item && $item->is_album()) {
+ if ($item && $item->is_album() && access::can("view", $item)) {
$watching = notification::is_watching($item);
- $watching ? $label = t("Remove notifications") : $label = t("Enable notifications");
+ $label = $watching ? t("Remove notifications") : t("Enable notifications");
$menu->get("options_menu")
->append(Menu::factory("link")
diff --git a/modules/organize/helpers/organize_theme.php b/modules/organize/helpers/organize_theme.php
index 02f1f589..e4feba2b 100644
--- a/modules/organize/helpers/organize_theme.php
+++ b/modules/organize/helpers/organize_theme.php
@@ -20,8 +20,8 @@
class organize_theme {
static function head($theme) {
// @tdo remove the addition css and organize.js (just here to test)
- $theme->script("modules/organize/js/organize_init.js");
- $theme->script("modules/organize/js/organize.js");
- $theme->css("modules/organize/css/organize.css");
+ $theme->script("organize_init.js");
+ $theme->script("organize.js");
+ $theme->css("organize.css");
}
}
diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php
index 6317020f..b08cf89d 100644
--- a/modules/search/helpers/search.php
+++ b/modules/search/helpers/search.php
@@ -24,7 +24,7 @@ class search_Core {
if (!user::active()->admin) {
foreach (user::group_ids() as $id) {
- $fields[] = "`view_$id` = " . access::ALLOW;
+ $fields[] = "`view_$id` = TRUE"; // access::ALLOW
}
$access_sql = "AND (" . join(" AND ", $fields) . ")";
} else {
diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php
index 02f99690..2ba2e167 100644
--- a/modules/server_add/helpers/server_add_theme.php
+++ b/modules/server_add/helpers/server_add_theme.php
@@ -20,20 +20,20 @@
class server_add_theme_Core {
static function head($theme) {
if (user::active()->admin) {
- $theme->script("modules/server_add/js/server_add.js");
+ $theme->script("server_add.js");
}
}
static function admin_head($theme) {
$head = array();
if (strpos(Router::$current_uri, "admin/server_add") !== false) {
- $theme->css("lib/jquery.autocomplete.css");
+ $theme->css("jquery.autocomplete.css");
$base = url::site("__ARGS__");
$csrf = access::csrf_token();
$head[] = "<script> var base_url = \"$base\"; var csrf = \"$csrf\";</script>";
- $theme->script("lib/jquery.autocomplete.js");
- $theme->script("modules/server_add/js/admin.js");
+ $theme->script("jquery.autocomplete.js");
+ $theme->script("admin.js");
}
return implode("\n", $head);
diff --git a/modules/server_add/views/server_add_tree_dialog.html.php b/modules/server_add/views/server_add_tree_dialog.html.php
index a4eda3b9..21952849 100644
--- a/modules/server_add/views/server_add_tree_dialog.html.php
+++ b/modules/server_add/views/server_add_tree_dialog.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
var GET_CHILDREN_URL = "<?= url::site("server_add/children?path=__PATH__") ?>";
- var START_URL = "<?= url::site("server_add/start?item_id={$item->id}&amp;csrf=$csrf") ?>";
+ var START_URL = "<?= url::site("server_add/start?item_id={$item->id}&csrf=$csrf") ?>";
</script>
<div id="gServerAdd">
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index 85f6d16e..a600ea1a 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -53,10 +53,10 @@ class Tags_Controller extends REST_Controller {
$form = tag::get_add_form($item);
if ($form->validate()) {
- foreach (split("[\,\ \;]", $form->add_tag->inputs["name"]->value) as $tag_name) {
+ foreach (split("[\,\;]", $form->add_tag->inputs["name"]->value) as $tag_name) {
$tag_name = trim($tag_name);
if ($tag_name) {
- $tag = tag::add($item, $tag_name);
+ $tag = tag::add($item, str_replace(" ", ".", $tag_name));
}
}
@@ -78,4 +78,21 @@ class Tags_Controller extends REST_Controller {
return tag::get_add_form($item);
}
+
+ public function autocomplete() {
+ $tags = array();
+ $tag_parts = preg_split("#[,\s;]+# ", $this->input->get("q"));
+ $limit = $this->input->get("limit");
+ $tag_part = end($tag_parts);
+ $tag_list = ORM::factory("tag")
+ ->like("name", "{$tag_part}%", false)
+ ->orderby("name", "ASC")
+ ->limit($limit)
+ ->find_all();
+ foreach ($tag_list as $tag) {
+ $tags[] = $tag->name;
+ }
+
+ print implode("\n", $tags);
+ }
}
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index 5efa6a19..be5461a4 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -104,7 +104,7 @@ class tag_Core {
($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie"));
$group = $form->group("add_tag")->label("Add Tag");
- $group->input("name")->label($label)->rules("required|length[1,64]");
+ $group->input("name")->label($label)->rules("required");
$group->hidden("item_id")->value($item->id);
$group->submit("")->value(t("Add Tag"));
return $form;
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index d13d1340..58034900 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -64,9 +64,15 @@ class tag_event_Core {
tag::compact();
}
- static function item_edit_form($item, $form) {
+ static function item_edit_form($item, $view) {
+ $url = url::site("tags/autocomplete");
+ $view->script[] = "$('#gEditFormContainer form').ready(function() {
+ $('#gEditFormContainer form input[id=tags]').autocomplete(
+ '$url', {max: 30, formatResult: formatTagAutoCompleteResult}
+ );
+ });";
$tag_value = implode("; ", tag::item_tags($item));
- $form->edit_item->input("tags")->label(t("Tags (separate by , or ;)"))
+ $view->form->edit_item->input("tags")->label(t("Tags (separate by , or ;)"))
->value($tag_value);
}
@@ -74,7 +80,7 @@ class tag_event_Core {
tag::clear_all($item);
foreach (preg_split("/[,;]/", $form->edit_item->tags->value) as $tag_name) {
if ($tag_name) {
- tag::add($item, $tag_name);
+ tag::add($item, str_replace(" ", ".", $tag_name));
}
}
tag::compact();
diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php
index fe30354f..1bce9bd8 100644
--- a/modules/tag/helpers/tag_theme.php
+++ b/modules/tag/helpers/tag_theme.php
@@ -19,11 +19,13 @@
*/
class tag_theme_Core {
static function head($theme) {
- $theme->script("modules/tag/js/tag.js");
+ $theme->css("jquery.autocomplete.css");
+ $theme->script("jquery.autocomplete.js");
+ $theme->script("tag.js");
}
static function admin_head($theme) {
- $theme->script("modules/tag/js/tag.js");
+ $theme->script("tag.js");
}
static function sidebar_blocks($theme) {
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js
index a1eaeecd..bbf44166 100644
--- a/modules/tag/js/tag.js
+++ b/modules/tag/js/tag.js
@@ -7,7 +7,7 @@ function ajaxify_tag_form() {
dataType: "json",
success: function(data) {
if (data.result == "success") {
- $.get($("#gTagCloud").attr("src"), function(data, textStatus) {
+ $.get($("#gTagCloud").attr("title"), function(data, textStatus) {
$("#gTagCloud").html(data);
});
}
@@ -66,3 +66,18 @@ function editInPlace(element) {
};
ajaxify_editInPlaceForm();
}
+
+function formatTagAutoCompleteResult(row) {
+ var text = $(".ac_loading").val();
+ if (/[\s,;]/.test(text)) {
+ for (var i= text.length - 1; i >= 0; i--) {
+ var chr = text.charAt(i);
+ if (chr == " " || chr == "," || chr == ";") {
+ break;
+ }
+ }
+ return text.substr(0, i + 1) + row[0];
+ } else {
+ return row[0];
+ }
+}
diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php
index 7a85dbab..e910a8ee 100644
--- a/modules/tag/models/tag.php
+++ b/modules/tag/models/tag.php
@@ -44,10 +44,14 @@ class Tag_Model extends ORM {
* @return integer
*/
public function items_count($type=null) {
- return ORM::factory("item")
+ $model = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
- ->where("items_tags.tag_id", $this->id)
- ->count_all();
+ ->where("items_tags.tag_id", $this->id);
+
+ if ($type) {
+ $model->where("items.type", $type);
+ }
+ return $model->count_all();
}
} \ No newline at end of file
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index 9c8f3de5..233eb361 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -1,5 +1,15 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="gTagCloud" src="<?= url::site("tags") ?>">
+<script>
+ $("#gAddTagForm").ready(function() {
+ var url = $("#gTagCloud").attr("title") + "/autocomplete";
+ $("#gAddTagForm input:text").autocomplete(
+ url, {
+ max: 30,
+ formatResult: formatTagAutoCompleteResult}
+ );
+ });
+</script>
+<div id="gTagCloud" title="<?= url::site("tags") ?>">
<?= $cloud ?>
</div>
<?= $form ?> \ No newline at end of file
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index b5dc6cb5..0a0086ff 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -48,8 +48,10 @@ class Admin_Users_Controller extends Controller {
$desired_locale = $form->add_user->locale->value;
$user->locale = $desired_locale == "none" ? null : $desired_locale;
}
-
$user->save();
+
+ module::event("user_add_form_admin_completed", $user, $form);
+
message::success(t("Created user %user_name", array("user_name" => p::clean($user->name))));
print json_encode(array("result" => "success"));
} else {
diff --git a/modules/user/controllers/users.php b/modules/user/controllers/users.php
index 46f799c5..0bf2e81d 100644
--- a/modules/user/controllers/users.php
+++ b/modules/user/controllers/users.php
@@ -39,6 +39,7 @@ class Users_Controller extends REST_Controller {
$user->locale = $desired_locale == "none" ? null : $desired_locale;
}
$user->save();
+ module::event("user_edit_form_completed", $user, $form);
message::success(t("User information updated."));
print json_encode(
diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php
index 53e9052c..a153ab69 100644
--- a/modules/user/helpers/user.php
+++ b/modules/user/helpers/user.php
@@ -36,6 +36,8 @@ class user_Core {
$group->input("url")->label(t("URL"))->id("gUrl")->value($user->url);
$group->submit("")->value(t("Save"));
$form->add_rules_from($user);
+
+ module::event("user_edit_form", $user);
return $form;
}
@@ -56,6 +58,8 @@ class user_Core {
$group->submit("")->value(t("Modify User"));
$form->add_rules_from($user);
$form->edit_user->password->rules("-required");
+
+ module::event("user_edit_form_admin", $user);
return $form;
}
@@ -75,6 +79,8 @@ class user_Core {
$group->submit("")->value(t("Add User"));
$user = ORM::factory("user");
$form->add_rules_from($user);
+
+ module::event("user_add_form_admin", $user);
return $form;
}
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
index ad9d4c63..c5351f8e 100644
--- a/modules/user/helpers/user_theme.php
+++ b/modules/user/helpers/user_theme.php
@@ -26,7 +26,7 @@ class user_theme_Core {
static function admin_head($theme) {
if (strpos(Router::$current_uri, "admin/users") !== false) {
- $theme->script("lib/gallery.panel.js");
+ $theme->script("gallery.panel.js");
}
}
}
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php
index b469f82d..542b8b8b 100644
--- a/modules/user/views/admin_users.html.php
+++ b/modules/user/views/admin_users.html.php
@@ -66,7 +66,7 @@
<? foreach ($users as $i => $user): ?>
<tr id="gUser-<?= $user->id ?>" class="<?= text::alternate("gOddRow", "gEvenRow") ?> user <?= $user->admin ? "admin" : "" ?>">
<td id="user-<?= $user->id ?>" class="core-info gDraggable">
- <img src="<?= $user->avatar_url(20, $theme->theme_url("images/avatar.jpg", true)) ?>"
+ <img src="<?= $user->avatar_url(20, $theme->url("images/avatar.jpg", true)) ?>"
title="<?= t("Drag user onto group below to add as a new member") ?>"
alt="<?= p::clean($user->name) ?>"
width="20"
diff --git a/system/libraries/ORM.php b/system/libraries/ORM.php
index c1048604..5196ba27 100644
--- a/system/libraries/ORM.php
+++ b/system/libraries/ORM.php
@@ -1295,7 +1295,9 @@ class ORM_Core {
$value = (float) $value;
break;
case 'boolean':
- $value = (bool) $value;
+ if ($value === "t") $value = true; // For PgSQL
+ else if ($value === "f") $value = false; // For PgSQL
+ else $value = (bool) $value;
break;
case 'string':
$value = (string) $value;
diff --git a/system/libraries/drivers/Database.php b/system/libraries/drivers/Database.php
index 807469f6..27f6ea8e 100644
--- a/system/libraries/drivers/Database.php
+++ b/system/libraries/drivers/Database.php
@@ -120,7 +120,7 @@ abstract class Database_Driver {
$key .= ' =';
}
- $value = ($value == TRUE) ? ' 1' : ' 0';
+ $value = ($value == TRUE) ? ' TRUE' : ' FALSE';
}
else
{
@@ -310,7 +310,7 @@ abstract class Database_Driver {
$value = '\''.$this->escape_str($value).'\'';
break;
case 'boolean':
- $value = (int) $value;
+ $value = ($value == TRUE) ? 'TRUE' : 'FALSE';
break;
case 'double':
// Convert to non-locale aware float to prevent possible commas
diff --git a/themes/admin_default/css/admin_screen.css b/themes/admin_default/css/admin_screen.css
new file mode 100644
index 00000000..d408acf0
--- /dev/null
+++ b/themes/admin_default/css/admin_screen.css
@@ -0,0 +1,458 @@
+/**
+ * Gallery 3 Default Admin Theme Screen Styles
+ *
+ * Extends themes/default/css/screen.css
+ *
+ * 1) Basic HTML elements
+ * 2) Reusable content blocks
+ * 3) Page layout containers
+ * 4) Content blocks in specific layout containers
+ * 5) Browser hacks
+ * 6) jQuery and jQuery UI
+ * 7) Server Add
+ * 8) Digibug Print Administration
+ */
+
+/** *******************************************************************
+ * 1) Basic HTML elements
+ **********************************************************************/
+
+/** *******************************************************************
+ * 2) Reusable content blocks
+ **********************************************************************/
+
+.gBlock {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ margin-bottom: 1em;
+ padding: 1em;
+}
+
+#gSidebar .gBlockContent {
+ padding: 0;
+}
+
+.gSelected img,
+.gAvailable .gBlock img {
+ float: left;
+ margin-right: 1em;
+}
+
+.rtl .gSelected img,
+.rtl .gAvailable .gBlock img {
+ float: right;
+ margin-left: 1em;
+}
+
+.gSelected {
+ background: #e8e8e8;
+}
+
+.gAvailable .gInstalledToolkit:hover {
+ cursor: pointer;
+ background: #eee;
+}
+
+.gAvailable .gButtonLink {
+ width: 96%;
+}
+
+.gSelected .gButtonLink {
+ display: none;
+}
+
+.gUnavailable {
+ border-color: #999;
+ opacity: 0.4;
+}
+
+.gOddRow {
+ background-color: #eee;
+}
+
+.gEvenRow {
+ background-color: #fff;
+}
+
+/** *******************************************************************
+ * 3) Page layout containers
+ **********************************************************************/
+
+.gView {
+ min-width: 974px !important;
+}
+
+#gHeader {
+ background-color: #e8e8e8;
+ border-bottom: 1px solid #ccc;
+ margin-bottom: 20px;
+ padding: 0 20px;
+}
+
+#gContent {
+ font-size: 1.1em;
+ width: 96%;
+}
+
+/** *******************************************************************
+ * 4) Content blocks in specific layout containers
+ *********************************************************************/
+
+#gHeader #gLogo {
+ float: left;
+ margin: -22px 10px 0 0;
+ display: block;
+ padding-left: 2px;
+ width: 105px; /* 107px - padding-left */
+ height: 48px;
+ background-image: url('../../default/images/logo.png');
+ color: #A5A5A5 ! important;
+}
+#gHeader #gLogo:hover {
+ color: #FF6600 ! important;
+ text-decoration: none;
+}
+
+#gHeader #gLoginMenu {
+ float: none;
+ margin: 0;
+ padding: 5px 0 10px 0;
+ text-align: right;
+}
+
+
+.rtl #gHeader #gLoginMenu {
+ text-align: left;
+}
+
+#gHeader #gSiteAdminMenu {
+ float: left;
+ font-size: 1.2em;
+}
+
+.rtl #gHeader #gSiteAdminMenu {
+ float: right;
+}
+
+#gHeader #gSiteAdminMenu ul {
+ margin-bottom: 0;
+}
+
+.gBlock .ui-dialog-titlebar {
+ margin: -1em -1em 0;
+}
+
+#gSidebar .gBlock h2 {
+ background: none;
+}
+
+#gPhotoStream {
+ background-color: #e8e8e8;
+}
+
+#gPhotoStream .gBlockContent ul {
+ border-right: 1px solid #e8e8e8;
+ height: 135px;
+ overflow: auto;
+ overflow: -moz-scrollbars-horizontal; /* for FF */
+ overflow-x: scroll; /* scroll horizontal */
+ overflow-y: hidden; /* Hide vertical*/
+}
+
+#gContent #gPhotoStream .gItem {
+ background-color: #fff;
+ border: 1px solid #e8e8e8;
+ border-right-color: #ccc;
+ border-bottom-color: #ccc;
+ float: left;
+ height: 90px;
+ overflow: hidden;
+ text-align: center;
+ width: 90px;
+}
+
+.rtl #gContent #gPhotoStream .gItem {
+ float: right;
+}
+
+#gSiteStatus {
+ margin-bottom: 0;
+}
+
+#gContent .gItem {
+ background-color: #fff;
+ border: 1px solid #e8e8e8;
+ border-right-color: #ccc;
+ border-bottom-color: #ccc;
+ height: 90px;
+ padding: 14px 8px;
+ text-align: center;
+ width: 90px;
+}
+
+#gAdminCommentsMenu {
+ margin: 1em 0;
+}
+
+#gAdminCommentsMenu a {
+ margin: 0;
+ padding: .2em .6em;
+}
+
+#gAdminGraphics .gAvailable .gBlock {
+ clear: none;
+ float: left;
+ height: 16em;
+ margin-right: 1em;
+ width: 30%;
+}
+
+.rtl #gAdminGraphics .gAvailable .gBlock {
+ float: right;
+ margin-left: 1em;
+ margin-right: 0em;
+}
+
+#gSiteTheme,
+#gAdminTheme {
+ float: left;
+ width: 48%;
+}
+
+.rtl #gSiteTheme,
+.rtl #gAdminTheme {
+ float: right;
+}
+
+#gSiteTheme {
+ margin-right: 1em;
+}
+
+#gUserAdminList {
+ margin-bottom: 1em;
+}
+#gUserAdminList td {
+ vertical-align: bottom;
+}
+
+#gUserAdminList .gDraggable:hover {
+ border: 1px dashed black;
+}
+
+#gUserAdminList .admin {
+ color: #55f;
+ font-weight: bold;
+}
+
+.gActions a,
+.gActions span {
+ margin-right: 3em;
+}
+
+li.gGroup {
+ float: left;
+ display: block;
+ width: 200px;
+ border: 1px solid gray;
+ padding: 0;
+ margin: 0 1em 1em 0;
+}
+
+.rtl li.gGroup {
+ float: right;
+}
+
+li.gGroup h4 {
+ background-color: #EEEEEE;
+ border-bottom: 1px dashed #CCCCCC;
+ padding: .5em 0 .5em .5em;
+}
+li.gGroup .gButtonLink {
+ padding: 0;
+}
+li.gGroup ul, li.gGroup div {
+ height: 180px;
+ margin: 1px;
+ overflow: auto;
+ padding-top: .2em;
+}
+li.gGroup div p {
+ color: gray;
+ text-align: center;
+ padding: 2em .5em 0 .5em
+}
+li.gGroup .gUser {
+ padding: .2em 0 0 .5em;
+}
+li.gGroup .gUser .gButtonLink {
+ vertical-align: middle;
+}
+
+li.gDefaultGroup h4, li.gDefaultGroup .gUser {
+ color: gray;
+}
+
+#gAdminAdvancedSettings tr.setting:hover {
+ background: #ffc;
+}
+
+/** *******************************************************************
+ * 5) Browser hacks
+ *********************************************************************/
+
+#gHeader:after,
+#gAdminCommentsMenu:after,
+#gGroupAdmin:after,
+.gSelected:after,
+.gAvailable .gBlock:after,
+#gModuleCreateForm ul li ul:after,
+#gDeveloperTools:after,
+#gPhotoStream:after {
+ clear: both;
+ content: ".";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+/** *******************************************************************
+ * 6) jQuery and jQuery UI
+ *********************************************************************/
+
+#gPanel {
+ display: none;
+ padding: 1em;
+}
+
+#gPanel legend {
+ display: none;
+}
+
+#gPanel fieldset {
+ border: none;
+}
+
+.ui-draggable {
+ cursor: move;
+}
+
+.gButtonSetVertical a {
+ width: 8em !important;
+}
+
+#gAdminDashboard .ui-dialog-titlebar,
+#gAdminDashboardSidebar .ui-dialog-titlebar {
+ padding: .2em .4em;
+}
+
+/**** Stuff that needs a home! ****/
+#gTagAdmin {
+ table-layout: fixed;
+}
+#gTagAdmin td {
+ border: 0;
+}
+#gTagAdmin ul {
+ padding-bottom: .3em;
+}
+#gTagAdmin li {
+ padding: .1em 0 .2em .3em;
+}
+#gTagAdmin .gColumn {
+ float: left;
+ width: 200px;
+}
+.rtl #gTagAdmin .gColumn {
+ float: right;
+}
+.gEditable {
+ padding: .1em .3em .2em .3em;
+}
+.gEditable:hover {
+ background-color: #ffc;
+ cursor: text;
+}
+#gRenameTagForm input {
+ padding: 0 .2em 0 .2em;
+ clear: none;
+ float: left;
+ margin: 0 .2em 0 0;
+}
+.rtl #gRenameTagForm input {
+ float: right;
+}
+#gRenameTagForm input[type="submit"] {
+ height: 25px;
+}
+#gRenameTagForm a, #gRenameTagForm span {
+ display: block;
+ float: left;
+ padding: .2em .2em 0 .1em;
+}
+.rtl #gRenameTagForm a, #gRenameTagForm span {
+ float: right;
+}
+#gProgress button {
+ float: right;
+ margin-top: 1em;
+}
+.rtl #gProgress button {
+ float: left;
+}
+
+#gTaskLogDialog h1 {
+ font-size: 1.1em;
+}
+
+.gTaskLog {
+ border: 1pt solid;
+ font-size: .9em;
+ height: 400px;
+ margin: .5em 0;
+ overflow: auto;
+ padding: .5em
+}
+
+
+/** *******************************************************************
+ * 7) Server Add
+ *********************************************************************/
+#gServerAddAdmin {
+ margin:auto;
+ text-align: left;
+}
+
+.rtl #gServerAddAdmin {
+ text-align: right;
+}
+
+#gServerAddAdmin form fieldset {
+ border: medium none;
+}
+
+#gServerAddAdmin legend {
+ display: none;
+}
+
+#gServerAddAdmin .gWarning {
+ background-color: #FFFF99;
+}
+
+#gAuthorizedPath {
+ margin: 0 !important;
+ padding: 0.3em 1.5em 0.3em 1em;
+}
+
+#gServerAdd Admin #path {
+ width: 80%;
+}
+
+.gRemoveDir:hover {
+ cursor: pointer;
+}
+
+#gLanguageSettingsForm .checklist li {
+ width: 150px;
+ overflow: hidden;
+}
+
diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css
index d408acf0..88631e81 100644
--- a/themes/admin_default/css/screen.css
+++ b/themes/admin_default/css/screen.css
@@ -1,313 +1,774 @@
/**
- * Gallery 3 Default Admin Theme Screen Styles
+ * Gallery 3 Default Theme Screen Styles
*
- * Extends themes/default/css/screen.css
+ * @requires YUI reset, font, grids CSS
*
- * 1) Basic HTML elements
- * 2) Reusable content blocks
- * 3) Page layout containers
- * 4) Content blocks in specific layout containers
- * 5) Browser hacks
- * 6) jQuery and jQuery UI
- * 7) Server Add
- * 8) Digibug Print Administration
+ * Sheet organization:
+ * 1) Basic HTML elements
+ * 2) Reusable classes
+ * 3) Reusable content blocks
+ * 4) Page layout containers
+ * 5) Content blocks in specific layout containers
+ * 6) Navigation and menus
+ * 7) Browser hacks
+ * 8) jQuery and jQuery UI
+ * 9) Right-to-left language styles
*/
/** *******************************************************************
* 1) Basic HTML elements
**********************************************************************/
-/** *******************************************************************
- * 2) Reusable content blocks
- **********************************************************************/
+body, html {
+ background-color: #ccc;
+ font-family: 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
+}
-.gBlock {
- background-color: #fff;
- border: 1px solid #ccc;
+p {
margin-bottom: 1em;
- padding: 1em;
}
-#gSidebar .gBlockContent {
- padding: 0;
+em {
+ font-style: oblique;
+}
+
+h1, h2, h3, h4, h5, strong, th {
+ font-weight: bold;
+}
+
+h1 {
+ font-size: 1.7em;
+}
+
+#gSearchResults h1 {
+ margin-bottom: 1em;
+}
+
+#gProgress h1 {
+ font-size: 1.1em;
+}
+
+h2 {
+ font-size: 1.4em;
+}
+
+#gSidebar .gBlock h2 {
+ font-size: 1.2em;
+}
+
+#gSidebar .gBlock li {
+ margin-bottom: .6em;
}
-.gSelected img,
-.gAvailable .gBlock img {
+h3 {
+ font-size: 1.2em;
+}
+
+/* Links ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+a,
+.gMenu a,
+#gDialog a,
+.gButtonLink,
+.gButtonLink:hover,
+.gButtonLink:active {
+ color: #5382BF !important;
+ text-decoration: none;
+ -moz-outline-style: none;
+}
+
+a:hover,
+#gDialog a:hover {
+ text-decoration: underline;
+}
+
+.gMenu a:hover {
+ text-decoration: none;
+}
+
+#gDialog .gCancel {
+ clear: none;
float: left;
- margin-right: 1em;
+ margin: .3em 1em;
}
-.rtl .gSelected img,
-.rtl .gAvailable .gBlock img {
+#gForgotPasswordLink {
float: right;
- margin-left: 1em;
+ font-size: .9em;
}
-.gSelected {
- background: #e8e8e8;
+#gDialog .gCancel {
+ float: left;
}
-.gAvailable .gInstalledToolkit:hover {
- cursor: pointer;
- background: #eee;
+/* Tables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+table {
+ width: 100%;
+}
+
+#gContent table {
+ margin: 1em 0;
+}
+
+caption,
+th {
+ text-align: left;
+}
+
+th,
+td {
+ border: none;
+ border-bottom: 1px solid #ccc;
+ padding: .5em;
+ vertical-align: top;
+}
+
+/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+fieldset {
+ border: 1px solid #ccc;
+ padding-bottom: .8em;
+}
+
+#gHeader fieldset,
+#gSidebar fieldset,
+.gShortForm fieldset {
+ border: none;
}
-.gAvailable .gButtonLink {
- width: 96%;
+legend {
+ font-weight: bold;
+ margin-left: 1em;
}
-.gSelected .gButtonLink {
+#gHeader legend,
+#gSidebar legend,
+#gContent #gSearchForm legend,
+input[type="hidden"],
+.gShortForm label {
display: none;
}
-.gUnavailable {
- border-color: #999;
- opacity: 0.4;
+label {
+ cursor: help;
}
-.gOddRow {
- background-color: #eee;
+input[type="text"],
+input[type="password"] {
+ width: 50%;
}
-.gEvenRow {
- background-color: #fff;
+input[type="text"],
+input[type="password"],
+textarea {
+ border: 1px solid #e8e8e8;
+ border-top-color: #ccc;
+ border-left-color: #ccc;
+ color: #333;
}
-/** *******************************************************************
- * 3) Page layout containers
- **********************************************************************/
+textarea {
+ width: 100%;
+ height: 12em;
+}
-.gView {
- min-width: 974px !important;
+input:focus,
+textarea:focus,
+option:focus {
+ background-color: #ffc;
+ color: #000;
}
-#gHeader {
- background-color: #e8e8e8;
- border-bottom: 1px solid #ccc;
- margin-bottom: 20px;
- padding: 0 20px;
+/* Form layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+form li {
+ margin: 0 !important;
+ padding: .3em 1.5em .3em 1em;
}
-#gContent {
- font-size: 1.1em;
- width: 96%;
+form ul ul {
+ clear: both;
+}
+
+form ul ul li {
+ float: left;
+}
+
+input,
+select,
+textarea {
+ display: block;
+ clear: both;
+ padding: .2em;
+}
+
+input[type="submit"],
+input[type="reset"] {
+ display: inline;
+ clear: none;
+ float: left;
+}
+
+/* Form validation ~~~~~~~~~~~~~~~~~~~~~~~ */
+
+.gValidationRule {
+ font-size: 80%;
+ margin-top: .5em;
+}
+
+form.gError input[type="text"],
+li.gError input[type="text"],
+form.gError input[type="password"],
+li.gError input[type="password"],
+form.gError input[type="checkbox"],
+li.gError input[type="checkbox"],
+form.gError input[type="radio"],
+li.gError input[type="radio"],
+form.gError textarea,
+li.gError textarea,
+form.gError select,
+li.gError select {
+ border: 2px solid red;
}
/** *******************************************************************
- * 4) Content blocks in specific layout containers
+ * 2) Reusable generic classes
*********************************************************************/
-#gHeader #gLogo {
+.inactive, .understate {
+ color: #ccc;
+ font-weight: normal;
+}
+
+.left {
float: left;
- margin: -22px 10px 0 0;
- display: block;
- padding-left: 2px;
- width: 105px; /* 107px - padding-left */
- height: 48px;
- background-image: url('../../default/images/logo.png');
- color: #A5A5A5 ! important;
-}
-#gHeader #gLogo:hover {
- color: #FF6600 ! important;
- text-decoration: none;
+ margin: 1em 1em 1em 0;
}
-#gHeader #gLoginMenu {
- float: none;
- margin: 0;
- padding: 5px 0 10px 0;
+.right {
+ float: right;
+ margin: 1em 0 1em 1em;
+}
+
+.txtright {
text-align: right;
}
+/** *******************************************************************
+ * 3) Reusable content blocks
+ *********************************************************************/
+
+.gBlock {
+ clear: both;
+ margin-bottom: 2.5em;
+}
+
+.gBlock h2 {
+ background-color: #e8e8e8;
+ padding: .3em .8em;
+}
-.rtl #gHeader #gLoginMenu {
- text-align: left;
+.gBlockContent {
+ margin-top: 1em;
}
-#gHeader #gSiteAdminMenu {
- float: left;
- font-size: 1.2em;
+/* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gMessage {
+ width: 99%;
}
-.rtl #gHeader #gSiteAdminMenu {
- float: right;
+#gAdminAkismet .gSuccess,
+#gSiteStatus li,
+#gMessage li {
+ border: 1px solid #ccc;
+ margin-bottom: .4em;
}
-#gHeader #gSiteAdminMenu ul {
+#gSiteStatus li {
margin-bottom: 0;
+ border: none;
+ border-bottom: 1px solid #ccc;
}
-.gBlock .ui-dialog-titlebar {
- margin: -1em -1em 0;
+#gSiteStatus .gError,
+#gMessage .gError,
+form p.gError,
+#gSiteStatus .gInfo,
+#gMessage .gInfo,
+#gSiteStatus .gSuccess,
+#gMessage .gSuccess,
+#gSiteStatus .gWarning,
+#gMessage .gWarning {
+ background-position: .4em 50%;
+ background-repeat: no-repeat;
+ padding: .4em .5em .4em 30px;
}
-#gSidebar .gBlock h2 {
- background: none;
+.gError {
+ background-color: #fcc;
+}
+
+form .gError {
+ color: #f00;
+}
+
+#gSiteStatus .gError,
+#gMessage .gError,
+form p.gError {
+ background-image: url('../images/ico-error.png');
}
-#gPhotoStream {
+.gInfo {
background-color: #e8e8e8;
}
-#gPhotoStream .gBlockContent ul {
- border-right: 1px solid #e8e8e8;
- height: 135px;
- overflow: auto;
- overflow: -moz-scrollbars-horizontal; /* for FF */
- overflow-x: scroll; /* scroll horizontal */
- overflow-y: hidden; /* Hide vertical*/
+#gSiteStatus .gInfo,
+#gMessage .gInfo {
+ background-image: url('../images/ico-info.png');
+}
+
+.gSuccess {
+ background-color: #96EF95;
+}
+
+#gSiteStatus .gSuccess,
+#gMessage .gSuccess {
+ background-image: url('../images/ico-success.png');
+}
+
+.gWarning {
+ background-color: #ff9;
+}
+
+#gSiteStatus .gWarning,
+#gMessage .gWarning {
+ background-image: url('../images/ico-warning.png');
}
-#gContent #gPhotoStream .gItem {
+form .gError,
+.gPager .gInfo {
background-color: #fff;
- border: 1px solid #e8e8e8;
- border-right-color: #ccc;
- border-bottom-color: #ccc;
+}
+
+#gAdminMaintenance .gError,
+#gAdminMaintenance .gInfo,
+#gAdminMaintenance .gWarning,
+#gAdminMaintenance .gSuccess {
+ background-image: none;
+}
+
+/* Inline layout (forms, lists) ~~~~~~~~~~ */
+
+.gShortForm li {
float: left;
- height: 90px;
- overflow: hidden;
- text-align: center;
- width: 90px;
+ padding: .4em 0;
}
-.rtl #gContent #gPhotoStream .gItem {
- float: right;
+.gShortForm input[type="text"] {
+ color: #666;
+ padding: .3em .6em;
+ width: 11em;
}
-#gSiteStatus {
- margin-bottom: 0;
+/*** ******************************************************************
+ * 4) Page layout containers
+ *********************************************************************/
+
+/* View container ~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+.gView {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ border-bottom: none;
+}
+
+/* Layout containers ~~~~~~~~~~~~~~~~~~~~~ */
+
+#gHeader {
+ background-color: #e8e8e8;
+ border-bottom: 1px solid #fff;
+ font-size: .8em;
+ margin-bottom: 1em;
+ padding: 1em 20px 0 20px;
}
-#gContent .gItem {
+#gContent {
+ font-size: 1.2em;
+ padding-left: 20px;
+ width: 696px;
+}
+
+#gSidebar {
background-color: #fff;
+ font-size: .9em;
+ padding: 0 20px;
+ width: 220px;
+}
+
+#gFooter {
+ background-color: #e8e8e8;
+ border-top: 1px solid #ccc;
+ font-size: .8em;
+ margin-top: 20px;
+ padding: 10px 20px;
+}
+
+/** *******************************************************************
+ * 5) Content blocks in specific layout containers
+ *********************************************************************/
+
+/* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gHeader #gLogo img {
+ float: left;
+ margin: -4px 10px 0 0;
+}
+
+#gHeader #gQuickSearchForm {
+ clear: right;
+ float: right;
+ margin: 1em 0;
+}
+
+#gHeader #gQuickSearchForm input[type='text'] {
+ width: 17em;
+}
+
+#gContent .gBlock h2 {
+ background-color: transparent;
+ padding-left: 0;
+}
+
+#gSidebar .gBlockContent {
+ padding-left: 1em;
+}
+
+/* Album content ~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gContent #gAlbumGrid {
+ margin: 1em 0;
+}
+
+#gContent #gAlbumGrid .gItem {
border: 1px solid #e8e8e8;
border-right-color: #ccc;
border-bottom-color: #ccc;
- height: 90px;
- padding: 14px 8px;
+ float: left;
+ font-size: .7em;
+ height: 240px;
+ overflow: hidden;
+ padding: 15px 8px 30px 8px;
+ position: relative;
text-align: center;
- width: 90px;
+ width: 213px;
+}
+
+#gContent #gAlbumGrid .gItem h2 {
+ margin: 5px 0;
}
-#gAdminCommentsMenu {
+#gContent #gAlbumGrid .gAlbum {
+ background-color: #e8e8e8;
+}
+
+#gContent #gAlbumGrid .gAlbum h2 span {
+ background: transparent url('../images/ico-album.png') no-repeat top left !important;
+ display: inline-block;
+ height: 16px;
+ margin-right: 5px;
+ width: 16px;
+}
+
+/* Individual photo content ~~~~~~~~~~~~~~ */
+
+#gContent #gItem {
+ width: 99%;
+}
+
+#gContent #gPhoto {
+ position: relative;
+}
+
+#gContent #gItem .gFullSizeLink img {
+ display: block;
+ margin: 1em auto !important;
+}
+
+#gContent #gComments {
+ margin-top: 2em;
+}
+
+#gContent #gComments ul li {
margin: 1em 0;
}
-#gAdminCommentsMenu a {
- margin: 0;
- padding: .2em .6em;
+#gContent #gComments .gAuthor {
+ border-bottom: 1px solid #ccc;
+ color: #999;
+ height: 32px;
+ line-height: 32px;
}
-#gAdminGraphics .gAvailable .gBlock {
- clear: none;
- float: left;
- height: 16em;
- margin-right: 1em;
- width: 30%;
+#gContent #gComments ul li div {
+ padding: 0 8px 8px 43px;
+}
+
+#gContent #gComments ul li #gRecaptcha {
+ padding: 0;
+}
+
+#gContent #gComments ul li #gRecaptcha div {
+ padding: 0;
+}
+
+#gContent #gComments .gAvatar {
+ height: 32px;
+ margin-right: .4em;
+ width: 32px;
+}
+
+#gContent #gAddCommentForm {
+ margin-top: 2em;
+}
+
+/* Footer content ~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gHeader #gLoginMenu li,
+#gFooter #gCredits li {
+ display: inline;
+}
+
+#gHeader #gLoginMenu li {
+ padding-left: 1.2em;
+}
+
+#gFooter #gCredits li {
+ padding-right: 1.2em;
+}
+
+#gContent #gSearchResults {
+ margin-top: 1em;
+ padding-top: 1em;
+}
+
+/** *******************************************************************
+ * 5) Navigation and menus
+ *********************************************************************/
+
+#gSiteMenu,
+.gBreadcrumbs,
+#gTagCloud ul {
+ font-size: 1.2em;
}
-.rtl #gAdminGraphics .gAvailable .gBlock {
+/* Login menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gHeader #gLoginMenu {
+ color: #999;
float: right;
- margin-left: 1em;
- margin-right: 0em;
}
-#gSiteTheme,
-#gAdminTheme {
+/* Site Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gSiteMenu {
float: left;
- width: 48%;
+ margin-top: 20px;
+ padding: 0 20px 0 0;
}
-.rtl #gSiteTheme,
-.rtl #gAdminTheme {
- float: right;
+#gSiteMenu ul {
+ margin-bottom: 0;
+}
+
+/* Thumb Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gContent .gThumbMenu {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ width: 100%;
}
-#gSiteTheme {
- margin-right: 1em;
+#gContent .gThumbMenu li {
+ border-left: none;
+ border-right: none;
+ border-bottom: none;
}
-#gUserAdminList {
+#gContent .gThumbMenu li li {
+ padding: .3em;
+}
+
+#gContent .gThumbMenu a:hover {
+ text-decoration: none;
+}
+
+/* View Menu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gViewMenu {
margin-bottom: 1em;
}
-#gUserAdminList td {
- vertical-align: bottom;
+
+#gViewMenu a {
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
+ height: 28px !important;
+ width: 43px !important;
}
-#gUserAdminList .gDraggable:hover {
- border: 1px dashed black;
+#gViewMenu #gHybridLink {
+ background-image: url('../images/ico-view-hybrid.png');
}
-#gUserAdminList .admin {
- color: #55f;
- font-weight: bold;
+#gViewMenu #gSlideshowLink {
+ background-image: url('../images/ico-view-slideshow.png');
+}
+
+#gViewMenu .gFullSizeLink {
+ background-image: url('../images/ico-view-fullsize.png');
}
-.gActions a,
-.gActions span {
- margin-right: 3em;
+#gViewMenu #gCommentsLink {
+ background-image: url('../images/ico-view-comments.png');
+}
+
+#gViewMenu #gDigibugLink {
+ background-image: url('../images/ico-print.png');
+}
+
+/* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+.gBreadcrumbs {
+ background-color: #fff;
+ border-top: 1px solid #ccc;
+ clear: both;
+ margin: 0 -20px;
+ padding-left: 20px;
}
-li.gGroup {
+.gBreadcrumbs li {
+ background: transparent url('../images/ico-separator.gif') no-repeat scroll left center;
float: left;
+ padding: 10px 6px 10px 16px !important;
+}
+
+.gBreadcrumbs li.root {
+ background: transparent;
+}
+
+.gBreadcrumbs li a,
+.gBreadcrumbs li span {
display: block;
- width: 200px;
- border: 1px solid gray;
- padding: 0;
- margin: 0 1em 1em 0;
}
-.rtl li.gGroup {
- float: right;
+.gBreadcrumbs li.active,
+.gBreadcrumbs li.active span {
+ font-weight: bold;
}
-li.gGroup h4 {
- background-color: #EEEEEE;
- border-bottom: 1px dashed #CCCCCC;
- padding: .5em 0 .5em .5em;
+#gAddPhotos .gBreadcrumbs {
+ font-size: .9em;
}
-li.gGroup .gButtonLink {
- padding: 0;
+
+/* Tags and cloud ~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gTagCloud ul {
+ text-align: justify;
}
-li.gGroup ul, li.gGroup div {
- height: 180px;
- margin: 1px;
- overflow: auto;
- padding-top: .2em;
+
+#gTagCloud ul li {
+ display: inline;
+ line-height: 1.5em;
+ text-align: justify;
}
-li.gGroup div p {
- color: gray;
- text-align: center;
- padding: 2em .5em 0 .5em
+
+#gTagCloud ul li a {
+ text-decoration: none;
}
-li.gGroup .gUser {
- padding: .2em 0 0 .5em;
+
+#gTagCloud ul li span {
+ display: none;
}
-li.gGroup .gUser .gButtonLink {
- vertical-align: middle;
+
+#gTagCloud ul li.size1 a {
+ color: #9cf;
+ font-size: 80%;
+ font-weight: 100;
+}
+
+#gTagCloud ul li.size2 a {
+ color: #69f;
+ font-size: 90%;
+ font-weight: 300;
+}
+
+#gTagCloud ul li.size3 a {
+ color: #69c;
+ font-size: 100%;
+ font-weight: 500;
+}
+
+#gTagCloud ul li.size4 a {
+ color: #369;
+ font-size: 110%;
+ font-weight: 700;
}
-li.gDefaultGroup h4, li.gDefaultGroup .gUser {
- color: gray;
+#gTagCloud ul li.size5 a {
+ color: #0e2b52;
+ font-size: 120%;
+ font-weight: 900;
}
-#gAdminAdvancedSettings tr.setting:hover {
- background: #ffc;
+#gTagCloud ul li.size6 a {
+ color: #0e2b52;
+ font-size: 130%;
+ font-weight: 900;
+}
+
+#gTagCloud ul li.size7 a {
+ color: #0e2b52;
+ font-size: 140%;
+ font-weight: 900;
+}
+
+#gTagCloud ul li a:hover {
+ color: #f30;
+ text-decoration: underline;
+}
+
+/* Pagination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+.gPager {
+ clear: both;
+ margin: 0;
+ padding: 5px 0 !important;
+ width: 100%;
+}
+
+.gPager li {
+ float: left;
+ margin: 0;
+ width: 30%;
+}
+
+.gPager .gInfo {
+ text-align: center;
+ width: 40%;
}
/** *******************************************************************
- * 5) Browser hacks
+ * 6) Browser hacks
*********************************************************************/
+#gSiteMenu:after,
#gHeader:after,
-#gAdminCommentsMenu:after,
-#gGroupAdmin:after,
-.gSelected:after,
-.gAvailable .gBlock:after,
-#gModuleCreateForm ul li ul:after,
-#gDeveloperTools:after,
-#gPhotoStream:after {
+.gBreadcrumbs:after,
+#gAlbumGrid:after,
+.gPager:after,
+#gViewMenu:after {
clear: both;
content: ".";
display: block;
@@ -316,143 +777,315 @@ li.gDefaultGroup h4, li.gDefaultGroup .gUser {
}
/** *******************************************************************
- * 6) jQuery and jQuery UI
+ * 7) jQuery and jQuery UI
*********************************************************************/
-#gPanel {
- display: none;
- padding: 1em;
+/* Superfish menu overrides ~~~~~~~~~~~~~~ */
+
+.sf-menu li li, .sf-menu li li ul li {
+ background-color: #bdd2ff;
}
-#gPanel legend {
- display: none;
+.sf-menu li:hover {
+ background-color: #dfe9ff;
}
-#gPanel fieldset {
- border: none;
+/* Ajax loading indicator ~~~~~~~~~~~~~~~~ */
+
+.gLoadingLarge {
+ background: #e8e8e8 url('../images/loading-lg.gif') no-repeat center center;
+ font-size: 0;
+}
+
+.gDialogLoadingLarge {
+ background: url('../images/loading-lg.gif') no-repeat center center !important;
+ font-size: 0;
}
-.ui-draggable {
+.gLoadingSmall {
+ background: #e8e8e8 url('../images/loading-sm.gif') no-repeat center center;
+ font-size: 0;
+}
+
+.gDraggable {
cursor: move;
}
-.gButtonSetVertical a {
- width: 8em !important;
+.gDropTarget {
+ background-color: #cfdeff;
+ border: 1px dotted #999;
+ height: 100px;
+ margin: 1em 0;
+}
+
+/* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */
+
+.ui-widget-overlay {
+ background: #000;
+ opacity: .7;
+ filter: Alpha(Opacity=70);
}
-#gAdminDashboard .ui-dialog-titlebar,
-#gAdminDashboardSidebar .ui-dialog-titlebar {
- padding: .2em .4em;
+#gDialog {
+ text-align: left;
}
-/**** Stuff that needs a home! ****/
-#gTagAdmin {
- table-layout: fixed;
+#gDialog li {
+ padding-left: 0;
}
-#gTagAdmin td {
- border: 0;
+
+#gDialog form input[type="text"],
+#gDialog form input[type="password"] {
+ width: 100%;
}
-#gTagAdmin ul {
- padding-bottom: .3em;
+
+#gDialog #gLoginForm,
+#gDialog #gAddUserForm,
+#gDialog #gAddGroupForm {
+ margin: 0 auto;
+ width: 270px;
}
-#gTagAdmin li {
- padding: .1em 0 .2em .3em;
+
+#gDialog fieldset {
+ border: none;
}
-#gTagAdmin .gColumn {
- float: left;
- width: 200px;
+
+#gDialog legend {
+ display: none;
}
-.rtl #gTagAdmin .gColumn {
- float: right;
+
+/* jQuery UI ThemeRoller buttons */
+
+.gButtonLink {
+ display: inline-block;
+ margin: 0 4px 0 0;
+ padding: .2em .4em;
+ outline: 0;
}
-.gEditable {
- padding: .1em .3em .2em .3em;
+
+.gButtonSet {
+ padding-left: 1px;
}
-.gEditable:hover {
- background-color: #ffc;
- cursor: text;
+
+.gButtonSet li {
+ float: left;
}
-#gRenameTagForm input {
- padding: 0 .2em 0 .2em;
- clear: none;
+
+.gButtonSet .gButtonLink {
+ margin: 0;
+}
+
+.ui-icon-left .ui-icon {
float: left;
- margin: 0 .2em 0 0;
+ margin-right: .2em;
}
-.rtl #gRenameTagForm input {
+
+.ui-icon-right .ui-icon {
float: right;
+ margin-left: .2em;
}
-#gRenameTagForm input[type="submit"] {
- height: 25px;
+
+.ui-icon-rotate-ccw {
+ background-position: -192px -64px;
}
-#gRenameTagForm a, #gRenameTagForm span {
- display: block;
- float: left;
- padding: .2em .2em 0 .1em;
+
+.ui-icon-rotate-cw {
+ background-position: -208px -64px;
}
-.rtl #gRenameTagForm a, #gRenameTagForm span {
- float: right;
+
+/* STUFF THAT NEEDS A HOME */
+
+#gMove ul {
+ padding-left: 1em;
}
-#gProgress button {
- float: right;
- margin-top: 1em;
+
+#gMove .selected {
+ background: #999;
}
-.rtl #gProgress button {
+
+/* Server Add */
+
+#gServerAdd button {
float: left;
+ margin-bottom: .5em;
}
-#gTaskLogDialog h1 {
- font-size: 1.1em;
+#gServerAddTree {
+ cursor: pointer;
+ padding-left: 4px;
}
-.gTaskLog {
- border: 1pt solid;
- font-size: .9em;
- height: 400px;
- margin: .5em 0;
+#gServerAddTree li {
+ padding: 0;
+ float: none;
+}
+
+#gServerAddTree span.selected {
+ background: #ddd;
+}
+
+#gServerAddTree {
+ border: 1px solid #ccc;
+ height: 25em;
overflow: auto;
- padding: .5em
+ margin-bottom: .5em;
+ padding-top: .5em;
+ padding-bottom: .5em;
}
+#gServerAdd ul ul li {
+ padding-left: 1.2em;
+}
-/** *******************************************************************
- * 7) Server Add
- *********************************************************************/
-#gServerAddAdmin {
- margin:auto;
- text-align: left;
+#gServerAdd .gBreadcrumbs {
+ font-size: 1em;
+ padding: 0;
+ margin: 0;
+ border-top-width: 0;
}
-.rtl #gServerAddAdmin {
- text-align: right;
+#gServerAdd p {
+ margin: 0;
}
-#gServerAddAdmin form fieldset {
- border: medium none;
+#gServerAdd .gBreadcrumbs li {
+ padding: 10px 6px 10px 16px;
}
-#gServerAddAdmin legend {
- display: none;
+/* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+#gPermissions .gDenied,
+#gPermissions .gAllowed {
+ text-align: center;
+ vertical-align: middle;
+}
+#gPermissions .gDenied {
+ background-color: #fcc;
}
+#gPermissions .gAllowed {
+ background-color: #cfc;
+}
+
+/*************** STUFF THAT NEEDS A HOME ****************/
-#gServerAddAdmin .gWarning {
- background-color: #FFFF99;
+.gProgressBar {
+ height: 1em;
+ width: 100%;
+ margin-top: .5em;
+ display: inline-block;
}
-#gAuthorizedPath {
- margin: 0 !important;
- padding: 0.3em 1.5em 0.3em 1em;
+#gAddPhotos p {
+ margin: 0;
+ padding: 0;
}
-#gServerAdd Admin #path {
- width: 80%;
+#gAddPhotosCanvas {
+ height: 325px;
+ width: 450px;
+ overflow: auto;
}
-.gRemoveDir:hover {
- cursor: pointer;
+#gAddPhotosQueue .progressbar {
+ height: 4px;
}
-#gLanguageSettingsForm .checklist li {
- width: 150px;
- overflow: hidden;
+#gAddPhotosQueue .title {
+ font-size: 1.25em;
+}
+
+#gAddPhotosQueue .status {
+ font-size: .75em;
+}
+
+#gAddPhotosQueue .box {
+ margin-bottom: 8px;
+ padding: 4px;
+}
+
+#gAddPhotosQueue .pending {
+ background-color: #e8e8e8;
+ border: 1px solid #d7d7d7;
+}
+
+#gAddPhotosQueue .error {
+ background-color: #fcc;
+ border: 1px solid #ebb;
+}
+
+#gAddPhotosQueue .uploading {
+ background-color: #ff9;
+ border: 1px solid #ee8;
+}
+
+#gAddPhotosQueue .complete {
+ background-color: #cfc;
+ border: 1px solid #beb;
+}
+
+#gAdminG2ImportNotes {
+ padding-bottom: 20px;
+}
+
+#gAdminG2ImportDetails {
+ padding-top: 20px;
+}
+
+#gAdminG2ImportDetails .gWarning {
+ margin-top: 4px;
+}
+
+#gAdminG2ImportDetails .gInfo {
+ padding: 2px;
+ border: 1px solid #999;
+ margin-bottom: 10px;
+}
+
+#gAdminG2ImportNotes p,
+#gAdminG2ImportDetails .gInfo p {
+ padding: 0;
+ margin: 0;
+}
+
+#gAdminG2ImportNotes ul li,
+#gAdminG2Import .gInfo ul li {
+ padding-left: 0;
+ margin-left: 20px;
+ list-style-type: disc;
+}
+
+/* Right to left styles ~~~~~~~~~~~~~~~~~~~~ */
+
+.rtl {
+ direction: rtl;
+}
+
+.rtl caption,
+.rtl th,
+.rtl #gDialog {
+ text-align: right;
+}
+
+.rtl #gHeader #gQuickSearchForm,
+.rtl #gForgotPasswordLink,
+.rtl #gHeader #gLoginMenu,
+.rtl .ui-icon-right .ui-icon {
+ clear: left;
+ float: left;
+}
+
+.rtl #gDialog .gCancel,
+.rtl form ul ul li,
+.rtl input[type="submit"],
+.rtl input[type="reset"],
+.rtl .gShortForm li,
+.rtl #gHeader #gLogo img,
+.rtl #gContent #gAlbumGrid .gItem,
+.rtl #gSiteMenu,
+.rtl .gBreadcrumbs li,
+.rtl .gPager li,
+.rtl .gButtonSet li,
+.rtl .ui-icon-left .ui-icon {
+ float: right;
}
diff --git a/themes/admin_default/images/ico-album.png b/themes/admin_default/images/ico-album.png
new file mode 100644
index 00000000..affa1b84
--- /dev/null
+++ b/themes/admin_default/images/ico-album.png
Binary files differ
diff --git a/themes/admin_default/images/ico-error.png b/themes/admin_default/images/ico-error.png
new file mode 100644
index 00000000..c37bd062
--- /dev/null
+++ b/themes/admin_default/images/ico-error.png
Binary files differ
diff --git a/themes/admin_default/images/ico-info.png b/themes/admin_default/images/ico-info.png
new file mode 100644
index 00000000..12cd1aef
--- /dev/null
+++ b/themes/admin_default/images/ico-info.png
Binary files differ
diff --git a/themes/admin_default/images/ico-print.png b/themes/admin_default/images/ico-print.png
new file mode 100644
index 00000000..b82a8e1e
--- /dev/null
+++ b/themes/admin_default/images/ico-print.png
Binary files differ
diff --git a/themes/admin_default/images/ico-separator.gif b/themes/admin_default/images/ico-separator.gif
new file mode 100644
index 00000000..3de2d0d3
--- /dev/null
+++ b/themes/admin_default/images/ico-separator.gif
Binary files differ
diff --git a/themes/admin_default/images/ico-success.png b/themes/admin_default/images/ico-success.png
new file mode 100644
index 00000000..a9925a06
--- /dev/null
+++ b/themes/admin_default/images/ico-success.png
Binary files differ
diff --git a/themes/admin_default/images/ico-view-comments.png b/themes/admin_default/images/ico-view-comments.png
new file mode 100644
index 00000000..e5d3630f
--- /dev/null
+++ b/themes/admin_default/images/ico-view-comments.png
Binary files differ
diff --git a/themes/admin_default/images/ico-view-fullsize.png b/themes/admin_default/images/ico-view-fullsize.png
new file mode 100644
index 00000000..0be23e9b
--- /dev/null
+++ b/themes/admin_default/images/ico-view-fullsize.png
Binary files differ
diff --git a/themes/admin_default/images/ico-view-hybrid.png b/themes/admin_default/images/ico-view-hybrid.png
new file mode 100644
index 00000000..ee902e55
--- /dev/null
+++ b/themes/admin_default/images/ico-view-hybrid.png
Binary files differ
diff --git a/themes/admin_default/images/ico-view-slideshow.png b/themes/admin_default/images/ico-view-slideshow.png
new file mode 100644
index 00000000..82f61f63
--- /dev/null
+++ b/themes/admin_default/images/ico-view-slideshow.png
Binary files differ
diff --git a/themes/admin_default/images/ico-warning.png b/themes/admin_default/images/ico-warning.png
new file mode 100644
index 00000000..628cf2da
--- /dev/null
+++ b/themes/admin_default/images/ico-warning.png
Binary files differ
diff --git a/themes/admin_default/images/loading-lg.gif b/themes/admin_default/images/loading-lg.gif
new file mode 100644
index 00000000..cc70a7a8
--- /dev/null
+++ b/themes/admin_default/images/loading-lg.gif
Binary files differ
diff --git a/themes/admin_default/images/loading-sm.gif b/themes/admin_default/images/loading-sm.gif
new file mode 100644
index 00000000..d0bce154
--- /dev/null
+++ b/themes/admin_default/images/loading-sm.gif
Binary files differ
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php
index b0ddb6c5..d27f9260 100644
--- a/themes/admin_default/views/admin.html.php
+++ b/themes/admin_default/views/admin.html.php
@@ -7,28 +7,28 @@
<title><?= t("Admin Dashboard") ?></title>
<link rel="shortcut icon" href="<?= url::file("themes/default/images/favicon.ico") ?>" type="image/x-icon" />
- <?= $theme->css("lib/yui/reset-fonts-grids.css") ?>
- <?= $theme->css("lib/themeroller/ui.base.css") ?>
- <?= $theme->css("lib/superfish/css/superfish.css") ?>
- <?= $theme->css("themes/default/css/screen.css") ?>
- <?= $theme->theme_css("css/screen.css") ?>
+ <?= $theme->css("yui/reset-fonts-grids.css") ?>
+ <?= $theme->css("themeroller/ui.base.css") ?>
+ <?= $theme->css("superfish/css/superfish.css") ?>
+ <?= $theme->css("screen.css") ?>
+ <?= $theme->css("admin_screen.css") ?>
<!--[if lt IE 8]>
- <link rel="stylesheet" type="text/css" href="<?= $theme->theme_url("css/fix-ie.css") ?>"
+ <link rel="stylesheet" type="text/css" href="<?= $theme->url("fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
- <?= $theme->script("lib/jquery.js") ?>
- <?= $theme->script("lib/jquery.form.js") ?>
- <?= $theme->script("lib/jquery-ui.js") ?>
- <?= $theme->script("lib/gallery.common.js") ?>
+ <?= $theme->script("jquery.js") ?>
+ <?= $theme->script("jquery.form.js") ?>
+ <?= $theme->script("jquery-ui.js") ?>
+ <?= $theme->script("gallery.common.js") ?>
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
<script type="text/javascript">
var MSG_CANCEL = "<?= t('Cancel') ?>";
</script>
- <?= $theme->script("lib/gallery.dialog.js") ?>
- <?= $theme->script("lib/superfish/js/superfish.js") ?>
- <?= $theme->theme_script("js/jquery.dropshadow.js") ?>
- <?= $theme->theme_script("js/ui.init.js") ?>
+ <?= $theme->script("gallery.dialog.js") ?>
+ <?= $theme->script("superfish/js/superfish.js") ?>
+ <?= $theme->script("jquery.dropshadow.js") ?>
+ <?= $theme->script("ui.init.js") ?>
<?= $theme->admin_head() ?>
</head>
diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php
index 5428d9fd..c903edf5 100644
--- a/themes/default/views/header.html.php
+++ b/themes/default/views/header.html.php
@@ -4,7 +4,7 @@
<?= $header_text ?>
<? else: ?>
<a id="gLogo" href="<?= url::site("albums/1") ?>" title="<?= t("go back to the Gallery home") ?>">
- <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site") ?>" src="<?= $theme->theme_url("images/logo.png") ?>" />
+ <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site") ?>" src="<?= $theme->url("images/logo.png") ?>" />
</a>
<? endif ?>
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php
index 181a2c46..66282bae 100644
--- a/themes/default/views/page.html.php
+++ b/themes/default/views/page.html.php
@@ -23,13 +23,13 @@
<? endif ?>
<? endif ?>
</title>
- <link rel="shortcut icon" href="<?= $theme->theme_url("images/favicon.ico") ?>" type="image/x-icon" />
- <?= $theme->css("lib/yui/reset-fonts-grids.css") ?>
- <?= $theme->css("lib/superfish/css/superfish.css") ?>
- <?= $theme->css("lib/themeroller/ui.base.css") ?>
- <?= $theme->theme_css("css/screen.css") ?>
+ <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" />
+ <?= $theme->css("yui/reset-fonts-grids.css") ?>
+ <?= $theme->css("superfish/css/superfish.css") ?>
+ <?= $theme->css("themeroller/ui.base.css") ?>
+ <?= $theme->css("screen.css") ?>
<!--[if lt IE 8]>
- <link rel="stylesheet" type="text/css" href="<?= $theme->theme_url("css/fix-ie.css") ?>"
+ <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
<? if ($theme->page_type == 'album'): ?>
@@ -45,26 +45,26 @@
</style>
<? endif ?>
<? endif ?>
- <?= $theme->script("lib/jquery.js") ?>
- <?= $theme->script("lib/jquery.form.js") ?>
- <?= $theme->script("lib/jquery-ui.js") ?>
- <?= $theme->script("lib/gallery.common.js") ?>
+ <?= $theme->script("jquery.js") ?>
+ <?= $theme->script("jquery.form.js") ?>
+ <?= $theme->script("jquery-ui.js") ?>
+ <?= $theme->script("gallery.common.js") ?>
<? /* MSG_CANCEL is required by gallery.dialog.js */ ?>
<script type="text/javascript">
var MSG_CANCEL = "<?= t('Cancel') ?>";
</script>
- <?= $theme->script("lib/gallery.dialog.js") ?>
- <?= $theme->script("lib/gallery.form.js") ?>
- <?= $theme->script("lib/superfish/js/superfish.js") ?>
- <?= $theme->script("lib/jquery.localscroll.js") ?>
- <?= $theme->theme_script("js/ui.init.js") ?>
+ <?= $theme->script("gallery.dialog.js") ?>
+ <?= $theme->script("gallery.form.js") ?>
+ <?= $theme->script("superfish/js/superfish.js") ?>
+ <?= $theme->script("jquery.localscroll.js") ?>
+ <?= $theme->script("ui.init.js") ?>
<? /* These are page specific, but if we put them before $theme->head() they get combined */ ?>
<? if ($theme->page_type == "photo"): ?>
- <?= $theme->script("lib/jquery.scrollTo.js") ?>
- <?= $theme->script("lib/gallery.show_full_size.js") ?>
+ <?= $theme->script("jquery.scrollTo.js") ?>
+ <?= $theme->script("gallery.show_full_size.js") ?>
<? elseif ($theme->page_type == "movie"): ?>
- <?= $theme->script("lib/flowplayer.js") ?>
+ <?= $theme->script("flowplayer.js") ?>
<? endif ?>
<?= $theme->head() ?>