mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Big set of changes to comments, with related changes to akismet and
user modules. * Don't delete vars when we delete a module. This makes reinstalling a module a lot easier. * Add user::lookup() as the preferred way to load a user, so that other modules don't delve into the user module (that'd be a problem when we swap out user modules) * Notify site admins if Akismet is not fully configured * Bundle all server variables into the comment so that if/when we re-check the comment, we are not using the server info from the site admin's request. * Update Akismet to grab request context data from the comment * Pre-seed comment fields if we have a logged in user. Update comment::create() API to clarify it for this. * Delete comment::update(), that's a controller function. * Add url to User_Model * Add author_name() author_email() and author_url() to Comment_Model. It'll return the appropriate values depending on whether the comment was left by a logged in user or a guest. * Use resetForm() instead of clearForm() when we reload the comment form after ajax submit, this way we preserve the pre-seeded values. * In the user profile page, ignore blank passwords.
This commit is contained in:
@@ -24,18 +24,27 @@ class comment_installer {
|
||||
|
||||
if ($version == 0) {
|
||||
$db->query("CREATE TABLE IF NOT EXISTS `comments` (
|
||||
`id` int(9) NOT NULL auto_increment,
|
||||
`author` varchar(128) default NULL,
|
||||
`email` varchar(128) default NULL,
|
||||
`text` text,
|
||||
`author_id` int(9) default NULL,
|
||||
`created` int(9) NOT NULL,
|
||||
`guest_email` varchar(128) default NULL,
|
||||
`guest_name` varchar(128) default NULL,
|
||||
`guest_url` varchar(255) default NULL,
|
||||
`id` int(9) NOT NULL auto_increment,
|
||||
`item_id` int(9) NOT NULL,
|
||||
`url` varchar(255) default NULL,
|
||||
`server_http_accept_charset` varchar(64) default NULL,
|
||||
`server_http_accept_encoding` varchar(64) default NULL,
|
||||
`server_http_accept_language` varchar(64) default NULL,
|
||||
`server_http_accept` varchar(64) default NULL,
|
||||
`server_http_connection` varchar(64) default NULL,
|
||||
`server_http_host` varchar(64) default NULL,
|
||||
`server_http_referer` varchar(255) default NULL,
|
||||
`server_http_user_agent` varchar(64) default NULL,
|
||||
`server_query_string` varchar(64) default NULL,
|
||||
`server_remote_addr` varchar(32) default NULL,
|
||||
`server_remote_host` varchar(64) default NULL,
|
||||
`server_remote_port` varchar(16) default NULL,
|
||||
`state` char(15) default 'unpublished',
|
||||
`ip_addr` char(15) default NULL,
|
||||
`user_agent` varchar(255) default NULL,
|
||||
`spam_signature` varchar(255) default NULL,
|
||||
`spam_type` char(15) default NULL,
|
||||
`text` text,
|
||||
PRIMARY KEY (`id`))
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user