From 2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 29 May 2008 12:25:56 +0000 Subject: ok... i hope i haven't messed too much with the code and everything is still working. Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/merge_attachment_tables.php | 80 ------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 phpBB/develop/merge_attachment_tables.php (limited to 'phpBB/develop/merge_attachment_tables.php') diff --git a/phpBB/develop/merge_attachment_tables.php b/phpBB/develop/merge_attachment_tables.php deleted file mode 100644 index ae7fe57be4..0000000000 --- a/phpBB/develop/merge_attachment_tables.php +++ /dev/null @@ -1,80 +0,0 @@ -sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false); - -// Rename the attachments table... -$sql = "RENAME TABLE {$table_prefix}attachments TO {$table_prefix}attach_temp"; -$db->sql_query($sql); - -$sql = "CREATE TABLE {$table_prefix}attachments - SELECT d.*, a.post_id, a.user_id_from as poster_id, p.topic_id - FROM {$table_prefix}attach_desc d, {$table_prefix}attach_temp a, {$table_prefix}posts p - WHERE a.attach_id = d.attach_id - AND a.post_id = p.post_id"; -$db->sql_query($sql); - -switch ($db->sql_layer) -{ - case 'mysql': - case 'mysql4': - $sql = 'ALTER TABLE ' . $table_prefix . 'attachments - ADD PRIMARY KEY (attach_id), - ADD INDEX filetime (filetime), - ADD INDEX post_id (post_id), - ADD INDEX poster_id (poster_id), - ADD INDEX physical_filename (physical_filename(10)), - ADD INDEX filesize (filesize), - ADD INDEX topic_id (topic_id), - MODIFY COLUMN attach_id mediumint(8) UNSIGNED NOT NULL auto_increment'; - break; - - case 'mssql': - case 'mssql-odbc': - case 'msaccess': - break; - - case 'postgresql': - break; -} -$db->sql_query($sql); - -//$db->sql_query("DROP TABLE {$table_prefix}attach_temp"); - -echo "

Done

\n"; - -?> \ No newline at end of file -- cgit v1.2.1