aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-06-21 16:04:13 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-06-21 16:04:13 +0000
commitb8647dc952b8992e3a09d31f27a5f3834fb4e8b5 (patch)
tree75f2510be2fb9e8863f1e5e1c519c1d79a1497a9 /phpBB
parentaa2baa7eaa51234e6807905a726c9593c7106679 (diff)
downloadforums-b8647dc952b8992e3a09d31f27a5f3834fb4e8b5.tar
forums-b8647dc952b8992e3a09d31f27a5f3834fb4e8b5.tar.gz
forums-b8647dc952b8992e3a09d31f27a5f3834fb4e8b5.tar.bz2
forums-b8647dc952b8992e3a09d31f27a5f3834fb4e8b5.tar.xz
forums-b8647dc952b8992e3a09d31f27a5f3834fb4e8b5.zip
change subject/title column length
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8666 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/develop/create_schema_files.php16
-rw-r--r--phpBB/docs/CHANGELOG.html25
-rw-r--r--phpBB/install/database_update.php43
-rw-r--r--phpBB/install/schemas/firebird_schema.sql14
-rw-r--r--phpBB/install/schemas/mssql_schema.sql14
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql2
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql14
-rw-r--r--phpBB/install/schemas/oracle_schema.sql14
-rw-r--r--phpBB/install/schemas/postgres_schema.sql14
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql2
11 files changed, 98 insertions, 62 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index cefdf404dd..5f583648bf 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -674,7 +674,7 @@ foreach ($supported_dbms as $dbms)
}
$line .= ($key_data[0] == 'INDEX') ? 'CREATE INDEX' : '';
-
+
$line .= " {$table_name}_{$key_name} ON {$table_name} (" . implode(', ', $key_data[1]) . ")\n";
$line .= "/\n";
break;
@@ -1005,7 +1005,7 @@ function get_schema_struct()
'topic_id' => array('UINT', 0),
'forum_id' => array('UINT', 0),
'save_time' => array('TIMESTAMP', 0),
- 'draft_subject' => array('XSTEXT_UNI', ''),
+ 'draft_subject' => array('STEXT_UNI', ''),
'draft_message' => array('MTEXT_UNI', ''),
),
'PRIMARY_KEY' => 'draft_id',
@@ -1067,7 +1067,7 @@ function get_schema_struct()
'forum_topics_real' => array('UINT', 0),
'forum_last_post_id' => array('UINT', 0),
'forum_last_poster_id' => array('UINT', 0),
- 'forum_last_post_subject' => array('XSTEXT_UNI', ''),
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
'forum_last_post_time' => array('TIMESTAMP', 0),
'forum_last_poster_name'=> array('VCHAR_UNI', ''),
'forum_last_poster_colour'=> array('VCHAR:6', ''),
@@ -1281,7 +1281,7 @@ function get_schema_struct()
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
'post_username' => array('VCHAR_UNI:255', ''),
- 'post_subject' => array('XSTEXT_UNI', '', 'true_sort'),
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
'post_text' => array('MTEXT_UNI', ''),
'post_checksum' => array('VCHAR:32', ''),
'post_attachment' => array('BOOL', 0),
@@ -1317,7 +1317,7 @@ function get_schema_struct()
'enable_smilies' => array('BOOL', 1),
'enable_magic_url' => array('BOOL', 1),
'enable_sig' => array('BOOL', 1),
- 'message_subject' => array('XSTEXT_UNI', ''),
+ 'message_subject' => array('STEXT_UNI', ''),
'message_text' => array('MTEXT_UNI', ''),
'message_edit_reason' => array('STEXT_UNI', ''),
'message_edit_user' => array('UINT', 0),
@@ -1536,7 +1536,7 @@ function get_schema_struct()
'KEYS' => array(
'session_time' => array('INDEX', 'session_time'),
'session_user_id' => array('INDEX', 'session_user_id'),
- 'session_forum_id' => array('INDEX', 'session_forum_id'),
+ 'session_fid' => array('INDEX', 'session_forum_id'),
),
);
@@ -1682,7 +1682,7 @@ function get_schema_struct()
'topic_attachment' => array('BOOL', 0),
'topic_approved' => array('BOOL', 1),
'topic_reported' => array('BOOL', 0),
- 'topic_title' => array('XSTEXT_UNI', '', 'true_sort'),
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
'topic_poster' => array('UINT', 0),
'topic_time' => array('TIMESTAMP', 0),
'topic_time_limit' => array('TIMESTAMP', 0),
@@ -1698,7 +1698,7 @@ function get_schema_struct()
'topic_last_poster_id' => array('UINT', 0),
'topic_last_poster_name' => array('VCHAR_UNI', ''),
'topic_last_poster_colour' => array('VCHAR:6', ''),
- 'topic_last_post_subject' => array('XSTEXT_UNI', ''),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
'topic_last_post_time' => array('TIMESTAMP', 0),
'topic_last_view_time' => array('TIMESTAMP', 0),
'topic_moved_id' => array('UINT', 0),
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 019bdb496c..8ce216d186 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -90,39 +90,42 @@
<li>[Fix] Made the compress_tar class tolerate archives that do not properly have their archived contents listed (Bug #14429 / thanks to JRSweets for his patch)</li>
<li>[Fix] Moved topics should not count towards the number of topics in a forum (Bug #14648 / thanks to Schumi for his patch)</li>
<li>[Fix] Properly check for invalid characters in MySQL DB prefixes during install (Bug #18775)</li>
- <li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
- <li>[Change] Make utf8_htmlspecialchars not pass its argument by reference (Bug #21885)</li>
<li>[Fix] Bring the PostgreSQL backup system back to working order (Bug #22385)</li>
- <li>[Change] Sort the tables at the database table backup screen</li>
<li>[Fix] Update correct theme for cached styles in style.php (Bug #25805)</li>
<li>[Fix] Also add PHPBB_INSTALLED check to download/file.php for inline avatar delivery</li>
<li>[Fix] Unable to login to some jabber server, reverted previous change (Bug #25095)</li>
<li>[Fix] Do not return BMP as valid image type for GD image manipulation (Bug #25925)</li>
- <li>[Change] For determining the maximum number of private messages in one box, use the biggest value from all groups the user is a member of (Bug #24665)</li>
<li>[Fix] Correctly determine safe mode for temp file creation in functions_upload.php (Bug #23525)</li>
<li>[Fix] Correctly sort by rank in memberlist (Bug #24435)</li>
<li>[Fix] Purge cache after database restore (Bug #24245)</li>
<li>[Fix] Correctly display subforum read/unread icons from RTL in FF3, Konqueror and Safari3+. (thanks arod-1 for the fix, related to Bug #14830)</li>
- <li>[Feature] Added optional referer validation of POST requests as additional CSRF protection.</li>
<li>[Fix] Added missing form token in acp (thanks NBBN).</li>
- <li>[Feature] Added optional stricter upload validation to avoid mime sniffing in addition to the safeguards provided by file.php. (thanks to Nicolas Grekas for compiling the list).</li>
<li>[Fix] Do not remove whitespace in front of url containing the boards url and no relative path appended (Bug #27355)</li>
- <li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
- <li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
- <li>[Feature] Added ACP logout to reset an admin session.</li>
<li>[Fix] reset forum notifications in viewtopic (Bug #28025)</li>
<li>[Fix] corrected link for searching post author's other posts (Bug #26455)</li>
<li>[Fix] HTTP Authentication supports UTF-8 usernames now (Bug #21135)</li>
<li>[Fix] Topic searches by author no longer return invalid results (Bug #11777)</li>
- <li>[Change] Don't allow redirects to different domains. (thanks nookieman)</li>
<li>[Fix] Delete drafts and bookmarks when deleting an user. (#27585, thanks Schumi for the fix)</li>
<li>[Fix] Set last_post_subject for new topics. (#23945)</li>
<li>[Fix] Allow moving posts to invisible forums. (#27325)</li>
<li>[Fix] Don't allow promoting unapproved group members (#16124)</li>
<li>[Fix] Correctly fetch server name if using non-standard port (#27395)</li>
<li>[Fix] Regular expression for email matching in posts will no longer die on long words.</li>
- <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
<li>[Fix] Do not display ban message if direct call to cron. (thanks Dog Cow for reporting)</li>
+ <li>[Fix] Correctly display double-colon on special conditions within highlighted php source (Bug #26795)</li>
+ <li>[Fix] Increase storage capacity of titles/subjects due to specialchared content (Bug #25235)</li>
+ <li>[Change] Adjust truncate_string() to be able to adjust the maximum storage length.</li>
+ <li>[Change] Generalize load check (Bug #21255 / thanks to Xipher)</li>
+ <li>[Change] Make utf8_htmlspecialchars not pass its argument by reference (Bug #21885)</li>
+ <li>[Change] Sort the tables at the database table backup screen</li>
+ <li>[Change] For determining the maximum number of private messages in one box, use the biggest value from all groups the user is a member of (Bug #24665)</li>
+ <li>[Change] Show email ban reason on registration. Additionally allow custom errors properly returned if using validate_data(). (Bug #26885)</li>
+ <li>[Change] Don't allow redirects to different domains. (thanks nookieman)</li>
+ <li>[Feature] Added optional referer validation of POST requests as additional CSRF protection.</li>
+ <li>[Feature] Added optional stricter upload validation to avoid mime sniffing in addition to the safeguards provided by file.php. (thanks to Nicolas Grekas for compiling the list).</li>
+ <li>[Feature] Streamlined banning via the MCP by adding a ban link to the user profile. Also pre-fills ban fields as far as possible.</li>
+ <li>[Feature] Added ACP logout to reset an admin session.</li>
+ <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
<a name="v300"></a><h3>1.ii. Changes since 3.0.0</h3>
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 184331976b..0805a2b273 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.2-RC1';
+$updates_to_version = '3.0.2-RC2';
// Return if we "just include it" to find out for which version the database update is responsible for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
@@ -500,8 +500,37 @@ $database_update_info = array(
'3.0.1-RC1' => array(),
// No changes from 3.0.1 to 3.0.2-RC1
'3.0.1' => array(),
-// uncomment once RC1 out - no changes from 3.0.2-RC1 to 3.0.2
-// '3.0.2-RC1' => array(),
+ // Changes from 3.0.2-RC1 to 3.0.2-RC2
+ '3.0.2-RC1' => array(
+ 'change_columns' => array(
+ DRAFTS_TABLE => array(
+ 'draft_subject' => array('STEXT_UNI', ''),
+ ),
+ FORUMS_TABLE => array(
+ 'forum_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ POSTS_TABLE => array(
+ 'post_subject' => array('STEXT_UNI', '', 'true_sort'),
+ ),
+ PRIVMSGS_TABLE => array(
+ 'message_subject' => array('STEXT_UNI', ''),
+ ),
+ TOPICS_TABLE => array(
+ 'topic_title' => array('STEXT_UNI', '', 'true_sort'),
+ 'topic_last_post_subject' => array('STEXT_UNI', ''),
+ ),
+ ),
+ 'drop_keys' => array(
+ SESSIONS_TABLE => array('session_forum_id'),
+ ),
+ 'add_index' => array(
+ SESSIONS_TABLE => array(
+ 'session_fid' => array('session_forum_id'),
+ ),
+ ),
+ ),
+ // uncomment once RC2 out - no changes from 3.0.2-RC2 to 3.0.2
+// '3.0.2-RC2' => array(),
);
// Determine mapping database type
@@ -1784,8 +1813,12 @@ function change_database_data(&$no_updates, $version)
$no_updates = false;
break;
- // uncomment once RC1 out - no changes from 3.0.2-RC1 to 3.0.2
-// case '3.0.2-RC1':
+ // No changes from 3.0.2-RC1 to 3.0.2-RC2
+ case '3.0.2-RC1':
+ break;
+
+ // uncomment once RC2 out - no changes from 3.0.2-RC2 to 3.0.2
+// case '3.0.2-RC2':
// break;
}
}
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 55ab4c18e1..1d2ec37eaa 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -261,7 +261,7 @@ CREATE TABLE phpbb_drafts (
topic_id INTEGER DEFAULT 0 NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
save_time INTEGER DEFAULT 0 NOT NULL,
- draft_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
@@ -357,7 +357,7 @@ CREATE TABLE phpbb_forums (
forum_topics_real INTEGER DEFAULT 0 NOT NULL,
forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
- forum_last_post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
@@ -625,7 +625,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
enable_sig INTEGER DEFAULT 1 NOT NULL,
post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
- post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
post_attachment INTEGER DEFAULT 0 NOT NULL,
@@ -671,7 +671,7 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies INTEGER DEFAULT 1 NOT NULL,
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
enable_sig INTEGER DEFAULT 1 NOT NULL,
- message_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
message_edit_user INTEGER DEFAULT 0 NOT NULL,
@@ -977,7 +977,7 @@ ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);;
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);;
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
-CREATE INDEX phpbb_sessions_session_forum_id ON phpbb_sessions(session_forum_id);;
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);;
# Table: 'phpbb_sessions_keys'
CREATE TABLE phpbb_sessions_keys (
@@ -1189,7 +1189,7 @@ CREATE TABLE phpbb_topics (
topic_attachment INTEGER DEFAULT 0 NOT NULL,
topic_approved INTEGER DEFAULT 1 NOT NULL,
topic_reported INTEGER DEFAULT 0 NOT NULL,
- topic_title VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
topic_poster INTEGER DEFAULT 0 NOT NULL,
topic_time INTEGER DEFAULT 0 NOT NULL,
topic_time_limit INTEGER DEFAULT 0 NOT NULL,
@@ -1205,7 +1205,7 @@ CREATE TABLE phpbb_topics (
topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
- topic_last_post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
topic_moved_id INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index a6519bd69e..6890148243 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -344,7 +344,7 @@ CREATE TABLE [phpbb_drafts] (
[topic_id] [int] DEFAULT (0) NOT NULL ,
[forum_id] [int] DEFAULT (0) NOT NULL ,
[save_time] [int] DEFAULT (0) NOT NULL ,
- [draft_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[draft_message] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
@@ -433,7 +433,7 @@ CREATE TABLE [phpbb_forums] (
[forum_topics_real] [int] DEFAULT (0) NOT NULL ,
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
- [forum_last_post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
[forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
@@ -760,7 +760,7 @@ CREATE TABLE [phpbb_posts] (
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
[post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
- [post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[post_text] [text] DEFAULT ('') NOT NULL ,
[post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
[post_attachment] [int] DEFAULT (0) NOT NULL ,
@@ -815,7 +815,7 @@ CREATE TABLE [phpbb_privmsgs] (
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
[enable_sig] [int] DEFAULT (1) NOT NULL ,
- [message_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [message_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[message_text] [text] DEFAULT ('') NOT NULL ,
[message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
[message_edit_user] [int] DEFAULT (0) NOT NULL ,
@@ -1180,7 +1180,7 @@ GO
CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
GO
-CREATE INDEX [session_forum_id] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
+CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
GO
@@ -1411,7 +1411,7 @@ CREATE TABLE [phpbb_topics] (
[topic_attachment] [int] DEFAULT (0) NOT NULL ,
[topic_approved] [int] DEFAULT (1) NOT NULL ,
[topic_reported] [int] DEFAULT (0) NOT NULL ,
- [topic_title] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
[topic_poster] [int] DEFAULT (0) NOT NULL ,
[topic_time] [int] DEFAULT (0) NOT NULL ,
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
@@ -1427,7 +1427,7 @@ CREATE TABLE [phpbb_topics] (
[topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
[topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
[topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
- [topic_last_post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
[topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
[topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
[topic_moved_id] [int] DEFAULT (0) NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 266b7707d4..7e4ddeb3cd 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -674,7 +674,7 @@ CREATE TABLE phpbb_sessions (
PRIMARY KEY (session_id),
KEY session_time (session_time),
KEY session_user_id (session_user_id),
- KEY session_forum_id (session_forum_id)
+ KEY session_fid (session_forum_id)
);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index bdce42b895..ba51ea2102 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -183,7 +183,7 @@ CREATE TABLE phpbb_drafts (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
- draft_subject varchar(100) DEFAULT '' NOT NULL,
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
draft_message mediumtext NOT NULL,
PRIMARY KEY (draft_id),
KEY save_time (save_time)
@@ -243,7 +243,7 @@ CREATE TABLE phpbb_forums (
forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_last_post_subject varchar(100) DEFAULT '' NOT NULL,
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
@@ -437,7 +437,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_username varchar(255) DEFAULT '' NOT NULL,
- post_subject varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
post_text mediumtext NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
@@ -471,7 +471,7 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- message_subject varchar(100) DEFAULT '' NOT NULL,
+ message_subject varchar(255) DEFAULT '' NOT NULL,
message_text mediumtext NOT NULL,
message_edit_reason varchar(255) DEFAULT '' NOT NULL,
message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -674,7 +674,7 @@ CREATE TABLE phpbb_sessions (
PRIMARY KEY (session_id),
KEY session_time (session_time),
KEY session_user_id (session_user_id),
- KEY session_forum_id (session_forum_id)
+ KEY session_fid (session_forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
@@ -803,7 +803,7 @@ CREATE TABLE phpbb_topics (
topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- topic_title varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
@@ -819,7 +819,7 @@ CREATE TABLE phpbb_topics (
topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_subject varchar(100) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index b87fe4527a..19f09bcebd 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -382,7 +382,7 @@ CREATE TABLE phpbb_drafts (
topic_id number(8) DEFAULT '0' NOT NULL,
forum_id number(8) DEFAULT '0' NOT NULL,
save_time number(11) DEFAULT '0' NOT NULL,
- draft_subject varchar2(300) DEFAULT '' ,
+ draft_subject varchar2(765) DEFAULT '' ,
draft_message clob DEFAULT '' ,
CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
)
@@ -500,7 +500,7 @@ CREATE TABLE phpbb_forums (
forum_topics_real number(8) DEFAULT '0' NOT NULL,
forum_last_post_id number(8) DEFAULT '0' NOT NULL,
forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
- forum_last_post_subject varchar2(300) DEFAULT '' ,
+ forum_last_post_subject varchar2(765) DEFAULT '' ,
forum_last_post_time number(11) DEFAULT '0' NOT NULL,
forum_last_poster_name varchar2(765) DEFAULT '' ,
forum_last_poster_colour varchar2(6) DEFAULT '' ,
@@ -849,7 +849,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url number(1) DEFAULT '1' NOT NULL,
enable_sig number(1) DEFAULT '1' NOT NULL,
post_username varchar2(765) DEFAULT '' ,
- post_subject varchar2(300) DEFAULT '' ,
+ post_subject varchar2(765) DEFAULT '' ,
post_text clob DEFAULT '' ,
post_checksum varchar2(32) DEFAULT '' ,
post_attachment number(1) DEFAULT '0' NOT NULL,
@@ -908,7 +908,7 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies number(1) DEFAULT '1' NOT NULL,
enable_magic_url number(1) DEFAULT '1' NOT NULL,
enable_sig number(1) DEFAULT '1' NOT NULL,
- message_subject varchar2(300) DEFAULT '' ,
+ message_subject varchar2(765) DEFAULT '' ,
message_text clob DEFAULT '' ,
message_edit_reason varchar2(765) DEFAULT '' ,
message_edit_user number(8) DEFAULT '0' NOT NULL,
@@ -1300,7 +1300,7 @@ CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
/
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
/
-CREATE INDEX phpbb_sessions_session_forum_id ON phpbb_sessions (session_forum_id)
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
/
/*
@@ -1577,7 +1577,7 @@ CREATE TABLE phpbb_topics (
topic_attachment number(1) DEFAULT '0' NOT NULL,
topic_approved number(1) DEFAULT '1' NOT NULL,
topic_reported number(1) DEFAULT '0' NOT NULL,
- topic_title varchar2(300) DEFAULT '' ,
+ topic_title varchar2(765) DEFAULT '' ,
topic_poster number(8) DEFAULT '0' NOT NULL,
topic_time number(11) DEFAULT '0' NOT NULL,
topic_time_limit number(11) DEFAULT '0' NOT NULL,
@@ -1593,7 +1593,7 @@ CREATE TABLE phpbb_topics (
topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
topic_last_poster_name varchar2(765) DEFAULT '' ,
topic_last_poster_colour varchar2(6) DEFAULT '' ,
- topic_last_post_subject varchar2(300) DEFAULT '' ,
+ topic_last_post_subject varchar2(765) DEFAULT '' ,
topic_last_post_time number(11) DEFAULT '0' NOT NULL,
topic_last_view_time number(11) DEFAULT '0' NOT NULL,
topic_moved_id number(8) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 84e2845963..f11f1b4d35 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -304,7 +304,7 @@ CREATE TABLE phpbb_drafts (
topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0),
- draft_subject varchar(100) DEFAULT '' NOT NULL,
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
draft_message TEXT DEFAULT '' NOT NULL,
PRIMARY KEY (draft_id)
);
@@ -376,7 +376,7 @@ CREATE TABLE phpbb_forums (
forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0),
forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
- forum_last_post_subject varchar(100) DEFAULT '' NOT NULL,
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0),
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
@@ -606,7 +606,7 @@ CREATE TABLE phpbb_posts (
enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
post_username varchar(255) DEFAULT '' NOT NULL,
- post_subject varchar(100) DEFAULT '' NOT NULL,
+ post_subject varchar(255) DEFAULT '' NOT NULL,
post_text TEXT DEFAULT '' NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0),
@@ -644,7 +644,7 @@ CREATE TABLE phpbb_privmsgs (
enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
- message_subject varchar(100) DEFAULT '' NOT NULL,
+ message_subject varchar(255) DEFAULT '' NOT NULL,
message_text TEXT DEFAULT '' NOT NULL,
message_edit_reason varchar(255) DEFAULT '' NOT NULL,
message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0),
@@ -891,7 +891,7 @@ CREATE TABLE phpbb_sessions (
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
-CREATE INDEX phpbb_sessions_session_forum_id ON phpbb_sessions (session_forum_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
/*
Table: 'phpbb_sessions_keys'
@@ -1054,7 +1054,7 @@ CREATE TABLE phpbb_topics (
topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0),
topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0),
topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0),
- topic_title varchar(100) DEFAULT '' NOT NULL,
+ topic_title varchar(255) DEFAULT '' NOT NULL,
topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0),
topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
@@ -1070,7 +1070,7 @@ CREATE TABLE phpbb_topics (
topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0),
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
- topic_last_post_subject varchar(100) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0),
topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0),
topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0),
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 3dfe8ae0d9..b9b4141aab 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -214,7 +214,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.2-RC1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.2-RC2');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index f7b5b47081..d7ac93f672 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -654,7 +654,7 @@ CREATE TABLE phpbb_sessions (
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
-CREATE INDEX phpbb_sessions_session_forum_id ON phpbb_sessions (session_forum_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
# Table: 'phpbb_sessions_keys'
CREATE TABLE phpbb_sessions_keys (
an> { mntpoint => "/boot", size => 10 << 11, type => 0x83, maxsize => 30 << 11 }, { mntpoint => "swap", size => 64 << 11, type => 0x82, ratio => 1, maxsize => 250 << 11 }, { mntpoint => "/", size => 150 << 11, type => 0x83, ratio => 1, maxsize => 300 << 11 }, { mntpoint => "/usr", size => 300 << 11, type => 0x83, ratio => 4, maxsize =>1500 << 11 }, { mntpoint => "/home", size => 100 << 11, type => 0x83, ratio => 5 }, ], server => [ { mntpoint => "/boot", size => 10 << 11, type => 0x83, maxsize => 30 << 11 }, { mntpoint => "swap", size => 64 << 11, type => 0x82, ratio => 2, maxsize => 400 << 11 }, { mntpoint => "/", size => 150 << 11, type => 0x83, ratio => 1, maxsize => 250 << 11 }, { mntpoint => "/usr", size => 300 << 11, type => 0x83, ratio => 3, maxsize =>1500 << 11 }, { mntpoint => "/var", size => 100 << 11, type => 0x83, ratio => 4 }, { mntpoint => "/home", size => 100 << 11, type => 0x83, ratio => 5 }, ], ), ); #-####################################################################################### #-$O #-the big struct which contain, well everything (globals + the interactive methods ...) #-if you want to do a kickstart file, you just have to add all the required fields (see for example #-the variable $default) #-####################################################################################### $o = $::o = { # bootloader => { linear => 0, message => 1, timeout => 5, restricted => 0 }, autoSCSI => 0, mkbootdisk => 1, #- no mkbootdisk if 0 or undef, find a floppy with 1, or fd1 #- packages => [ qw() ], partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0, autoformat => 0 }, #-, readonly => 0 }, #- security => 2, shells => [ map { "/bin/$_" } qw(bash tcsh zsh ash ksh) ], authentication => { md5 => 1, shadow => 1 }, lang => 'en', isUpgrade => 0, toRemove => [], toSave => [], #- simple_themes => 1, #- installClass => "normal", timezone => { #- timezone => "Europe/Paris", #- UTC => 1, }, printer => { want => 0, complete => 0, str_type => $printer::printer_type_default, QUEUE => "lp", SPOOLDIR => "/var/spool/lpd/lp", DBENTRY => "PostScript", PAPERSIZE => "letter", CRLF => 0, AUTOSENDEOF => 1, DEVICE => "/dev/lp0", REMOTEHOST => "", REMOTEQUEUE => "", NCPHOST => "", #-"printerservername", NCPQUEUE => "", #-"queuename", NCPUSER => "", #-"user", NCPPASSWD => "", #-"pass", SMBHOST => "", #-"hostname", SMBHOSTIP => "", #-"1.2.3.4", SMBSHARE => "", #-"printername", SMBUSER => "", #-"user", SMBPASSWD => "", #-"passowrd", SMBWORKGROUP => "", #-"AS3", }, #- superuser => { password => 'a', shell => '/bin/bash', realname => 'God' }, #- user => { name => 'foo', password => 'bar', home => '/home/foo', shell => '/bin/bash', realname => 'really, it is foo' }, #- keyboard => 'de', #- display => "192.168.1.19:1", steps => \%installSteps, orderedSteps => \@orderedInstallSteps, base => [ qw(basesystem sed initscripts console-tools utempter ldconfig chkconfig ntsysv setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep gzip hdparm info initscripts kernel less ldconfig logrotate losetup man mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash ash setserial shadow-utils sh-utils stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which perl-base msec) ], base_i386 => [ "lilo", "mkbootdisk", "isapnptools" ], base_alpha => [ "aboot", "isapnptools" ], base_sparc => [ "silo", "mkbootdisk" ], #- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm #- intf => [ { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } ], #-step : the current one #-prefix #-mouse #-keyboard #-netc #-autoSCSI drives hds fstab #-methods #-packages compss #-printer haveone entry(cf printer.pm) }; #-###################################################################################### #- Steps Functions #- each step function are called with two arguments : clicked(because if you are a #- beginner you can force the the step) and the entered number #-###################################################################################### #------------------------------------------------------------------------------ sub selectLanguage { $o->selectLanguage($_[1] == 1); addToBeDone { lang::write($o->{prefix}); keyboard::write($o->{prefix}, $o->{keyboard}); } 'doInstallStep' unless $::g_auto_install; } #------------------------------------------------------------------------------ sub selectMouse { my ($clicked) = $_[0]; add2hash($o->{mouse} ||= {}, { mouse::read($o->{prefix}) }) if $o->{isUpgrade} && !$clicked; $o->selectMouse($clicked); addToBeDone { mouse::write($o->{prefix}, $o->{mouse}) } 'doInstallStep'; } #------------------------------------------------------------------------------ sub selectKeyboard { my ($clicked) = $_[0]; return unless $o->{isUpgrade} || !$::beginner || $clicked; $o->{keyboard} = (keyboard::read($o->{prefix}))[0] if $o->{isUpgrade} && !$clicked && $o->{keyboard_unsafe}; $o->selectKeyboard if !$::beginner || $clicked; #- if we go back to the selectKeyboard, you must rewrite addToBeDone { lang::write($o->{prefix}); keyboard::write($o->{prefix}, $o->{keyboard}); } 'doInstallStep' unless $::g_auto_install; } #------------------------------------------------------------------------------ sub selectPath { $o->selectPath; install_any::searchAndMount4Upgrade($o) if $o->{isUpgrade}; } #------------------------------------------------------------------------------ sub selectInstallClass { $o->selectInstallClass(@install_classes); $o->{partitions} ||= [ grep { arch() =~ /i386/ && $_->{mntpoint} ne "/boot" } @{$suggestedPartitions{$o->{installClass}}} ]; if ($o->{steps}{choosePackages}{entered} >= 1 && !$o->{steps}{doInstallStep}{done}) { $o->setPackages(\@install_classes); $o->selectPackagesToUpgrade() if $o->{isUpgrade}; } } #------------------------------------------------------------------------------ sub setupSCSI { my ($clicked) = $_[0]; $o->{autoSCSI} ||= $::beginner; $o->setupSCSI($o->{autoSCSI} && !$clicked, $clicked); } #------------------------------------------------------------------------------ sub partitionDisks { return $o->{fstab} = [ { device => "loop7", type => 0x83, size => 2048 * cat_('/dos/lnx4win/size.txt'), mntpoint => "/", isFormatted => 1, isMounted => 1 }, { device => "/initrd/dos/lnx4win/swapfile", type => 0x82, mntpoint => "swap", isFormatted => 1, isMounted => 1 }, ] if $o->{lnx4win}; return if $o->{isUpgrade}; ($o->{hd_dev}) = cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/hdimage|; $::o->{steps}{formatPartitions}{done} = 0; eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing; my $ok = fsedit::get_root($o->{fstab} || []) ? 1 : install_any::getHds($o); my $auto = $ok && !$o->{partitioning}{readonly} && ($o->{partitioning}{auto_allocate} || $::beginner && fsedit::get_fstab(@{$o->{hds}}) < 3); eval { fsedit::auto_allocate($o->{hds}, $o->{partitions}) } if $auto; if ($auto && fsedit::get_root_($o->{hds}) && $_[1] == 1) { #- we have a root partition, that's enough :) $o->install_steps::doPartitionDisks($o->{hds}); } elsif ($o->{partitioning}{readonly}) { $o->ask_mntpoint_s($o->{fstab}); } else { $o->doPartitionDisks($o->{hds}, $o->{raid} ||= {}); } unless ($::testing) { $o->rebootNeeded foreach grep { $_->{rebootNeeded} } @{$o->{hds}}; } $o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}, $o->{raid}) ]; fsedit::get_root($o->{fstab}) or die _("You must have a root partition. For this, create a partition (or click on an existing one). Then choose action ``Mount point'' and set it to `/'"); cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/rhimage nfs| && !grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{manualFstab} || []} and push @{$o->{manualFstab}}, { type => "nfs", mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,rsize=8192,wsize=8192" }; } sub formatPartitions { unless ($o->{lnx4win} || $o->{isUpgrade}) { $o->choosePartitionsToFormat($o->{fstab}); unless ($::testing) { $o->formatPartitions(@{$o->{fstab}}); fs::mount_all([ grep { isSwap($_) } @{$o->{fstab}} ], $o->{prefix}); die _("Not enough swap to fulfill installation, please add some") if availableMemory < 40 * 1024; fs::mount_all([ grep { isExt2($_) } @{$o->{fstab}} ], $o->{prefix}, $o->{hd_dev}); } eval { $o = $::o = install_any::loadO($o) } if $_[1] == 1; } mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/profile.d etc/sysconfig etc/sysconfig/console etc/sysconfig/network-scripts home mnt tmp var var/tmp var/lib var/lib/rpm); mkdir "$o->{prefix}/$_", 0700 foreach qw(root); raid::prepare_prefixed($o->{raid}, $o->{prefix}); #-noatime option for ext2 fs on laptops (do not wake up the hd) #- Do not update inode access times on this #- file system (e.g, for faster access on the #- news spool to speed up news servers). $o->{pcmcia} and $_->{options} = "noatime" foreach grep { isExt2($_) } @{$o->{fstab}}; } #------------------------------------------------------------------------------ sub choosePackages { require pkgs; $o->setPackages if $_[1] == 1; $o->selectPackagesToUpgrade($o) if $o->{isUpgrade} && $_[1] == 1; if ($_[1] > 1 || !$o->{isUpgrade} || $::expert) { if ($_[1] == 1) { $o->{compssUsersChoice}{$_} = 1 foreach @{$o->{compssUsersSorted}}, 'Miscellaneous'; $o->{compssUsersChoice}{KDE} = 0 if $o->{lang} =~ /ja|el|ko|th|vi|zh/; #- gnome handles much this fonts much better } $o->choosePackages($o->{packages}, $o->{compss}, $o->{compssUsers}, $o->{compssUsersSorted}, $_[1] == 1); pkgs::unselect($o->{packages}, $o->{packages}{kdesu}) if $o->{packages}{kdesu} && $o->{security} > 3; $o->{packages}{$_}{selected} = 1 foreach @{$o->{base}}; #- already done by selectPackagesToUpgrade. } } #------------------------------------------------------------------------------ sub doInstallStep { $o->readBootloaderConfigBeforeInstall if $_[1] == 1; $o->beforeInstallPackages; $o->installPackages($o->{packages}); $o->afterInstallPackages; } #------------------------------------------------------------------------------ sub miscellaneous { $o->miscellaneous($_[0]); addToBeDone { setVarsInSh("$o->{prefix}/etc/sysconfig/system", { HDPARM => $o->{miscellaneous}{HDPARM}, CLASS => $::expert && "expert" || $::beginner && "beginner" || "medium", TYPE => $o->{installClass}, SECURITY => $o->{security}, }); install_any::fsck_option(); local $ENV{LILO_PASSWORD} = $o->{lilo}{password}; run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security}); } 'doInstallStep'; } #------------------------------------------------------------------------------ sub configureNetwork { my ($clicked) = @_; if ($o->{isUpgrade} && !$clicked) { $o->{netc} or $o->{netc} = {}; add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network"; add2hash($o->{netc}, network::read_resolv_conf("$o->{prefix}/etc/resolv.conf")) if -r "$o->{prefix}/etc/resolv.conf"; foreach (all("$o->{prefix}/etc/sysconfig/network-scripts")) { if (/ifcfg-(\w+)/) { push @{$o->{intf}}, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") }; } } } $o->configureNetwork($_[1] == 1); } #------------------------------------------------------------------------------ sub installCrypto { $o->installCrypto } #------------------------------------------------------------------------------ sub configureTimezone { my ($clicked) = @_; my $f = "$o->{prefix}/etc/sysconfig/clock"; require timezone; if ($o->{isUpgrade} && -r $f && -s $f > 0) { return if $_[1] == 1 && !$clicked; #- can't be done in install cuz' timeconfig %post creates funny things add2hash($o->{timezone}, { timezone::read($f) }); } $o->{timezone}{UTC} = !$::beginner && !grep { isFat($_) } @{$o->{fstab}} unless exists $o->{timezone}{UTC}; $o->timeConfig($f, $clicked); } #------------------------------------------------------------------------------ sub configureServices { return if $o->{lnx4win}; $o->servicesConfig; } #------------------------------------------------------------------------------ sub configurePrinter { $o->printerConfig } #------------------------------------------------------------------------------ sub setRootPassword { return if $o->{isUpgrade}; $o->setRootPassword($_[0]); addToBeDone { install_any::setAuthentication() } 'doInstallStep'; } #------------------------------------------------------------------------------ sub addUser { return if $o->{isUpgrade}; $o->addUser($_[0]); install_any::setAuthentication(); } #------------------------------------------------------------------------------ #-PADTODO sub createBootdisk { modules::write_conf("$o->{prefix}/etc/conf.modules", 'append'); return if $o->{lnx4win}; $o->createBootdisk($_[1] == 1); } #------------------------------------------------------------------------------ sub setupBootloader { return if $o->{lnx4win} || $::g_auto_install; $o->setupBootloaderBefore if $_[1] == 1; $o->setupBootloader($_[1] - 1); } #------------------------------------------------------------------------------ sub configureX { my ($clicked) = $_[0]; #- done here and also at the end of install2.pm, just in case... fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount}); modules::write_conf("$o->{prefix}/etc/conf.modules", 'append'); $o->setupXfree if $o->{packages}{XFree86}{installed} || $clicked; } #------------------------------------------------------------------------------ sub exitInstall { $o->exitInstall(getNextStep() eq "exitInstall") } #-###################################################################################### #- MAIN #-###################################################################################### sub main { $SIG{__DIE__} = sub { chomp(my $err = $_[0]); log::l("warning: $err") }; $SIG{SEGV} = sub { my $msg = "Seems like memory is missing as the install crashes"; print "$msg\n"; log::l($msg) }; $::beginner = $::expert = $::g_auto_install = 0; my ($cfg, $patch); my %cmdline; map { my ($n, $v) = split '='; $cmdline{$n} = $v || 1; } split ' ', cat_("/proc/cmdline"); my $opt; foreach (@_) { if (/^--?(.*)/) { $cmdline{$opt} = 1 if $opt; $opt = $1; } else { $cmdline{$opt} = $_ if $opt; $opt = ''; } } $cmdline{$opt} = 1 if $opt; map_each { my ($n, $v) = @_; my $f = ${{ method => sub { $o->{method} = $v }, pcmcia => sub { $o->{pcmcia} = $v }, vga => sub { $o->{vga16} = $v }, step => sub { $o->{steps}{first} = $v }, expert => sub { $::expert = 1 }, beginner => sub { $::beginner = 1 }, class => sub { $o->{installClass} = $v }, lnx4win => sub { $o->{lnx4win} = 1 }, readonly => sub { $o->{partitioning}{readonly} = $v ne "0" }, display => sub { $o->{display} = $v }, security => sub { $o->{security} = $v }, test => sub { $::testing = 1 }, patch => sub { $patch = 1 }, defcfg => sub { $cfg = $v }, newt => sub { $o->{interactive} = "newt" }, text => sub { $o->{interactive} = "newt" }, stdio => sub { $o->{interactive} = "stdio"}, ks => sub { $::auto_install = 1 }, kickstart => sub { $::auto_install = 1 }, auto_install => sub { $::auto_install = 1 }, simple_themes => sub { $o->{simple_themes} = 1 }, alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 }, g_auto_install => sub { $::testing = $::g_auto_install = 1; $o->{partitioning}{auto_allocate} = 1 }, nomouseprobe => sub { $o->{nomouseprobe} = $v }, }}{lc $n}; &$f if $f; } %cmdline; if ($::g_auto_install) { (my $root = `/bin/pwd`) =~ s|(/[^/]*){5}$||; symlinkf $root, "/tmp/rhimage" or die "unable to create link /tmp/rhimage"; } unlink "/sbin/insmod" unless $::testing; unlink "/modules/pcmcia_core.o" unless $::testing; #- always use module from archive. unlink "/modules/i82365.o" unless $::testing; unlink "/modules/tcic.o" unless $::testing; unlink "/modules/ds.o" unless $::testing; print STDERR "in second stage install\n"; log::openLog(($::testing || $o->{localInstall}) && 'debug.log'); log::l("second stage install running"); log::ld("extra log messages are enabled"); eval { spawnShell() }; $o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt"; $o->{root} = $::testing ? "/tmp/root-perl-install" : "/"; mkdir $o->{prefix}, 0755; mkdir $o->{root}, 0755; #- make sure we don't pick up any gunk from the outside world $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin" unless $::g_auto_install; $o->{interactive} ||= 'gtk'; if ($o->{interactive} eq "gtk" && availableMemory < 22 * 1024) { log::l("switching to newt install cuz not enough memory"); $o->{interactive} = "newt"; } if ($::auto_install) { require install_steps_auto_install; eval { $o = $::o = install_any::loadO($o, "floppy") }; if ($@) { log::l("error using auto_install, continuing"); undef $::auto_install; } } unless ($::auto_install) { $o->{interactive} ||= 'gtk'; require"install_steps_$o->{interactive}.pm"; } eval { $o = $::o = install_any::loadO($o, "patch") } if $patch; eval { $o = $::o = install_any::loadO($o, $cfg) } if $cfg; $o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt"; mkdir $o->{prefix}, 0755; #- #- needed very early to switch bad cards in VGA16 #- foreach (pci_probing::main::probe('')) { #- log::l("Here: $_->[0]"); #- $_->[0] =~ /i740|ViRGE/ and add2hash_($o, { vga16 => 1 }), log::l("switching to VGA16 as bad graphic card"); #- } #- needed very early for install_steps_gtk eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse}; $::o = $o = $::auto_install ? install_steps_auto_install->new($o) : $o->{interactive} eq "stdio" ? install_steps_stdio->new($o) : $o->{interactive} eq "newt" ? install_steps_newt->new($o) : $o->{interactive} eq "gtk" ? install_steps_gtk->new($o) : die "unknown install type"; $o->{netc} = network::read_conf("/tmp/network"); if (my ($file) = glob_('/tmp/ifcfg-*')) { log::l("found network config file $file"); my $l = network::read_interface_conf($file); add2hash(network::findIntf($o->{intf} ||= [], $l->{DEVICE}), $l); } modules::unload($_) foreach qw(vfat msdos fat); modules::load_deps("/modules/modules.dep"); modules::read_stage1_conf("/tmp/conf.modules"); modules::read_already_loaded(); eval { modules::load($_) } foreach qw(ide-probe ide-disk sd_mod af_packet); install_any::lnx4win_preinstall() if $o->{lnx4win}; #-the main cycle my $clicked = 0; MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) { $o->{steps}{$o->{step}}{entered}++; $o->enteringStep($o->{step}); eval { &{$install2::{$o->{step}}}($clicked, $o->{steps}{$o->{step}}{entered}); }; $o->kill_action; $clicked = 0; while ($@) { local $_ = $@; $o->kill_action; /^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo MAIN; /^theme_changed$/ and redo MAIN; unless (/^already displayed/ || /^ask_from_list cancel/) { eval { $o->errorInStep($_) }; $@ and next; } $o->{step} = $o->{steps}{$o->{step}}{onError}; next MAIN unless $o->{steps}{$o->{step}}{reachable}; #- sanity check: avoid a step not reachable on error. redo MAIN; } $o->{steps}{$o->{step}}{done} = 1; $o->leavingStep($o->{step}); last if $o->{step} eq 'exitInstall'; } fs::write($o->{prefix}, $o->{fstab}, $o->{manualFstab}, $o->{useSupermount}); modules::write_conf("$o->{prefix}/etc/conf.modules", 'append'); install_any::lnx4win_postinstall($o->{prefix}) if $o->{lnx4win}; install_any::killCardServices(); #- make sure failed upgrade will not hurt too much. install_steps::cleanIfFailedUpgrade($o); #- have the really bleeding edge ddebug.log for this f*cking msec :-/ eval { commands::cp('-f', "/tmp/ddebug.log", "$o->{prefix}/root") }; #- ala pixel? :-) [fpons] sync(); sync(); log::l("installation complete, leaving"); print "\n" x 80; } #-###################################################################################### #- Wonderful perl :( #-###################################################################################### 1;