From 87ce71eb90588a443c05a6b7e378aca8d0e7b3b3 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sun, 27 Mar 2011 11:49:36 -0700
Subject: Sort users in group box by name. Thanks edisonnews! Fixes #1662.
---
modules/user/views/admin_users_group.html.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'modules/user')
diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php
index 2362e42b..31b91351 100644
--- a/modules/user/views/admin_users_group.html.php
+++ b/modules/user/views/admin_users_group.html.php
@@ -17,7 +17,7 @@
if ($group->users->count_all() > 0): ?>
- foreach ($group->users->find_all() as $i => $user): ?>
+ foreach ($group->users->order_by("name", "ASC")->find_all() as $i => $user): ?>
-
= html::clean($user->name) ?>
if (!$group->special): ?>
--
cgit v1.2.3
From 466f2a657ef4b22346e2232f50bc5cca4ab6e540 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Sat, 23 Apr 2011 12:16:06 -0700
Subject: Fix ticket #1694. Correct Spelling of mininum_password_length to
minimum_password_length
---
installer/install.sql | 146 ++++++++++++++++----------------
modules/user/controllers/password.php | 2 +-
modules/user/helpers/user_installer.php | 7 ++
modules/user/models/user.php | 2 +-
modules/user/module.info | 2 +-
5 files changed, 84 insertions(+), 75 deletions(-)
(limited to 'modules/user')
diff --git a/installer/install.sql b/installer/install.sql
index de5250d1..7f9eda59 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -1,6 +1,6 @@
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,
@@ -13,11 +13,11 @@ CREATE TABLE {access_caches} (
PRIMARY KEY (`id`),
KEY `item_id` (`item_id`)
) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+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,
@@ -31,11 +31,11 @@ CREATE TABLE {access_intents} (
`add_2` binary(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+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,
@@ -46,10 +46,10 @@ CREATE TABLE {caches} (
UNIQUE KEY `key` (`key`),
KEY `tags` (`tags`)
) 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,
@@ -75,10 +75,10 @@ CREATE TABLE {comments} (
`updated` int(9) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS {failed_auths};
-/*!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 {failed_auths} (
`id` int(9) NOT NULL AUTO_INCREMENT,
`count` int(9) NOT NULL,
@@ -86,10 +86,10 @@ CREATE TABLE {failed_auths} (
`time` int(9) NOT NULL,
PRIMARY KEY (`id`)
) 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',
@@ -100,12 +100,12 @@ CREATE TABLE {graphics_rules} (
`target` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) 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','gallery_graphics::resize',100,'thumb');
INSERT INTO {graphics_rules} VALUES (2,1,'a:3:{s:5:\"width\";i:640;s:6:\"height\";i:640;s:6:\"master\";i:2;}','gallery','gallery_graphics::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,
@@ -113,25 +113,25 @@ CREATE TABLE {groups} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) 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`)
) 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,
@@ -143,10 +143,10 @@ CREATE TABLE {incoming_translations} (
UNIQUE KEY `key` (`key`,`locale`),
KEY `locale_key` (`locale`,`key`)
) 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,
@@ -188,11 +188,11 @@ CREATE TABLE {items} (
KEY `weight` (`weight`),
KEY `left_ptr` (`left_ptr`)
) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {items} VALUES (1,NULL,NULL,UNIX_TIMESTAMP(),'',NULL,1,1,NULL,NULL,2,0,NULL,'','',1,NULL,NULL,2,NULL,'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,
@@ -201,10 +201,10 @@ CREATE TABLE {items_tags} (
KEY `tag_id` (`tag_id`,`id`),
KEY `item_id` (`item_id`,`id`)
) 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,
@@ -217,10 +217,10 @@ CREATE TABLE {logs} (
`user_id` int(9) DEFAULT '0',
PRIMARY KEY (`id`)
) 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,
@@ -228,11 +228,12 @@ CREATE TABLE {messages} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
-) DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+INSERT INTO {messages} VALUES (1,'upgrade_now','3','Some of your modules are out of date. Upgrade now!');
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',
@@ -243,7 +244,7 @@ CREATE TABLE {modules} (
UNIQUE KEY `name` (`name`),
KEY `weight` (`weight`)
) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+SET character_set_client = @saved_cs_client;
INSERT INTO {modules} VALUES (1,1,'gallery',48,1);
INSERT INTO {modules} VALUES (2,1,'user',3,2);
INSERT INTO {modules} VALUES (3,1,'comment',4,3);
@@ -254,8 +255,8 @@ INSERT INTO {modules} VALUES (7,1,'search',1,7);
INSERT INTO {modules} VALUES (8,1,'slideshow',2,8);
INSERT INTO {modules} VALUES (9,1,'tag',3,9);
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,
@@ -267,10 +268,10 @@ CREATE TABLE {outgoing_translations} (
UNIQUE KEY `key` (`key`,`locale`),
KEY `locale_key` (`locale`,`key`)
) 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,
@@ -278,14 +279,14 @@ CREATE TABLE {permissions} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) 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,
@@ -295,21 +296,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`)
) 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(128) NOT NULL,
@@ -317,10 +318,10 @@ CREATE TABLE {tags} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) 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,
@@ -335,10 +336,10 @@ CREATE TABLE {tasks} (
PRIMARY KEY (`id`),
KEY `owner_id` (`owner_id`)
) 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,
@@ -346,12 +347,12 @@ CREATE TABLE {themes} (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) 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,'wind',1);
INSERT INTO {themes} VALUES (2,'admin_wind',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,
@@ -369,12 +370,12 @@ CREATE TABLE {users} (
UNIQUE KEY `name` (`name`),
UNIQUE KEY `hash` (`hash`)
) 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,'unknown@unknown.com',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,
@@ -382,8 +383,8 @@ CREATE TABLE {vars} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `module_name` (`module_name`,`name`)
-) AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
+) AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
INSERT INTO {vars} VALUES (NULL,'gallery','active_site_theme','wind');
INSERT INTO {vars} VALUES (NULL,'gallery','active_admin_theme','admin_wind');
INSERT INTO {vars} VALUES (NULL,'gallery','page_size','9');
@@ -413,8 +414,9 @@ INSERT INTO {vars} VALUES (NULL,'gallery','email_line_length','70');
INSERT INTO {vars} VALUES (NULL,'gallery','email_header_separator','s:1:\"\n\";');
INSERT INTO {vars} VALUES (NULL,'gallery','show_user_profiles_to','registered_users');
INSERT INTO {vars} VALUES (NULL,'gallery','extra_binary_paths','/usr/local/bin:/opt/local/bin:/opt/bin');
-INSERT INTO {vars} VALUES (NULL,'gallery','timezone','PST8PDT');
+INSERT INTO {vars} VALUES (NULL,'gallery','timezone','System/Localtime');
INSERT INTO {vars} VALUES (NULL,'gallery','blocks_site_sidebar','a:4:{i:10;a:2:{i:0;s:7:\"gallery\";i:1;s:8:\"language\";}i:11;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:12;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:13;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}');
+INSERT INTO {vars} VALUES (NULL,'user','minimum_password_length','5');
INSERT INTO {vars} VALUES (NULL,'gallery','identity_provider','user');
INSERT INTO {vars} VALUES (NULL,'user','mininum_password_length','5');
INSERT INTO {vars} VALUES (NULL,'comment','spam_caught','0');
diff --git a/modules/user/controllers/password.php b/modules/user/controllers/password.php
index 4e93d5ce..cd46bbed 100644
--- a/modules/user/controllers/password.php
+++ b/modules/user/controllers/password.php
@@ -105,7 +105,7 @@ class Password_Controller extends Controller {
if (!empty($hash)) {
$hidden->value($hash);
}
- $minimum_length = module::get_var("user", "mininum_password_length", 5);
+ $minimum_length = module::get_var("user", "minimum_password_length", 5);
$input_password = $group->password("password")->label(t("Password"))->id("g-password")
->rules($minimum_length ? "required|length[$minimum_length, 40]" : "length[40]");
$group->password("password2")->label(t("Confirm Password"))->id("g-password2")
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php
index b889af49..b5e40a24 100644
--- a/modules/user/helpers/user_installer.php
+++ b/modules/user/helpers/user_installer.php
@@ -23,6 +23,7 @@ class user_installer {
}
static function install() {
+ module::set_var("user", "minimum_password_length", 5);
IdentityProvider::change_provider("user");
}
@@ -44,6 +45,12 @@ class user_installer {
->execute();
module::set_version("user", $version = 3);
}
+
+ if ($version == 3) {
+ module::set_var("user", "minimum_password_length", 5);
+ module::clear_var("user", "mininum_password_length");
+ module::set_version("user", $version = 4);
+ }
}
static function uninstall() {
diff --git a/modules/user/models/user.php b/modules/user/models/user.php
index 145738ca..a8a3a0e7 100644
--- a/modules/user/models/user.php
+++ b/modules/user/models/user.php
@@ -147,7 +147,7 @@ class User_Model_Core extends ORM implements User_Definition {
}
if (!$this->loaded() || isset($this->password_length)) {
- $minimum_length = module::get_var("user", "mininum_password_length", 5);
+ $minimum_length = module::get_var("user", "minimum_password_length", 5);
if ($this->password_length < $minimum_length) {
$v->add_error("password", "min_length");
}
diff --git a/modules/user/module.info b/modules/user/module.info
index 185a3e3a..b7594815 100644
--- a/modules/user/module.info
+++ b/modules/user/module.info
@@ -1,4 +1,4 @@
name = "Users and Groups"
description = "Gallery 3 user and group management"
-version = 3
+version = 4
--
cgit v1.2.3
From b30afaeab7d931f4d380a96c4aadd6deb86df5e2 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Sat, 23 Apr 2011 12:27:46 -0700
Subject: Fix ticket #1694 (continued). Reset the corrected user module
variable to the value of the incorrect spelling (don't assume that the
original value was still 5.
---
modules/user/helpers/user_installer.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'modules/user')
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php
index b5e40a24..b9f3c57d 100644
--- a/modules/user/helpers/user_installer.php
+++ b/modules/user/helpers/user_installer.php
@@ -47,7 +47,8 @@ class user_installer {
}
if ($version == 3) {
- module::set_var("user", "minimum_password_length", 5);
+ $password_length = module::get_var("user", "mininum_password_length", 5);
+ module::set_var("user", "minimum_password_length", $password_length);
module::clear_var("user", "mininum_password_length");
module::set_version("user", $version = 4);
}
--
cgit v1.2.3
From 4d38c505cb0412eb4b470bdf95c6b317ef5a691d Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 23 Apr 2011 12:55:30 -0700
Subject: Further cleanup for minimum_password_length -- update
user_installer::initialize() with the right module version number for the
user module and fix the misspelling there then rebuild the installer.sql.
#1694.
---
installer/install.sql | 10 ++++------
modules/user/helpers/user_installer.php | 6 +++---
2 files changed, 7 insertions(+), 9 deletions(-)
(limited to 'modules/user')
diff --git a/installer/install.sql b/installer/install.sql
index bbc2a5c7..2b8ec11e 100644
--- a/installer/install.sql
+++ b/installer/install.sql
@@ -228,9 +228,8 @@ CREATE TABLE {messages} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `key` (`key`)
-) AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO {messages} VALUES (1,'upgrade_now','3','Some of your modules are out of date. Upgrade now!');
DROP TABLE IF EXISTS {modules};
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@@ -246,7 +245,7 @@ CREATE TABLE {modules} (
) AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO {modules} VALUES (1,1,'gallery',49,1);
-INSERT INTO {modules} VALUES (2,1,'user',3,2);
+INSERT INTO {modules} VALUES (2,1,'user',4,2);
INSERT INTO {modules} VALUES (3,1,'comment',4,3);
INSERT INTO {modules} VALUES (4,1,'organize',4,4);
INSERT INTO {modules} VALUES (5,1,'info',2,5);
@@ -383,7 +382,7 @@ CREATE TABLE {vars} (
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `module_name` (`module_name`,`name`)
-) AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
+) AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO {vars} VALUES (NULL,'gallery','active_site_theme','wind');
INSERT INTO {vars} VALUES (NULL,'gallery','active_admin_theme','admin_wind');
@@ -416,9 +415,8 @@ INSERT INTO {vars} VALUES (NULL,'gallery','show_user_profiles_to','registered_us
INSERT INTO {vars} VALUES (NULL,'gallery','extra_binary_paths','/usr/local/bin:/opt/local/bin:/opt/bin');
INSERT INTO {vars} VALUES (NULL,'gallery','timezone',NULL);
INSERT INTO {vars} VALUES (NULL,'gallery','blocks_site_sidebar','a:4:{i:10;a:2:{i:0;s:7:\"gallery\";i:1;s:8:\"language\";}i:11;a:2:{i:0;s:4:\"info\";i:1;s:8:\"metadata\";}i:12;a:2:{i:0;s:3:\"rss\";i:1;s:9:\"rss_feeds\";}i:13;a:2:{i:0;s:3:\"tag\";i:1;s:3:\"tag\";}}');
-INSERT INTO {vars} VALUES (NULL,'user','minimum_password_length','5');
INSERT INTO {vars} VALUES (NULL,'gallery','identity_provider','user');
-INSERT INTO {vars} VALUES (NULL,'user','mininum_password_length','5');
+INSERT INTO {vars} VALUES (NULL,'user','minimum_password_length','5');
INSERT INTO {vars} VALUES (NULL,'comment','spam_caught','0');
INSERT INTO {vars} VALUES (NULL,'comment','access_permissions','everybody');
INSERT INTO {vars} VALUES (NULL,'info','show_title','1');
diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php
index b9f3c57d..9b582773 100644
--- a/modules/user/helpers/user_installer.php
+++ b/modules/user/helpers/user_installer.php
@@ -23,8 +23,8 @@ class user_installer {
}
static function install() {
- module::set_var("user", "minimum_password_length", 5);
IdentityProvider::change_provider("user");
+ // Set the latest version in initialize() below
}
static function upgrade($version) {
@@ -137,7 +137,7 @@ class user_installer {
access::allow($registered, "view", $root);
access::allow($registered, "view_full", $root);
- module::set_var("user", "mininum_password_length", 5);
- module::set_version("user", 3);
+ module::set_var("user", "minimum_password_length", 5);
+ module::set_version("user", 4);
}
}
\ No newline at end of file
--
cgit v1.2.3
From ba20d5a500fbc724376a2fc749ee2c645041a6e1 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 23 Apr 2011 14:46:07 -0700
Subject: Oops, this is the rest of the modules and themes for #1696 and #1698.
---
modules/akismet/module.info | 4 ++++
modules/comment/module.info | 4 ++++
modules/digibug/module.info | 4 ++++
modules/exif/module.info | 4 ++++
modules/g2_import/module.info | 4 ++++
modules/image_block/module.info | 4 ++++
modules/info/module.info | 4 ++++
modules/notification/module.info | 4 ++++
modules/organize/module.info | 4 ++++
modules/recaptcha/module.info | 4 ++++
modules/rest/module.info | 4 ++++
modules/rss/module.info | 4 ++++
modules/search/module.info | 4 ++++
modules/server_add/module.info | 4 ++++
modules/slideshow/module.info | 4 ++++
modules/tag/module.info | 4 ++++
modules/user/module.info | 4 ++++
modules/watermark/module.info | 4 ++++
themes/admin_wind/theme.info | 4 ++++
themes/wind/theme.info | 4 ++++
20 files changed, 80 insertions(+)
(limited to 'modules/user')
diff --git a/modules/akismet/module.info b/modules/akismet/module.info
index b61ed107..afc649d3 100644
--- a/modules/akismet/module.info
+++ b/modules/akismet/module.info
@@ -1,3 +1,7 @@
name = "Akismet"
description = "Filter comments through the Akismet web service to detect and eliminate spam (http://akismet.com). You'll need a WordPress.com API key to use it."
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:akismet"
+discuss_url = "http://gallery.menalto.com/forum_module_akismet"
diff --git a/modules/comment/module.info b/modules/comment/module.info
index e5aa454d..63c6af1c 100644
--- a/modules/comment/module.info
+++ b/modules/comment/module.info
@@ -1,3 +1,7 @@
name = "Comments"
description = "Allows users and guests to leave comments on photos and albums."
version = 4
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:comment"
+discuss_url = "http://gallery.menalto.com/forum_module_comment"
diff --git a/modules/digibug/module.info b/modules/digibug/module.info
index be4e880a..ce437611 100644
--- a/modules/digibug/module.info
+++ b/modules/digibug/module.info
@@ -1,3 +1,7 @@
name = "Digibug"
description = "Digibug Photo Printing Module"
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:digibug"
+discuss_url = "http://gallery.menalto.com/forum_module_digibug"
diff --git a/modules/exif/module.info b/modules/exif/module.info
index c8ae688e..c2ffbfa7 100644
--- a/modules/exif/module.info
+++ b/modules/exif/module.info
@@ -1,3 +1,7 @@
name = "Exif Data"
description = "Extract Exif data and display it on photo pages."
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:exif"
+discuss_url = "http://gallery.menalto.com/forum_module_exif"
diff --git a/modules/g2_import/module.info b/modules/g2_import/module.info
index 977af251..0e766255 100644
--- a/modules/g2_import/module.info
+++ b/modules/g2_import/module.info
@@ -1,3 +1,7 @@
name = "Gallery2 Import"
description = "Import your Gallery 2 content into Gallery 3"
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:g2_import"
+discuss_url = "http://gallery.menalto.com/forum_module_g2_import"
diff --git a/modules/image_block/module.info b/modules/image_block/module.info
index 6836fabc..aa3c5461 100644
--- a/modules/image_block/module.info
+++ b/modules/image_block/module.info
@@ -1,3 +1,7 @@
name = "Image Block"
description = "Display a random image in the sidebar"
version = 3
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:image_block"
+discuss_url = "http://gallery.menalto.com/forum_module_image_block"
diff --git a/modules/info/module.info b/modules/info/module.info
index 5f84cbb9..e8f30594 100644
--- a/modules/info/module.info
+++ b/modules/info/module.info
@@ -1,3 +1,7 @@
name = "Info"
description = "Display extra information about photos and albums"
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:info"
+discuss_url = "http://gallery.menalto.com/forum_module_info"
diff --git a/modules/notification/module.info b/modules/notification/module.info
index 8c5e1162..dacc00f9 100644
--- a/modules/notification/module.info
+++ b/modules/notification/module.info
@@ -1,3 +1,7 @@
name = "Notification"
description = "Send notifications to users when changes are made to watched albums."
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:notification"
+discuss_url = "http://gallery.menalto.com/forum_module_notification"
diff --git a/modules/organize/module.info b/modules/organize/module.info
index 0d16144d..31d24379 100644
--- a/modules/organize/module.info
+++ b/modules/organize/module.info
@@ -1,3 +1,7 @@
name = "Organize"
description = "Visually rearrange and move photos in your gallery"
version = 4
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:organize"
+discuss_url = "http://gallery.menalto.com/forum_module_organize"
diff --git a/modules/recaptcha/module.info b/modules/recaptcha/module.info
index cfa1bf7a..2a0b419b 100644
--- a/modules/recaptcha/module.info
+++ b/modules/recaptcha/module.info
@@ -1,3 +1,7 @@
name = "reCAPTCHA"
description = "reCAPTCHA displays a graphical verification that protects the input form from abuse from 'bots,' or automated programs usually written to generate spam (http://recaptcha.net)."
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:recaptcha"
+discuss_url = "http://gallery.menalto.com/forum_module_recaptcha"
diff --git a/modules/rest/module.info b/modules/rest/module.info
index 5aaffc28..c71c64f9 100644
--- a/modules/rest/module.info
+++ b/modules/rest/module.info
@@ -2,3 +2,7 @@ name = "REST API Module"
description = "A REST-based API that allows desktop clients and other apps to interact with Gallery 3"
version = 3
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:rest"
+discuss_url = "http://gallery.menalto.com/forum_module_rest"
diff --git a/modules/rss/module.info b/modules/rss/module.info
index 48375da1..5ebae9e7 100644
--- a/modules/rss/module.info
+++ b/modules/rss/module.info
@@ -1,3 +1,7 @@
name = "RSS"
description = "Provides RSS feeds"
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:rss"
+discuss_url = "http://gallery.menalto.com/forum_module_rss"
diff --git a/modules/search/module.info b/modules/search/module.info
index f417c4fa..a1c58af5 100644
--- a/modules/search/module.info
+++ b/modules/search/module.info
@@ -1,3 +1,7 @@
name = "Search"
description = "Allows users to search their Gallery"
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:search"
+discuss_url = "http://gallery.menalto.com/forum_module_search"
diff --git a/modules/server_add/module.info b/modules/server_add/module.info
index 87b317b1..754e06c1 100644
--- a/modules/server_add/module.info
+++ b/modules/server_add/module.info
@@ -1,3 +1,7 @@
name = "Server Add"
description = "Allows authorized users to load images directly from your web server"
version = 4
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:server_add"
+discuss_url = "http://gallery.menalto.com/forum_module_server_add"
diff --git a/modules/slideshow/module.info b/modules/slideshow/module.info
index b56eac81..55cdf9b8 100644
--- a/modules/slideshow/module.info
+++ b/modules/slideshow/module.info
@@ -1,3 +1,7 @@
name = "Slideshow"
description = "Allows users to view a slideshow of photos"
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:slideshow"
+discuss_url = "http://gallery.menalto.com/forum_module_slideshow"
diff --git a/modules/tag/module.info b/modules/tag/module.info
index d9d34386..59d8dfbd 100644
--- a/modules/tag/module.info
+++ b/modules/tag/module.info
@@ -1,3 +1,7 @@
name = "Tags"
description = "Allows users to tag photos and albums"
version = 3
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:tag"
+discuss_url = "http://gallery.menalto.com/forum_module_tag"
diff --git a/modules/user/module.info b/modules/user/module.info
index b7594815..f6dd9529 100644
--- a/modules/user/module.info
+++ b/modules/user/module.info
@@ -2,3 +2,7 @@ name = "Users and Groups"
description = "Gallery 3 user and group management"
version = 4
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:user"
+discuss_url = "http://gallery.menalto.com/forum_module_user"
diff --git a/modules/watermark/module.info b/modules/watermark/module.info
index 41a871bd..1f440016 100644
--- a/modules/watermark/module.info
+++ b/modules/watermark/module.info
@@ -1,3 +1,7 @@
name = "Watermarks"
description = "Allows users to watermark their photos"
version = 2
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Module:watermark"
+discuss_url = "http://gallery.menalto.com/forum_module_watermark"
diff --git a/themes/admin_wind/theme.info b/themes/admin_wind/theme.info
index 4034b64a..aca5c6c5 100644
--- a/themes/admin_wind/theme.info
+++ b/themes/admin_wind/theme.info
@@ -4,3 +4,7 @@ version = 1
author = "Gallery Team"
admin = 1
site = 0
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Theme:admin_wind"
+discuss_url = "http://gallery.menalto.com/forum_theme_admin_wind"
diff --git a/themes/wind/theme.info b/themes/wind/theme.info
index 17ea7c20..c2344c48 100644
--- a/themes/wind/theme.info
+++ b/themes/wind/theme.info
@@ -4,3 +4,7 @@ version = 1
author = "Gallery Team"
site = 1
admin = 0
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Theme:wind"
+discuss_url = "http://gallery.menalto.com/forum_theme_wind"
--
cgit v1.2.3
From c07af35a19905f3241fb77662e8b7c84e41e9a62 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Sat, 23 Apr 2011 14:53:34 -0700
Subject: Oops, fix broken codex urls. For #1698.
---
modules/akismet/module.info | 2 +-
modules/comment/module.info | 2 +-
modules/digibug/module.info | 2 +-
modules/exif/module.info | 2 +-
modules/g2_import/module.info | 2 +-
modules/gallery/module.info | 2 +-
modules/image_block/module.info | 2 +-
modules/info/module.info | 2 +-
modules/notification/module.info | 2 +-
modules/organize/module.info | 2 +-
modules/recaptcha/module.info | 2 +-
modules/rest/module.info | 2 +-
modules/rss/module.info | 2 +-
modules/search/module.info | 2 +-
modules/server_add/module.info | 2 +-
modules/slideshow/module.info | 2 +-
modules/tag/module.info | 2 +-
modules/user/module.info | 2 +-
modules/watermark/module.info | 2 +-
themes/admin_wind/theme.info | 2 +-
themes/wind/theme.info | 2 +-
21 files changed, 21 insertions(+), 21 deletions(-)
(limited to 'modules/user')
diff --git a/modules/akismet/module.info b/modules/akismet/module.info
index afc649d3..63473468 100644
--- a/modules/akismet/module.info
+++ b/modules/akismet/module.info
@@ -3,5 +3,5 @@ description = "Filter comments through the Akismet web service to detect and eli
version = 1
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:akismet"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:akismet"
discuss_url = "http://gallery.menalto.com/forum_module_akismet"
diff --git a/modules/comment/module.info b/modules/comment/module.info
index 63c6af1c..4e7df6f1 100644
--- a/modules/comment/module.info
+++ b/modules/comment/module.info
@@ -3,5 +3,5 @@ description = "Allows users and guests to leave comments on photos and albums."
version = 4
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:comment"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:comment"
discuss_url = "http://gallery.menalto.com/forum_module_comment"
diff --git a/modules/digibug/module.info b/modules/digibug/module.info
index ce437611..781d5f01 100644
--- a/modules/digibug/module.info
+++ b/modules/digibug/module.info
@@ -3,5 +3,5 @@ description = "Digibug Photo Printing Module"
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:digibug"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:digibug"
discuss_url = "http://gallery.menalto.com/forum_module_digibug"
diff --git a/modules/exif/module.info b/modules/exif/module.info
index c2ffbfa7..e266e20e 100644
--- a/modules/exif/module.info
+++ b/modules/exif/module.info
@@ -3,5 +3,5 @@ description = "Extract Exif data and display it on photo pages."
version = 1
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:exif"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:exif"
discuss_url = "http://gallery.menalto.com/forum_module_exif"
diff --git a/modules/g2_import/module.info b/modules/g2_import/module.info
index 0e766255..30fb46d4 100644
--- a/modules/g2_import/module.info
+++ b/modules/g2_import/module.info
@@ -3,5 +3,5 @@ description = "Import your Gallery 2 content into Gallery 3"
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:g2_import"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:g2_import"
discuss_url = "http://gallery.menalto.com/forum_module_g2_import"
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index fc522d78..42345531 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -3,5 +3,5 @@ description = "Gallery core application"
version = 49
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:gallery"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:gallery"
discuss_url = "http://gallery.menalto.com/forum_module_gallery"
diff --git a/modules/image_block/module.info b/modules/image_block/module.info
index aa3c5461..6722cc8f 100644
--- a/modules/image_block/module.info
+++ b/modules/image_block/module.info
@@ -3,5 +3,5 @@ description = "Display a random image in the sidebar"
version = 3
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:image_block"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:image_block"
discuss_url = "http://gallery.menalto.com/forum_module_image_block"
diff --git a/modules/info/module.info b/modules/info/module.info
index e8f30594..f8964a78 100644
--- a/modules/info/module.info
+++ b/modules/info/module.info
@@ -3,5 +3,5 @@ description = "Display extra information about photos and albums"
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:info"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:info"
discuss_url = "http://gallery.menalto.com/forum_module_info"
diff --git a/modules/notification/module.info b/modules/notification/module.info
index dacc00f9..84be8f99 100644
--- a/modules/notification/module.info
+++ b/modules/notification/module.info
@@ -3,5 +3,5 @@ description = "Send notifications to users when changes are made to watched albu
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:notification"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:notification"
discuss_url = "http://gallery.menalto.com/forum_module_notification"
diff --git a/modules/organize/module.info b/modules/organize/module.info
index 31d24379..07b9dc38 100644
--- a/modules/organize/module.info
+++ b/modules/organize/module.info
@@ -3,5 +3,5 @@ description = "Visually rearrange and move photos in your gallery"
version = 4
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:organize"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:organize"
discuss_url = "http://gallery.menalto.com/forum_module_organize"
diff --git a/modules/recaptcha/module.info b/modules/recaptcha/module.info
index 2a0b419b..ebaff7de 100644
--- a/modules/recaptcha/module.info
+++ b/modules/recaptcha/module.info
@@ -3,5 +3,5 @@ description = "reCAPTCHA displays a graphical verification that protects the inp
version = 1
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:recaptcha"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:recaptcha"
discuss_url = "http://gallery.menalto.com/forum_module_recaptcha"
diff --git a/modules/rest/module.info b/modules/rest/module.info
index c71c64f9..33c9f1cf 100644
--- a/modules/rest/module.info
+++ b/modules/rest/module.info
@@ -4,5 +4,5 @@ description = "A REST-based API that allows desktop clients and other apps to in
version = 3
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:rest"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:rest"
discuss_url = "http://gallery.menalto.com/forum_module_rest"
diff --git a/modules/rss/module.info b/modules/rss/module.info
index 5ebae9e7..cd13c1b0 100644
--- a/modules/rss/module.info
+++ b/modules/rss/module.info
@@ -3,5 +3,5 @@ description = "Provides RSS feeds"
version = 1
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:rss"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:rss"
discuss_url = "http://gallery.menalto.com/forum_module_rss"
diff --git a/modules/search/module.info b/modules/search/module.info
index a1c58af5..1389798d 100644
--- a/modules/search/module.info
+++ b/modules/search/module.info
@@ -3,5 +3,5 @@ description = "Allows users to search their Gallery"
version = 1
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:search"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:search"
discuss_url = "http://gallery.menalto.com/forum_module_search"
diff --git a/modules/server_add/module.info b/modules/server_add/module.info
index 754e06c1..4ce0a97d 100644
--- a/modules/server_add/module.info
+++ b/modules/server_add/module.info
@@ -3,5 +3,5 @@ description = "Allows authorized users to load images directly from your web ser
version = 4
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:server_add"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:server_add"
discuss_url = "http://gallery.menalto.com/forum_module_server_add"
diff --git a/modules/slideshow/module.info b/modules/slideshow/module.info
index 55cdf9b8..8c9a3176 100644
--- a/modules/slideshow/module.info
+++ b/modules/slideshow/module.info
@@ -3,5 +3,5 @@ description = "Allows users to view a slideshow of photos"
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:slideshow"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:slideshow"
discuss_url = "http://gallery.menalto.com/forum_module_slideshow"
diff --git a/modules/tag/module.info b/modules/tag/module.info
index 59d8dfbd..75d16bf0 100644
--- a/modules/tag/module.info
+++ b/modules/tag/module.info
@@ -3,5 +3,5 @@ description = "Allows users to tag photos and albums"
version = 3
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:tag"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:tag"
discuss_url = "http://gallery.menalto.com/forum_module_tag"
diff --git a/modules/user/module.info b/modules/user/module.info
index f6dd9529..503bcd0d 100644
--- a/modules/user/module.info
+++ b/modules/user/module.info
@@ -4,5 +4,5 @@ version = 4
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:user"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:user"
discuss_url = "http://gallery.menalto.com/forum_module_user"
diff --git a/modules/watermark/module.info b/modules/watermark/module.info
index 1f440016..58efa43f 100644
--- a/modules/watermark/module.info
+++ b/modules/watermark/module.info
@@ -3,5 +3,5 @@ description = "Allows users to watermark their photos"
version = 2
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Module:watermark"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:watermark"
discuss_url = "http://gallery.menalto.com/forum_module_watermark"
diff --git a/themes/admin_wind/theme.info b/themes/admin_wind/theme.info
index aca5c6c5..466d8e43 100644
--- a/themes/admin_wind/theme.info
+++ b/themes/admin_wind/theme.info
@@ -6,5 +6,5 @@ admin = 1
site = 0
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Theme:admin_wind"
+info_url = "http://codex.gallery2.org/Gallery3:Themes:admin_wind"
discuss_url = "http://gallery.menalto.com/forum_theme_admin_wind"
diff --git a/themes/wind/theme.info b/themes/wind/theme.info
index c2344c48..e0be78b9 100644
--- a/themes/wind/theme.info
+++ b/themes/wind/theme.info
@@ -6,5 +6,5 @@ site = 1
admin = 0
author_name = "Gallery Team"
author_url = "http://codex.gallery2.org/Gallery:Team"
-info_url = "http://codex.gallery2.org/Gallery3:Theme:wind"
+info_url = "http://codex.gallery2.org/Gallery3:Themes:wind"
discuss_url = "http://gallery.menalto.com/forum_theme_wind"
--
cgit v1.2.3
From 5cf38ed816006af52fa08475d2957a6f18846887 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Tue, 26 Apr 2011 09:48:21 -0700
Subject: Stop using Pagination() and instead use $theme->pager() in views.
Move the pager() function up to Gallery_View and replace
themes/admin_wind/views/pager.html.php (Pagination based) with a modified
version from the wind theme in themes/admin_wind/views/paginator.html.php.
Fixes #1718.
---
.../comment/controllers/admin_manage_comments.php | 13 ++--
.../comment/views/admin_manage_comments.html.php | 2 +-
modules/gallery/libraries/Gallery_View.php | 46 +++++++++++
modules/gallery/libraries/MY_Pagination.php | 35 ---------
modules/gallery/libraries/Theme_View.php | 46 -----------
modules/user/controllers/admin_users.php | 8 ++
modules/user/views/admin_users.html.php | 2 +-
themes/admin_wind/views/pager.html.php | 44 -----------
themes/admin_wind/views/paginator.html.php | 88 ++++++++++++++++++++++
9 files changed, 151 insertions(+), 133 deletions(-)
delete mode 100644 modules/gallery/libraries/MY_Pagination.php
delete mode 100644 themes/admin_wind/views/pager.html.php
create mode 100644 themes/admin_wind/views/paginator.html.php
(limited to 'modules/user')
diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php
index 9bd1d7f6..effefcbb 100644
--- a/modules/comment/controllers/admin_manage_comments.php
+++ b/modules/comment/controllers/admin_manage_comments.php
@@ -45,6 +45,8 @@ class Admin_Manage_Comments_Controller extends Admin_Controller {
$view = new Admin_View("admin.html");
$view->page_title = t("Manage comments");
+ $view->page_type = "collection";
+ $view->page_subtype = "admin_comments";
$view->content = new View("admin_manage_comments.html");
$view->content->counts = $this->_counts();
$view->content->menu = $this->_menu($view->content->counts);
@@ -56,13 +58,12 @@ class Admin_Manage_Comments_Controller extends Admin_Controller {
->limit(self::$items_per_page)
->offset(($page - 1) * self::$items_per_page)
->find_all();
- $view->content->pager = new Pagination();
- $view->content->pager->initialize(
- array("query_string" => "page",
- "total_items" => $view->content->counts->$state,
- "items_per_page" => self::$items_per_page,
- "style" => "classic"));
+ // Pagination info
+ $view->page = $page;
+ $view->page_size = self::$items_per_page;
+ $view->children_count = $this->_counts()->$state;
+ $view->max_pages = ceil($view->children_count / $view->page_size);
print $view;
}
diff --git a/modules/comment/views/admin_manage_comments.html.php b/modules/comment/views/admin_manage_comments.html.php
index 34a28986..e7a61837 100644
--- a/modules/comment/views/admin_manage_comments.html.php
+++ b/modules/comment/views/admin_manage_comments.html.php
@@ -194,7 +194,7 @@
- = $pager ?>
+ = $theme->paginator() ?>
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 1395686c..e04b9169 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -30,6 +30,52 @@ class Gallery_View_Core extends View {
return $absolute_url ? url::abs_file($arg) : url::file($arg);
}
+ /**
+ * Set up the data and render a pager.
+ *
+ * See themes/wind/views/pager.html for documentation on the variables generated here.
+ */
+ public function paginator() {
+ $v = new View("paginator.html");
+ $v->page_type = $this->page_type;
+ $v->page_subtype = $this->page_subtype;
+ $v->first_page_url = null;
+ $v->previous_page_url = null;
+ $v->next_page_url = null;
+ $v->last_page_url = null;
+
+ if ($this->page_type == "collection") {
+ $v->page = $this->page;
+ $v->max_pages = $this->max_pages;
+ $v->total = $this->children_count;
+
+ if ($this->page != 1) {
+ $v->first_page_url = url::site(url::merge(array("page" => 1)));
+ $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1)));
+ }
+
+ if ($this->page != $this->max_pages) {
+ $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1)));
+ $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages)));
+ }
+
+ $v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
+ $v->last_visible_position = min($this->page * $this->page_size, $v->total);
+ } else if ($this->page_type == "item") {
+ $v->position = $this->position;
+ $v->total = $this->sibling_count;
+ if ($this->previous_item) {
+ $v->previous_page_url = $this->previous_item->url();
+ }
+
+ if ($this->next_item) {
+ $v->next_page_url = $this->next_item->url();
+ }
+ }
+
+ return $v;
+ }
+
/**
* Begin gather up scripts or css files so that they can be combined into a single request.
*
diff --git a/modules/gallery/libraries/MY_Pagination.php b/modules/gallery/libraries/MY_Pagination.php
deleted file mode 100644
index e697c0bd..00000000
--- a/modules/gallery/libraries/MY_Pagination.php
+++ /dev/null
@@ -1,35 +0,0 @@
-auto_hide === TRUE AND $this->total_pages <= 1) {
- return "";
- }
-
- if ($style === NULL) {
- // Use default style
- $style = $this->style;
- }
-
- // Return rendered pagination view
- return View::factory("pager.html", get_object_vars($this))->render();
- }
-}
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 152efc37..d6834464 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -138,52 +138,6 @@ class Theme_View_Core extends Gallery_View {
return $menu->render();
}
- /**
- * Set up the data and render a pager.
- *
- * See themes/wind/views/pager.html for documentation on the variables generated here.
- */
- public function paginator() {
- $v = new View("paginator.html");
- $v->page_type = $this->page_type;
- $v->page_subtype = $this->page_subtype;
- $v->first_page_url = null;
- $v->previous_page_url = null;
- $v->next_page_url = null;
- $v->last_page_url = null;
-
- if ($this->page_type == "collection") {
- $v->page = $this->page;
- $v->max_pages = $this->max_pages;
- $v->total = $this->children_count;
-
- if ($this->page != 1) {
- $v->first_page_url = url::site(url::merge(array("page" => 1)));
- $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1)));
- }
-
- if ($this->page != $this->max_pages) {
- $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1)));
- $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages)));
- }
-
- $v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
- $v->last_visible_position = min($this->page * $this->page_size, $v->total);
- } else if ($this->page_type == "item") {
- $v->position = $this->position;
- $v->total = $this->sibling_count;
- if ($this->previous_item) {
- $v->previous_page_url = $this->previous_item->url();
- }
-
- if ($this->next_item) {
- $v->next_page_url = $this->next_item->url();
- }
- }
-
- return $v;
- }
-
/**
* Print out any site wide status information.
*/
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index a3633b52..41be6c03 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -21,6 +21,8 @@ class Admin_Users_Controller extends Admin_Controller {
public function index() {
$view = new Admin_View("admin.html");
$view->page_title = t("Users and groups");
+ $view->page_type = "collection";
+ $view->page_subtype = "admin_users";
$view->content = new View("admin_users.html");
// @todo: add this as a config option
@@ -29,6 +31,12 @@ class Admin_Users_Controller extends Admin_Controller {
$builder = db::build();
$user_count = $builder->from("users")->count_records();
+ // Pagination info
+ $view->page = $page;
+ $view->page_size = $page_size;
+ $view->children_count = $user_count;
+ $view->max_pages = ceil($view->children_count / $view->page_size);
+
$view->content->pager = new Pagination();
$view->content->pager->initialize(
array("query_string" => "page",
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php
index a7bd6b27..033c9dae 100644
--- a/modules/user/views/admin_users.html.php
+++ b/modules/user/views/admin_users.html.php
@@ -110,7 +110,7 @@
- = $pager ?>
+ = $theme->paginator() ?>
diff --git a/themes/admin_wind/views/pager.html.php b/themes/admin_wind/views/pager.html.php
deleted file mode 100644
index 5fff5845..00000000
--- a/themes/admin_wind/views/pager.html.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- // See http://docs.kohanaphp.com/libraries/pagination ?>
-
diff --git a/themes/admin_wind/views/paginator.html.php b/themes/admin_wind/views/paginator.html.php
new file mode 100644
index 00000000..3cb0223d
--- /dev/null
+++ b/themes/admin_wind/views/paginator.html.php
@@ -0,0 +1,88 @@
+
+
+// This is a generic paginator for admin collections. Depending on the page type, there are
+// different sets of variables available. With this data, you can make a paginator that
+// lets you say "You're viewing photo 5 of 35", or "You're viewing photos 10 - 18 of 37"
+// for album views.
+
+//
+// Available variables for all page types:
+// $page_type - "collection", "item", or "other"
+// $page_subtype - "album", "movie", "photo", "tag", etc.
+// $previous_page_url - the url to the previous page, if there is one
+// $next_page_url - the url to the next page, if there is one
+// $total - the total number of photos in this album
+//
+// Available for the "collection" page types:
+// $page - what page number we're on
+// $max_pages - the maximum page number
+// $page_size - the page size
+// $first_page_url - the url to the first page, or null if we're on the first page
+// $last_page_url - the url to the last page, or null if we're on the last page
+// $first_visible_position - the position number of the first visible photo on this page
+// $last_visible_position - the position number of the last visible photo on this page
+//
+// Available for "item" page types:
+// $position - the position number of this photo
+//
+?>
+
+
+ -
+ if ($page_type == "collection"): ?>
+ if (isset($first_page_url)): ?>
+
+ = t("First") ?>
+ else: ?>
+
+ = t("First") ?>
+ endif ?>
+ endif ?>
+
+ if (isset($previous_page_url)): ?>
+
+ = t("Previous") ?>
+ else: ?>
+
+ = t("Previous") ?>
+ endif ?>
+
+
+ -
+ if ($total): ?>
+ if ($page_type == "collection"): ?>
+ = /* @todo This message isn't easily localizable */
+ t2("Viewing %from_number of %count",
+ "Viewing %from_number - %to_number of %count",
+ $total,
+ array("from_number" => $first_visible_position,
+ "to_number" => $last_visible_position,
+ "count" => $total)) ?>
+ else: ?>
+ = t("%position of %total", array("position" => $position, "total" => $total)) ?>
+ endif ?>
+ else: ?>
+ = t("No photos") ?>
+ endif ?>
+
+
+ -
+ if (isset($next_page_url)): ?>
+
+ = t("Next") ?>
+ else: ?>
+
+ = t("Next") ?>
+ endif ?>
+
+ if ($page_type == "collection"): ?>
+ if (isset($last_page_url)): ?>
+
+ = t("Last") ?>
+ else: ?>
+
+ = t("Last") ?>
+ endif ?>
+ endif ?>
+
+
--
cgit v1.2.3
From 44247fb2d1698286e558cd6f5ee5bb87a8612f9b Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Tue, 24 May 2011 20:37:51 -0700
Subject: Allow password reset even when we're in maintenance or private
gallery mode, otherwise you can't reset your password if you forgot it when
the Gallery is locked down. #1735.
---
modules/user/controllers/password.php | 3 +++
1 file changed, 3 insertions(+)
(limited to 'modules/user')
diff --git a/modules/user/controllers/password.php b/modules/user/controllers/password.php
index cd46bbed..ab31c6b4 100644
--- a/modules/user/controllers/password.php
+++ b/modules/user/controllers/password.php
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Password_Controller extends Controller {
+ const ALLOW_MAINTENANCE_MODE = true;
+ const ALLOW_PRIVATE_GALLERY = true;
+
public function reset() {
$form = self::_reset_form();
if (request::method() == "post") {
--
cgit v1.2.3
From 7f8056b593d04a9abd070399c0d4d176c650a309 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Thu, 4 Aug 2011 19:44:19 -0700
Subject: fix for ticket #1759. correct parameter names to match usage.
---
modules/gallery/libraries/IdentityProvider.php | 12 ++++++------
modules/user/libraries/drivers/IdentityProvider/Gallery.php | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
(limited to 'modules/user')
diff --git a/modules/gallery/libraries/IdentityProvider.php b/modules/gallery/libraries/IdentityProvider.php
index 153446e6..3f995923 100644
--- a/modules/gallery/libraries/IdentityProvider.php
+++ b/modules/gallery/libraries/IdentityProvider.php
@@ -110,11 +110,11 @@ class IdentityProvider_Core {
Kohana_Log::add("error", "Error restoring original identity provider\n" .
$e2->getMessage() . "\n" . $e2->getTraceAsString());
}
-
+
message::error(
t("Error attempting to enable \"%new_provider\" identity provider, reverted to \"%old_provider\" identity provider",
array("new_provider" => $new_provider, "old_provider" => $current_provider)));
-
+
$restore_already_running = false;
}
throw $e;
@@ -260,14 +260,14 @@ class IdentityProvider_Core {
/**
* @see IdentityProvider_Driver::add_user_to_group.
*/
- public function add_user_to_group($user, $group_id) {
- return $this->driver->add_user_to_group($user, $group_id);
+ public function add_user_to_group($user, $group) {
+ return $this->driver->add_user_to_group($user, $group);
}
/**
* @see IdentityProvider_Driver::remove_user_to_group.
*/
- public function remove_user_from_group($user, $group_id) {
- return $this->driver->remove_user_from_group($user, $group_id);
+ public function remove_user_from_group($user, $group) {
+ return $this->driver->remove_user_from_group($user, $group);
}
} // End Identity
diff --git a/modules/user/libraries/drivers/IdentityProvider/Gallery.php b/modules/user/libraries/drivers/IdentityProvider/Gallery.php
index 8cba3c82..79d31f7c 100644
--- a/modules/user/libraries/drivers/IdentityProvider/Gallery.php
+++ b/modules/user/libraries/drivers/IdentityProvider/Gallery.php
@@ -156,7 +156,7 @@ class IdentityProvider_Gallery_Driver implements IdentityProvider_Driver {
/**
* @see IdentityProvider_Driver::remove_user_to_group.
*/
- public function remove_user_from_group($user, $group_id) {
+ public function remove_user_from_group($user, $group) {
$group->remove($user);
$group->save();
}
--
cgit v1.2.3
From 11c76572f0875e69f513e236a4c65e2d103d56c4 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Thu, 4 Aug 2011 20:29:06 -0700
Subject: Patch for ticket #1769. Remove the rows in groups_users when the user
or the group is deleted.
---
modules/user/models/group.php | 6 ++++++
modules/user/models/user.php | 6 ++++++
2 files changed, 12 insertions(+)
(limited to 'modules/user')
diff --git a/modules/user/models/group.php b/modules/user/models/group.php
index 4409dcb8..46642203 100644
--- a/modules/user/models/group.php
+++ b/modules/user/models/group.php
@@ -28,6 +28,12 @@ class Group_Model_Core extends ORM implements Group_Definition {
$old = clone $this;
module::event("group_before_delete", $this);
parent::delete($id);
+
+ db::build()
+ ->delete("groups_users")
+ ->where("group_id", "=", empty($id) ? $old->id : $id)
+ ->execute();
+
module::event("group_deleted", $old);
$this->users_cache = null;
}
diff --git a/modules/user/models/user.php b/modules/user/models/user.php
index a8a3a0e7..8fe0a87b 100644
--- a/modules/user/models/user.php
+++ b/modules/user/models/user.php
@@ -43,6 +43,12 @@ class User_Model_Core extends ORM implements User_Definition {
$old = clone $this;
module::event("user_before_delete", $this);
parent::delete($id);
+
+ db::build()
+ ->delete("groups_users")
+ ->where("user_id", "=", empty($id) ? $old->id : $id)
+ ->execute();
+
module::event("user_deleted", $old);
$this->groups_cache = null;
}
--
cgit v1.2.3
From e736d98eaa37df24122c746c21c473f0988d58f2 Mon Sep 17 00:00:00 2001
From: Tim Almdal
Date: Thu, 4 Aug 2011 21:00:21 -0700
Subject: Patch for ticket #1765. Provide the full site url for the the gallery
link instead of trying to use url_base for the hidden link and the
presentation text.
---
modules/user/views/reset_password.html.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'modules/user')
diff --git a/modules/user/views/reset_password.html.php b/modules/user/views/reset_password.html.php
index 3afca881..d939ad42 100644
--- a/modules/user/views/reset_password.html.php
+++ b/modules/user/views/reset_password.html.php
@@ -9,8 +9,9 @@
= t("Hello, %name,", array("name" => $user->full_name ? $user->full_name : $user->name)) ?>
- = t("We received a request to reset your password for %site_url. If you made this request, you can confirm it by clicking this link. If you didn't request this password reset, it's ok to ignore this mail.",
- array("site_url" => html::mark_clean(url::base(false, "http")),
+ = t("We received a request to reset your password for %base_url. If you made this request, you can confirm it by clicking this link. If you didn't request this password reset, it's ok to ignore this mail.",
+ array("site_url" => html::mark_clean(url::abs_site("/")),
+ "base_url" => html::mark_clean(url::base(false)),
"confirm_url" => $confirm_url)) ?>