Merge pull request #1988 from nickvergessen/ticket/12115

[ticket/12115] Convert occupation profile field to custom field
This commit is contained in:
Nils Adermann 2014-02-10 13:52:12 +01:00
commit 840ab75520
61 changed files with 404 additions and 321 deletions

View file

@ -30,14 +30,6 @@
<dt><label for="location">{L_LOCATION}{L_COLON}</label></dt> <dt><label for="location">{L_LOCATION}{L_COLON}</label></dt>
<dd><input type="text" id="location" name="location" value="{LOCATION}" /></dd> <dd><input type="text" id="location" name="location" value="{LOCATION}" /></dd>
</dl> </dl>
<dl>
<dt><label for="occupation">{L_OCCUPATION}{L_COLON}</label></dt>
<dd><textarea id="occupation" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></dd>
</dl>
<dl>
<dt><label for="interests">{L_INTERESTS}{L_COLON}</label></dt>
<dd><textarea id="interests" name="interests" rows="3" cols="30">{INTERESTS}</textarea></dd>
</dl>
<dl> <dl>
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt> <dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd> <dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>

View file

@ -368,9 +368,7 @@ function make_user($username)
$email = "nobody@localhost"; $email = "nobody@localhost";
$icq = "12345678"; $icq = "12345678";
$website = "http://www.phpbb.com"; $website = "http://www.phpbb.com";
$occupation = "phpBB tester";
$location = "phpBB world hq"; $location = "phpBB world hq";
$interests = "Eating, sleeping, living, and breathing phpBB";
$signature = "$username: phpBB tester."; $signature = "$username: phpBB tester.";
$signature_bbcode_uid = ""; $signature_bbcode_uid = "";
$avatar_filename = ""; $avatar_filename = "";
@ -422,8 +420,8 @@ function make_user($username)
} }
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_from, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmilies, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, "; VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$location', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
$sql .= "1, '')"; $sql .= "1, '')";

View file

@ -1368,8 +1368,6 @@ class acp_users
'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user_row['user_jabber'], true)),
'website' => request_var('website', $user_row['user_website']), 'website' => request_var('website', $user_row['user_website']),
'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)), 'location' => utf8_normalize_nfc(request_var('location', $user_row['user_from'], true)),
'occupation' => utf8_normalize_nfc(request_var('occupation', $user_row['user_occ'], true)),
'interests' => utf8_normalize_nfc(request_var('interests', $user_row['user_interests'], true)),
'bday_day' => 0, 'bday_day' => 0,
'bday_month' => 0, 'bday_month' => 0,
'bday_year' => 0, 'bday_year' => 0,
@ -1402,8 +1400,6 @@ class acp_users
array('string', true, 12, 255), array('string', true, 12, 255),
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
'location' => array('string', true, 2, 100), 'location' => array('string', true, 2, 100),
'occupation' => array('string', true, 2, 500),
'interests' => array('string', true, 2, 500),
'bday_day' => array('num', true, 1, 31), 'bday_day' => array('num', true, 1, 31),
'bday_month' => array('num', true, 1, 12), 'bday_month' => array('num', true, 1, 12),
'bday_year' => array('num', true, 1901, gmdate('Y', time())), 'bday_year' => array('num', true, 1901, gmdate('Y', time())),
@ -1432,8 +1428,6 @@ class acp_users
'user_jabber' => $data['jabber'], 'user_jabber' => $data['jabber'],
'user_website' => $data['website'], 'user_website' => $data['website'],
'user_from' => $data['location'], 'user_from' => $data['location'],
'user_occ' => $data['occupation'],
'user_interests'=> $data['interests'],
'user_birthday' => $data['user_birthday'], 'user_birthday' => $data['user_birthday'],
); );
@ -1484,8 +1478,6 @@ class acp_users
'JABBER' => $data['jabber'], 'JABBER' => $data['jabber'],
'WEBSITE' => $data['website'], 'WEBSITE' => $data['website'],
'LOCATION' => $data['location'], 'LOCATION' => $data['location'],
'OCCUPATION' => $data['occupation'],
'INTERESTS' => $data['interests'],
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options, 'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options, 'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,

View file

@ -787,6 +787,8 @@ $schema_data['phpbb_profile_fields'] = array(
$schema_data['phpbb_profile_fields_data'] = array( $schema_data['phpbb_profile_fields_data'] = array(
'COLUMNS' => array( 'COLUMNS' => array(
'user_id' => array('UINT', 0), 'user_id' => array('UINT', 0),
'pf_phpbb_interests' => array('TEXT_UNI', ''),
'pf_phpbb_occupation' => array('TEXT_UNI', ''),
), ),
'PRIMARY_KEY' => 'user_id', 'PRIMARY_KEY' => 'user_id',
); );
@ -1170,8 +1172,6 @@ $schema_data['phpbb_users'] = array(
'user_msnm' => array('VCHAR_UNI', ''), 'user_msnm' => array('VCHAR_UNI', ''),
'user_jabber' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''),
'user_website' => array('VCHAR_UNI:200', ''), 'user_website' => array('VCHAR_UNI:200', ''),
'user_occ' => array('TEXT_UNI', ''),
'user_interests' => array('TEXT_UNI', ''),
'user_actkey' => array('VCHAR:32', ''), 'user_actkey' => array('VCHAR:32', ''),
'user_newpasswd' => array('VCHAR_UNI:40', ''), 'user_newpasswd' => array('VCHAR_UNI:40', ''),
'user_form_salt' => array('VCHAR_UNI:32', ''), 'user_form_salt' => array('VCHAR_UNI:32', ''),

View file

@ -210,8 +210,6 @@ function user_add($user_row, $cp_data = false)
'user_lastpage' => '', 'user_lastpage' => '',
'user_posts' => 0, 'user_posts' => 0,
'user_colour' => '', 'user_colour' => '',
'user_occ' => '',
'user_interests' => '',
'user_avatar' => '', 'user_avatar' => '',
'user_avatar_type' => '', 'user_avatar_type' => '',
'user_avatar_width' => 0, 'user_avatar_width' => 0,

View file

@ -195,9 +195,6 @@ class ucp_main
'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day), 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
'POSTS_PCT' => $user->lang('POST_PCT', $percentage), 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
'OCCUPATION' => (!empty($row['user_occ'])) ? $row['user_occ'] : '',
'INTERESTS' => (!empty($row['user_interests'])) ? $row['user_interests'] : '',
// 'S_GROUP_OPTIONS' => $group_options, // 'S_GROUP_OPTIONS' => $group_options,
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&amp;sr=posts') : '', 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $user->data['user_id'] . '&amp;sr=posts') : '',

View file

@ -271,8 +271,6 @@ class ucp_profile
'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)), 'jabber' => utf8_normalize_nfc(request_var('jabber', $user->data['user_jabber'], true)),
'website' => request_var('website', $user->data['user_website']), 'website' => request_var('website', $user->data['user_website']),
'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)), 'location' => utf8_normalize_nfc(request_var('location', $user->data['user_from'], true)),
'occupation' => utf8_normalize_nfc(request_var('occupation', $user->data['user_occ'], true)),
'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),
); );
if ($config['allow_birthdays']) if ($config['allow_birthdays'])
@ -308,8 +306,6 @@ class ucp_profile
array('string', true, 12, 255), array('string', true, 12, 255),
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
'location' => array('string', true, 2, 100), 'location' => array('string', true, 2, 100),
'occupation' => array('string', true, 2, 500),
'interests' => array('string', true, 2, 500),
); );
if ($config['allow_birthdays']) if ($config['allow_birthdays'])
@ -356,8 +352,6 @@ class ucp_profile
'user_jabber' => $data['jabber'], 'user_jabber' => $data['jabber'],
'user_website' => $data['website'], 'user_website' => $data['website'],
'user_from' => $data['location'], 'user_from' => $data['location'],
'user_occ' => $data['occupation'],
'user_interests'=> $data['interests'],
'user_notify_type' => $data['notify'], 'user_notify_type' => $data['notify'],
); );
@ -427,8 +421,6 @@ class ucp_profile
'JABBER' => $data['jabber'], 'JABBER' => $data['jabber'],
'WEBSITE' => $data['website'], 'WEBSITE' => $data['website'],
'LOCATION' => $data['location'], 'LOCATION' => $data['location'],
'OCCUPATION'=> $data['occupation'],
'INTERESTS' => $data['interests'],
)); ));
// Get additional profile fields and assign them to the template block var 'profile_fields' // Get additional profile fields and assign them to the template block var 'profile_fields'

View file

@ -906,8 +906,6 @@ if (!$get_info)
array('user_inactive_reason', '', 'phpbb_inactive_reason'), array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'), array('user_inactive_time', '', 'phpbb_inactive_time'),
array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
array('user_website', 'users.user_website', 'validate_website'), array('user_website', 'users.user_website', 'validate_website'),
array('user_jabber', '', ''), array('user_jabber', '', ''),
array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
@ -954,6 +952,20 @@ if (!$get_info)
'where' => 'users.user_id <> -1', 'where' => 'users.user_id <> -1',
), ),
array(
'target' => PROFILE_FIELDS_DATA_TABLE,
'primary' => 'users.user_id',
'query_first' => array(
array('target', $convert->truncate_statement . PROFILE_FIELDS_DATA_TABLE),
),
array('user_id', 'users.user_id', 'phpbb_user_id'),
array('pf_phpbb_occupation', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
'where' => 'users.user_id <> -1',
),
), ),
); );
} }

View file

@ -1718,6 +1718,7 @@ class install_install extends module
$this->error('Unable to access the language directory', __LINE__, __FILE__); $this->error('Unable to access the language directory', __LINE__, __FILE__);
} }
$installed_languages = array();
while (($file = readdir($dir)) !== false) while (($file = readdir($dir)) !== false)
{ {
$path = $phpbb_root_path . 'language/' . $file; $path = $phpbb_root_path . 'language/' . $file;
@ -1741,6 +1742,7 @@ class install_install extends module
$db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack)); $db->sql_query('INSERT INTO ' . LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $lang_pack));
$installed_languages[] = (int) $db->sql_nextid();
if ($db->sql_error_triggered) if ($db->sql_error_triggered)
{ {
$error = $db->sql_error($db->sql_error_sql); $error = $db->sql_error($db->sql_error_sql);
@ -1749,6 +1751,29 @@ class install_install extends module
} }
} }
closedir($dir); closedir($dir);
$sql = 'SELECT *
FROM ' . PROFILE_FIELDS_TABLE;
$result = $db->sql_query($sql);
$profile_fields = array();
$insert_buffer = new \phpbb\db\sql_insert_buffer($db, PROFILE_LANG_TABLE);
while ($row = $db->sql_fetchrow($result))
{
foreach ($installed_languages as $lang_id)
{
$insert_buffer->insert(array(
'field_id' => $row['field_id'],
'lang_id' => $lang_id,
'lang_name' => strtoupper(substr($row['field_name'], 6)),// Remove phpbb_ from field name
'lang_explain' => '',
'lang_default_value' => '',
));
}
}
$db->sql_freeresult($result);
$insert_buffer->flush();
} }
/** /**

View file

@ -946,7 +946,9 @@ END;;
# Table: 'phpbb_profile_fields_data' # Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id INTEGER DEFAULT 0 NOT NULL user_id INTEGER DEFAULT 0 NOT NULL,
pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);; );;
ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);;
@ -1423,8 +1425,6 @@ CREATE TABLE phpbb_users (
user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,

View file

@ -1153,7 +1153,9 @@ GO
Table: 'phpbb_profile_fields_data' Table: 'phpbb_profile_fields_data'
*/ */
CREATE TABLE [phpbb_profile_fields_data] ( CREATE TABLE [phpbb_profile_fields_data] (
[user_id] [int] DEFAULT (0) NOT NULL [user_id] [int] DEFAULT (0) NOT NULL ,
[pf_phpbb_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
[pf_phpbb_occupation] [varchar] (4000) DEFAULT ('') NOT NULL
) ON [PRIMARY] ) ON [PRIMARY]
GO GO
@ -1739,8 +1741,6 @@ CREATE TABLE [phpbb_users] (
[user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
[user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
[user_website] [varchar] (200) DEFAULT ('') NOT NULL , [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
[user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
[user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
[user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
[user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
[user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,

View file

@ -672,6 +672,8 @@ CREATE TABLE phpbb_profile_fields (
# Table: 'phpbb_profile_fields_data' # Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pf_phpbb_interests blob NOT NULL,
pf_phpbb_occupation blob NOT NULL,
PRIMARY KEY (user_id) PRIMARY KEY (user_id)
); );
@ -1032,8 +1034,6 @@ CREATE TABLE phpbb_users (
user_msnm blob NOT NULL, user_msnm blob NOT NULL,
user_jabber blob NOT NULL, user_jabber blob NOT NULL,
user_website blob NOT NULL, user_website blob NOT NULL,
user_occ blob NOT NULL,
user_interests blob NOT NULL,
user_actkey varbinary(32) DEFAULT '' NOT NULL, user_actkey varbinary(32) DEFAULT '' NOT NULL,
user_newpasswd varbinary(120) DEFAULT '' NOT NULL, user_newpasswd varbinary(120) DEFAULT '' NOT NULL,
user_form_salt varbinary(96) DEFAULT '' NOT NULL, user_form_salt varbinary(96) DEFAULT '' NOT NULL,

View file

@ -672,6 +672,8 @@ CREATE TABLE phpbb_profile_fields (
# Table: 'phpbb_profile_fields_data' # Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pf_phpbb_interests text NOT NULL,
pf_phpbb_occupation text NOT NULL,
PRIMARY KEY (user_id) PRIMARY KEY (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`; ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
@ -1032,8 +1034,6 @@ CREATE TABLE phpbb_users (
user_msnm varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL,
user_jabber varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL,
user_website varchar(200) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL,
user_occ text NOT NULL,
user_interests text NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL,
user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_newpasswd varchar(40) DEFAULT '' NOT NULL,
user_form_salt varchar(32) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL,

View file

@ -1265,6 +1265,8 @@ END;
*/ */
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL,
pf_phpbb_interests clob DEFAULT '' ,
pf_phpbb_occupation clob DEFAULT '' ,
CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
) )
/ /
@ -1856,8 +1858,6 @@ CREATE TABLE phpbb_users (
user_msnm varchar2(765) DEFAULT '' , user_msnm varchar2(765) DEFAULT '' ,
user_jabber varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' ,
user_website varchar2(600) DEFAULT '' , user_website varchar2(600) DEFAULT '' ,
user_occ clob DEFAULT '' ,
user_interests clob DEFAULT '' ,
user_actkey varchar2(32) DEFAULT '' , user_actkey varchar2(32) DEFAULT '' ,
user_newpasswd varchar2(120) DEFAULT '' , user_newpasswd varchar2(120) DEFAULT '' ,
user_form_salt varchar2(96) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' ,

View file

@ -882,6 +882,8 @@ CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
*/ */
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL,
pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id) PRIMARY KEY (user_id)
); );
@ -1304,8 +1306,6 @@ CREATE TABLE phpbb_users (
user_msnm varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL,
user_jabber varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL,
user_website varchar(200) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL,
user_occ varchar(4000) DEFAULT '' NOT NULL,
user_interests varchar(4000) DEFAULT '' NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL,
user_newpasswd varchar(40) DEFAULT '' NOT NULL, user_newpasswd varchar(40) DEFAULT '' NOT NULL,
user_form_salt varchar(32) DEFAULT '' NOT NULL, user_form_salt varchar(32) DEFAULT '' NOT NULL,

View file

@ -467,10 +467,10 @@ INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id,
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48); INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_subject, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents, forum_flags) VALUES ('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 'Admin', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', 972086460, '', '', '', '', '', '', '', 0, 0, '', 48);
# -- Users / Anonymous user # -- Users / Anonymous user
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0); INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd, user_allow_massemail) VALUES (2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', 0);
# -- username: Admin password: admin (change this or remove it once everything is working!) # -- username: Admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '');
# -- Groups # -- Groups
INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5); INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES ('GUESTS', 3, 0, '', 0, '', '', '', 5);
@ -787,6 +787,10 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
# Add default profile fields
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_interests', 'profilefields.type.text', 'phpbb_interests', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 1);
INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_profile, field_hide, field_no_view, field_active, field_order) VALUES ('phpbb_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 1, 0, 0, 1, 2);
# User Notification Options (for first user) # User Notification Options (for first user)
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, '');
INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, 'email'); INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, 'email');

View file

@ -652,6 +652,8 @@ CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
# Table: 'phpbb_profile_fields_data' # Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data ( CREATE TABLE phpbb_profile_fields_data (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
pf_phpbb_interests text(65535) NOT NULL DEFAULT '',
pf_phpbb_occupation text(65535) NOT NULL DEFAULT '',
PRIMARY KEY (user_id) PRIMARY KEY (user_id)
); );
@ -1003,8 +1005,6 @@ CREATE TABLE phpbb_users (
user_msnm varchar(255) NOT NULL DEFAULT '', user_msnm varchar(255) NOT NULL DEFAULT '',
user_jabber varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '',
user_website varchar(200) NOT NULL DEFAULT '', user_website varchar(200) NOT NULL DEFAULT '',
user_occ text(65535) NOT NULL DEFAULT '',
user_interests text(65535) NOT NULL DEFAULT '',
user_actkey varchar(32) NOT NULL DEFAULT '', user_actkey varchar(32) NOT NULL DEFAULT '',
user_newpasswd varchar(40) NOT NULL DEFAULT '', user_newpasswd varchar(40) NOT NULL DEFAULT '',
user_form_salt varchar(32) NOT NULL DEFAULT '', user_form_salt varchar(32) NOT NULL DEFAULT '',

View file

@ -684,12 +684,10 @@ $lang = array_merge($lang, array(
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.', 'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.', 'TOO_LONG_DATEFORMAT' => 'The date format you entered is too long.',
'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.', 'TOO_LONG_ICQ' => 'The ICQ number you entered is too long.',
'TOO_LONG_INTERESTS' => 'The interests you entered is too long.',
'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.', 'TOO_LONG_JABBER' => 'The Jabber account name you entered is too long.',
'TOO_LONG_LOCATION' => 'The location you entered is too long.', 'TOO_LONG_LOCATION' => 'The location you entered is too long.',
'TOO_LONG_MSN' => 'The WLM name you entered is too long.', 'TOO_LONG_MSN' => 'The WLM name you entered is too long.',
'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_NEW_PASSWORD' => 'The password you entered is too long.',
'TOO_LONG_OCCUPATION' => 'The occupation you entered is too long.',
'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.', 'TOO_LONG_PASSWORD_CONFIRM' => 'The password confirmation you entered is too long.',
'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.', 'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
'TOO_LONG_USERNAME' => 'The username you entered is too long.', 'TOO_LONG_USERNAME' => 'The username you entered is too long.',
@ -705,12 +703,10 @@ $lang = array_merge($lang, array(
'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.', 'TOO_SHORT_CONFIRM_CODE' => 'The confirm code you entered is too short.',
'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.', 'TOO_SHORT_DATEFORMAT' => 'The date format you entered is too short.',
'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.', 'TOO_SHORT_ICQ' => 'The ICQ number you entered is too short.',
'TOO_SHORT_INTERESTS' => 'The interests you entered is too short.',
'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.', 'TOO_SHORT_JABBER' => 'The Jabber account name you entered is too short.',
'TOO_SHORT_LOCATION' => 'The location you entered is too short.', 'TOO_SHORT_LOCATION' => 'The location you entered is too short.',
'TOO_SHORT_MSN' => 'The WLM name you entered is too short.', 'TOO_SHORT_MSN' => 'The WLM name you entered is too short.',
'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_NEW_PASSWORD' => 'The password you entered is too short.',
'TOO_SHORT_OCCUPATION' => 'The occupation you entered is too short.',
'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.', 'TOO_SHORT_PASSWORD_CONFIRM' => 'The password confirmation you entered is too short.',
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.', 'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
'TOO_SHORT_USERNAME' => 'The username you entered is too short.', 'TOO_SHORT_USERNAME' => 'The username you entered is too short.',

View file

@ -644,8 +644,6 @@ switch ($mode)
'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day), 'POSTS_DAY' => $user->lang('POST_DAY', $posts_per_day),
'POSTS_PCT' => $user->lang('POST_PCT', $percentage), 'POSTS_PCT' => $user->lang('POST_PCT', $percentage),
'OCCUPATION' => (!empty($member['user_occ'])) ? censor_text($member['user_occ']) : '',
'INTERESTS' => (!empty($member['user_interests'])) ? censor_text($member['user_interests']) : '',
'SIGNATURE' => $member['user_sig'], 'SIGNATURE' => $member['user_sig'],
'POSTS_IN_QUEUE'=> $member['posts_in_queue'], 'POSTS_IN_QUEUE'=> $member['posts_in_queue'],

View file

@ -0,0 +1,51 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration\data\v310;
class profilefield_cleanup extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return !$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_occ') &&
!$this->db_tools->sql_column_exists($this->table_prefix . 'users', 'user_interests');
}
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v310\profilefield_interests',
'\phpbb\db\migration\data\v310\profilefield_occupation',
);
}
public function update_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'users' => array(
'user_occ',
'user_interests',
),
),
);
}
public function revert_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'users' => array(
'user_occ' => array('MTEXT', ''),
'user_interests' => array('MTEXT', ''),
),
),
);
}
}

View file

@ -0,0 +1,47 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration\data\v310;
class profilefield_interests extends \phpbb\db\migration\profilefield_base_migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v310\profilefield_types',
);
}
protected $profilefield_name = 'phpbb_interests';
protected $profilefield_database_type = array('MTEXT', '');
protected $profilefield_data = array(
'field_name' => 'phpbb_interests',
'field_type' => 'profilefields.type.text',
'field_ident' => 'phpbb_interests',
'field_length' => '3|30',
'field_minlen' => '2',
'field_maxlen' => '500',
'field_novalue' => '',
'field_default_value' => '',
'field_validation' => '.*',
'field_required' => 0,
'field_show_novalue' => 0,
'field_show_on_reg' => 0,
'field_show_on_pm' => 0,
'field_show_on_vt' => 0,
'field_show_profile' => 1,
'field_hide' => 0,
'field_no_view' => 0,
'field_active' => 1,
);
protected $user_column_name = 'user_interests';
}

View file

@ -0,0 +1,47 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration\data\v310;
class profilefield_occupation extends \phpbb\db\migration\profilefield_base_migration
{
static public function depends_on()
{
return array(
'\phpbb\db\migration\data\v310\profilefield_interests',
);
}
protected $profilefield_name = 'phpbb_occupation';
protected $profilefield_database_type = array('MTEXT', '');
protected $profilefield_data = array(
'field_name' => 'phpbb_occupation',
'field_type' => 'profilefields.type.text',
'field_ident' => 'phpbb_occupation',
'field_length' => '3|30',
'field_minlen' => '2',
'field_maxlen' => '500',
'field_novalue' => '',
'field_default_value' => '',
'field_validation' => '.*',
'field_required' => 0,
'field_show_novalue' => 0,
'field_show_on_reg' => 0,
'field_show_on_pm' => 0,
'field_show_on_vt' => 0,
'field_show_profile' => 1,
'field_hide' => 0,
'field_no_view' => 0,
'field_active' => 1,
);
protected $user_column_name = 'user_occ';
}

View file

@ -0,0 +1,155 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration;
abstract class profilefield_base_migration extends \phpbb\db\migration\migration
{
protected $profilefield_name;
protected $profilefield_database_type;
protected $profilefield_data;
protected $user_column_name;
public function effectively_installed()
{
return $this->db_tools->sql_column_exists($this->table_prefix . 'profile_fields_data', 'pf_' . $this->profilefield_name);
}
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'profile_fields_data' => array(
'pf_' . $this->profilefield_name => $this->profilefield_database_type,
),
),
);
}
public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'profile_fields_data' => array(
'pf_' . $this->profilefield_name,
),
),
);
}
public function update_data()
{
return array(
array('custom', array(array($this, 'create_custom_field'))),
array('custom', array(array($this, 'convert_user_field_to_custom_field'))),
);
}
public function create_custom_field()
{
$sql = 'SELECT MAX(field_order) as max_field_order
FROM ' . PROFILE_FIELDS_TABLE;
$result = $this->db->sql_query($sql);
$max_field_order = (int) $this->db->sql_fetchfield('max_field_order');
$this->db->sql_freeresult($result);
$sql_ary = array_merge($this->profilefield_data, array(
'field_order' => $max_field_order + 1,
));
$sql = 'INSERT INTO ' . PROFILE_FIELDS_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
$this->db->sql_query($sql);
$field_id = (int) $this->db->sql_nextid();
$insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, PROFILE_LANG_TABLE);
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE;
$result = $this->db->sql_query($sql);
while ($lang_id = (int) $this->db->sql_fetchfield('lang_id'))
{
$insert_buffer->insert(array(
'field_id' => $field_id,
'lang_id' => $lang_id,
'lang_name' => strtoupper(substr($this->profilefield_name, 6)),// Remove phpbb_ from field name
'lang_explain' => '',
'lang_default_value' => '',
));
}
$this->db->sql_freeresult($result);
$insert_buffer->flush();
}
/**
* @param int $start Start of staggering step
* @return mixed int start of the next step, null if the end was reached
*/
public function convert_user_field_to_custom_field($start)
{
$insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->table_prefix . 'profile_fields_data');
$limit = 250;
$converted_users = 0;
$sql = 'SELECT user_id, ' . $this->user_column_name . '
FROM ' . $this->table_prefix . 'users
WHERE ' . $this->user_column_name . " <> ''
ORDER BY user_id";
$result = $this->db->sql_query_limit($sql, $limit, $start);
while ($row = $this->db->sql_fetchrow($result))
{
$converted_users++;
$cp_data = array(
'pf_' . $this->profilefield_name => $row[$this->user_column_name],
);
$sql = 'UPDATE ' . $this->table_prefix . 'profile_fields_data
SET ' . $this->db->sql_build_array('UPDATE', $cp_data) . '
WHERE user_id = ' . (int) $row['user_id'];
$this->db->sql_query($sql);
if (!$this->db->sql_affectedrows())
{
$cp_data['user_id'] = (int) $row['user_id'];
$cp_data = array_merge($this->get_insert_sql_array(), $cp_data);
$insert_buffer->insert($cp_data);
}
}
$this->db->sql_freeresult($result);
$insert_buffer->flush();
if ($converted_users < $limit)
{
// No more users left, we are done...
return;
}
return $start + $limit;
}
protected function get_insert_sql_array()
{
static $profile_row;
if ($profile_row === null)
{
global $phpbb_container;
$manager = $phpbb_container->get('profilefields.manager');
$profile_row = $manager->build_insert_sql_array(array());
}
return $profile_row;
}
}

View file

@ -76,6 +76,14 @@ abstract class type_base implements type_interface
return 'pf_' . $field_data['field_ident']; return 'pf_' . $field_data['field_ident'];
} }
/**
* {@inheritDoc}
*/
public function get_field_name($field_name)
{
return isset($this->user->lang[$field_name]) ? $this->user->lang[$field_name] : $field_name;
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

View file

@ -136,7 +136,7 @@ class type_bool extends type_base
if (!$field_value && $field_data['field_required']) if (!$field_value && $field_data['field_required'])
{ {
return $this->user->lang('FIELD_REQUIRED', $field_data['lang_name']); return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
} }
return false; return false;

View file

@ -159,17 +159,17 @@ class type_date extends type_base
if ((!$day || !$month || !$year) && $field_data['field_required']) if ((!$day || !$month || !$year) && $field_data['field_required'])
{ {
return $this->user->lang('FIELD_REQUIRED', $field_data['lang_name']); return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
} }
if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50) if ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50)
{ {
return $this->user->lang('FIELD_INVALID_DATE', $field_data['lang_name']); return $this->user->lang('FIELD_INVALID_DATE', $this->get_field_name($field_data['lang_name']));
} }
if (checkdate($month, $day, $year) === false) if (checkdate($month, $day, $year) === false)
{ {
return $this->user->lang('FIELD_INVALID_DATE', $field_data['lang_name']); return $this->user->lang('FIELD_INVALID_DATE', $this->get_field_name($field_data['lang_name']));
} }
return false; return false;

View file

@ -137,12 +137,12 @@ class type_dropdown extends type_base
if (!$this->lang_helper->is_set($field_data['field_id'], $field_data['lang_id'], $field_value)) if (!$this->lang_helper->is_set($field_data['field_id'], $field_data['lang_id'], $field_value))
{ {
return $this->user->lang('FIELD_INVALID_VALUE', $field_data['lang_name']); return $this->user->lang('FIELD_INVALID_VALUE', $this->get_field_name($field_data['lang_name']));
} }
if ($field_value == $field_data['field_novalue'] && $field_data['field_required']) if ($field_value == $field_data['field_novalue'] && $field_data['field_required'])
{ {
return $this->user->lang('FIELD_REQUIRED', $field_data['lang_name']); return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
} }
return false; return false;

View file

@ -126,11 +126,11 @@ class type_int extends type_base
if ($field_value < $field_data['field_minlen']) if ($field_value < $field_data['field_minlen'])
{ {
return $this->user->lang('FIELD_TOO_SMALL', (int) $row['field_minlen'], $row['lang_name']); return $this->user->lang('FIELD_TOO_SMALL', (int) $field_data['field_minlen'], $this->get_field_name($field_data['lang_name']));
} }
else if ($field_value > $field_data['field_maxlen']) else if ($field_value > $field_data['field_maxlen'])
{ {
return $this->user->lang('FIELD_TOO_LARGE', (int) $row['field_maxlen'], $row['lang_name']); return $this->user->lang('FIELD_TOO_LARGE', (int) $field_data['field_maxlen'], $this->get_field_name($field_data['lang_name']));
} }
return false; return false;

View file

@ -32,6 +32,13 @@ interface type_interface
*/ */
public function get_service_name(); public function get_service_name();
/**
* Get the name of template file for this type
*
* @return string Returns the name of the template file
*/
public function get_template_filename();
/** /**
* Get dropdown options for second step in ACP * Get dropdown options for second step in ACP
* *
@ -174,4 +181,14 @@ interface type_interface
* @return null * @return null
*/ */
public function display_options(&$template_vars, &$field_data); public function display_options(&$template_vars, &$field_data);
/**
* Return templated value/field. Possible values for $mode are:
* change == user is able to set/enter profile values; preview == just show the value
*
* @param string $mode Mode for displaying the field (preview|change)
* @param array $profile_row Array with data for this field
* @return null
*/
public function process_field_row($mode, $profile_row);
} }

View file

@ -52,16 +52,16 @@ abstract class type_string_common extends type_base
} }
else if (trim($field_value) === '' && $field_data['field_required']) else if (trim($field_value) === '' && $field_data['field_required'])
{ {
return $this->user->lang('FIELD_REQUIRED', $field_data['lang_name']); return $this->user->lang('FIELD_REQUIRED', $this->get_field_name($field_data['lang_name']));
} }
if ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen']) if ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen'])
{ {
return $this->user->lang('FIELD_TOO_SHORT', (int) $row['field_minlen'], $row['lang_name']); return $this->user->lang('FIELD_TOO_SHORT', (int) $field_data['field_minlen'], $this->get_field_name($field_data['lang_name']));
} }
else if ($field_data['field_maxlen'] && utf8_strlen($field_value) > $field_data['field_maxlen']) else if ($field_data['field_maxlen'] && utf8_strlen($field_value) > $field_data['field_maxlen'])
{ {
return $this->user->lang('FIELD_TOO_LONG', (int) $row['field_maxlen'], $row['lang_name']); return $this->user->lang('FIELD_TOO_LONG', (int) $field_data['field_maxlen'], $this->get_field_name($field_data['lang_name']));
} }
if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*') if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
@ -72,13 +72,13 @@ abstract class type_string_common extends type_base
switch ($row['field_validation']) switch ($row['field_validation'])
{ {
case '[0-9]+': case '[0-9]+':
return $this->user->lang('FIELD_INVALID_CHARS_NUMBERS_ONLY', $row['lang_name']); return $this->user->lang('FIELD_INVALID_CHARS_NUMBERS_ONLY', $this->get_field_name($field_data['lang_name']));
case '[\w]+': case '[\w]+':
return $this->user->lang('FIELD_INVALID_CHARS_ALPHA_ONLY', $row['lang_name']); return $this->user->lang('FIELD_INVALID_CHARS_ALPHA_ONLY', $this->get_field_name($field_data['lang_name']));
case '[\w_\+\. \-\[\]]+': case '[\w_\+\. \-\[\]]+':
return $this->user->lang('FIELD_INVALID_CHARS_SPACERS_ONLY', $row['lang_name']); return $this->user->lang('FIELD_INVALID_CHARS_SPACERS_ONLY', $this->get_field_name($field_data['lang_name']));
} }
} }
} }

View file

@ -29,8 +29,6 @@
<!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}{L_COLON}</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF --> <!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}{L_COLON}</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
<!-- IF LOCATION --><dt>{L_LOCATION}{L_COLON}</dt> <dd>{LOCATION}</dd><!-- ENDIF --> <!-- IF LOCATION --><dt>{L_LOCATION}{L_COLON}</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
<!-- IF AGE !== '' --><dt>{L_AGE}{L_COLON}</dt> <dd>{AGE}</dd><!-- ENDIF --> <!-- IF AGE !== '' --><dt>{L_AGE}{L_COLON}</dt> <dd>{AGE}</dd><!-- ENDIF -->
<!-- IF OCCUPATION --><dt>{L_OCCUPATION}{L_COLON}</dt> <dd>{OCCUPATION}</dd><!-- ENDIF -->
<!-- IF INTERESTS --><dt>{L_INTERESTS}{L_COLON}</dt> <dd>{INTERESTS}</dd><!-- ENDIF -->
<!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}{L_COLON}</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF --> <!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}{L_COLON}</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->
<!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields --> <!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields -->
<!-- IF S_USER_LOGGED_IN and S_ZEBRA --> <!-- IF S_USER_LOGGED_IN and S_ZEBRA -->

View file

@ -38,14 +38,6 @@
<dt><label for="location">{L_LOCATION}{L_COLON}</label></dt> <dt><label for="location">{L_LOCATION}{L_COLON}</label></dt>
<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd> <dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
</dl> </dl>
<dl>
<dt><label for="occupation">{L_OCCUPATION}{L_COLON}</label></dt>
<dd><textarea name="occupation" id="occupation" class="inputbox" rows="3" cols="30">{OCCUPATION}</textarea></dd>
</dl>
<dl>
<dt><label for="interests">{L_INTERESTS}{L_COLON}</label></dt>
<dd><textarea name="interests" id="interests" class="inputbox" rows="3" cols="30">{INTERESTS}</textarea></dd>
</dl>
<!-- IF S_BIRTHDAYS_ENABLED --> <!-- IF S_BIRTHDAYS_ENABLED -->
<dl> <dl>
<dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt> <dt><label for="bday_day">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>

View file

@ -156,14 +156,6 @@
<td><b class="genmed">{AGE}</b></td> <td><b class="genmed">{AGE}</b></td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_OCCUPATION}{L_COLON} </td>
<td><!-- IF OCCUPATION --><b class="genmed">{OCCUPATION}</b><!-- ENDIF --></td>
</tr>
<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_INTERESTS}{L_COLON} </td>
<td><!-- IF INTERESTS --><b class="genmed">{INTERESTS}</b><!-- ENDIF --></td>
</tr>
<tr> <tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_WEBSITE}{L_COLON} </td> <td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_WEBSITE}{L_COLON} </td>
<td><!-- IF U_WWW --><b><a class="genmed" href="{U_WWW}">{U_WWW}</a></b><!-- ENDIF --></td> <td><!-- IF U_WWW --><b><a class="genmed" href="{U_WWW}">{U_WWW}</a></b><!-- ENDIF --></td>

View file

@ -40,14 +40,6 @@
<td class="row1" width="35%"><b class="genmed">{L_LOCATION}{L_COLON} </b></td> <td class="row1" width="35%"><b class="genmed">{L_LOCATION}{L_COLON} </b></td>
<td class="row2"><input class="post" type="text" name="location" size="30" maxlength="100" value="{LOCATION}" /></td> <td class="row2"><input class="post" type="text" name="location" size="30" maxlength="100" value="{LOCATION}" /></td>
</tr> </tr>
<tr>
<td class="row1" width="35%"><b class="genmed">{L_OCCUPATION}{L_COLON} </b></td>
<td class="row2"><textarea class="post" name="occupation" rows="3" cols="30">{OCCUPATION}</textarea></td>
</tr>
<tr>
<td class="row1" width="35%"><b class="genmed">{L_INTERESTS}{L_COLON} </b></td>
<td class="row2"><textarea class="post" name="interests" rows="3" cols="30">{INTERESTS}</textarea></td>
</tr>
<!-- IF S_BIRTHDAYS_ENABLED --> <!-- IF S_BIRTHDAYS_ENABLED -->
<tr> <tr>
<td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td> <td class="row1" width="35%"><b class="genmed">{L_BIRTHDAY}{L_COLON} </b><br /><span class="gensmall">{L_BIRTHDAY_EXPLAIN}</span></td>

View file

@ -12,8 +12,6 @@
<column>user_login_attempts</column> <column>user_login_attempts</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>foobar</value> <value>foobar</value>
@ -26,8 +24,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -41,8 +37,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -12,8 +12,6 @@
<column>user_login_attempts</column> <column>user_login_attempts</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>foobar</value> <value>foobar</value>
@ -26,8 +24,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -41,8 +37,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -200,8 +200,6 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case
'user_msnm' => '', 'user_msnm' => '',
'user_jabber' => '', 'user_jabber' => '',
'user_website' => '', 'user_website' => '',
'user_occ' => '',
'user_interests' => '',
'user_actkey' => '', 'user_actkey' => '',
'user_newpasswd' => '', 'user_newpasswd' => '',
'user_form_salt' => '', 'user_form_salt' => '',

View file

@ -151,8 +151,6 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>4</value> <value>4</value>
@ -160,8 +158,6 @@
<value>user 1</value> <value>user 1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -126,8 +126,6 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>1</value> <value>1</value>
@ -135,8 +133,6 @@
<value>user 1</value> <value>user 1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -145,8 +141,6 @@
<value>user 2</value> <value>user 2</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -155,8 +149,6 @@
<value>user 3</value> <value>user 3</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -120,8 +120,6 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>6</value> <value>6</value>
@ -129,8 +127,6 @@
<value>user 1</value> <value>user 1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -14,16 +14,12 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>mass email</value> <value>mass email</value>
<value>mass email</value> <value>mass email</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -31,8 +27,6 @@
<value>banned</value> <value>banned</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -40,8 +34,6 @@
<value>not in group</value> <value>not in group</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_group"> <table name="phpbb_user_group">

View file

@ -5,31 +5,23 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>barfoo</value> <value>barfoo</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
<value>foobar</value> <value>foobar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>bertie</value> <value>bertie</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -42,8 +42,6 @@ class phpbb_dbal_write_sequence_test extends phpbb_database_test_case
'username_clean' => $username, 'username_clean' => $username,
'user_permissions' => '', 'user_permissions' => '',
'user_sig' => '', 'user_sig' => '',
'user_occ' => '',
'user_interests' => '',
)); ));
$db->sql_query($sql); $db->sql_query($sql);

View file

@ -15,8 +15,6 @@
<column>user_allow_viewonline</column> <column>user_allow_viewonline</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>anonymous</value> <value>anonymous</value>
@ -24,8 +22,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -34,8 +30,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -44,8 +38,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
@ -54,8 +46,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
@ -64,8 +54,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
@ -74,8 +62,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>7</value> <value>7</value>
@ -84,8 +70,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>8</value> <value>8</value>
@ -94,8 +78,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>9</value> <value>9</value>
@ -104,8 +86,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>10</value> <value>10</value>
@ -114,8 +94,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -6,8 +6,6 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<column>user_email_hash</column> <column>user_email_hash</column>
<row> <row>
<value>1</value> <value>1</value>
@ -15,8 +13,6 @@
<value>admin</value> <value>admin</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
<value>143317126117</value> <value>143317126117</value>
</row> </row>
</table> </table>

View file

@ -14,16 +14,12 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>admin</value> <value>admin</value>
<value>admin</value> <value>admin</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -31,8 +27,6 @@
<value>moderator</value> <value>moderator</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -32,8 +32,6 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>1</value> <value>1</value>
@ -42,8 +40,6 @@
<value>barfoo</value> <value>barfoo</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -53,8 +49,6 @@
<value>foobar</value> <value>foobar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -64,8 +58,6 @@
<value>bertie</value> <value>bertie</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_group"> <table name="phpbb_user_group">

View file

@ -126,16 +126,12 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>Anonymous</value> <value>Anonymous</value>
<value>Anonymous</value> <value>Anonymous</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -143,8 +139,6 @@
<value>admin</value> <value>admin</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_topics"> <table name="phpbb_topics">

View file

@ -8,8 +8,6 @@
<column>user_notify_pm</column> <column>user_notify_pm</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>1</value> <value>1</value>
@ -18,8 +16,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -29,8 +25,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -40,8 +34,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
@ -51,8 +43,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
@ -62,8 +52,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
@ -73,8 +61,6 @@
<value>1</value> <value>1</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -6,16 +6,12 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>2</value> <value>2</value>
<value>2</value> <value>2</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -23,8 +19,6 @@
<value>3</value> <value>3</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -79,55 +79,41 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>poster</value> <value>poster</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>test</value> <value>test</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>unauthorized</value> <value>unauthorized</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
<value>notified</value> <value>notified</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
<value>disabled</value> <value>disabled</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>7</value> <value>7</value>
<value>default</value> <value>default</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_notifications"> <table name="phpbb_user_notifications">

View file

@ -109,55 +109,41 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>poster</value> <value>poster</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>test</value> <value>test</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>unauthorized</value> <value>unauthorized</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
<value>notified</value> <value>notified</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
<value>disabled</value> <value>disabled</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>7</value> <value>7</value>
<value>default</value> <value>default</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_notifications"> <table name="phpbb_user_notifications">

View file

@ -51,71 +51,53 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>poster</value> <value>poster</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>test</value> <value>test</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>unauthorized-mod</value> <value>unauthorized-mod</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
<value>unauthorized-read</value> <value>unauthorized-read</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
<value>notified</value> <value>notified</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>7</value> <value>7</value>
<value>disabled</value> <value>disabled</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>8</value> <value>8</value>
<value>default</value> <value>default</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>9</value> <value>9</value>
<value>test glboal-permissions</value> <value>test glboal-permissions</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_notifications"> <table name="phpbb_user_notifications">

View file

@ -51,55 +51,41 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>poster</value> <value>poster</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>test</value> <value>test</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>unauthorized</value> <value>unauthorized</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
<value>notified</value> <value>notified</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>6</value> <value>6</value>
<value>disabled</value> <value>disabled</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>7</value> <value>7</value>
<value>default</value> <value>default</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_user_notifications"> <table name="phpbb_user_notifications">

View file

@ -8,8 +8,6 @@
<column>user_unread_privmsg</column> <column>user_unread_privmsg</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>2</value> <value>2</value>
<value>sender</value> <value>sender</value>
@ -18,8 +16,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -29,8 +25,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
@ -40,8 +34,6 @@
<value>2</value> <value>2</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>5</value> <value>5</value>
@ -51,8 +43,6 @@
<value>0</value> <value>0</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_privmsgs"> <table name="phpbb_privmsgs">

View file

@ -5,15 +5,11 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>anonymous</value> <value>anonymous</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_sessions"> <table name="phpbb_sessions">

View file

@ -5,31 +5,23 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>anonymous</value> <value>anonymous</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>foo</value> <value>foo</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>bar</value> <value>bar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_sessions"> <table name="phpbb_sessions">

View file

@ -5,31 +5,23 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value>anonymous</value> <value>anonymous</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
<value>foo</value> <value>foo</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>4</value> <value>4</value>
<value>bar</value> <value>bar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_sessions"> <table name="phpbb_sessions">

View file

@ -5,15 +5,11 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>4</value> <value>4</value>
<value>bar</value> <value>bar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
<table name="phpbb_sessions"> <table name="phpbb_sessions">

View file

@ -30,15 +30,11 @@
<column>username_clean</column> <column>username_clean</column>
<column>user_permissions</column> <column>user_permissions</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>4</value> <value>4</value>
<value>bar</value> <value>bar</value>
<value></value> <value></value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>

View file

@ -6,16 +6,12 @@
<column>username</column> <column>username</column>
<column>username_clean</column> <column>username_clean</column>
<column>user_sig</column> <column>user_sig</column>
<column>user_occ</column>
<column>user_interests</column>
<row> <row>
<value>1</value> <value>1</value>
<value></value> <value></value>
<value>Guest</value> <value>Guest</value>
<value>guest</value> <value>guest</value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>2</value> <value>2</value>
@ -23,8 +19,6 @@
<value>Admin</value> <value>Admin</value>
<value>admin</value> <value>admin</value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
<row> <row>
<value>3</value> <value>3</value>
@ -32,8 +26,6 @@
<value>Test</value> <value>Test</value>
<value>test</value> <value>test</value>
<value></value> <value></value>
<value></value>
<value></value>
</row> </row>
</table> </table>
</dataset> </dataset>