Index: branches/5.1.x/core/install/install_toolkit.php =================================================================== diff -u -N -r13545 -r13750 --- branches/5.1.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 13545) +++ branches/5.1.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 13750) @@ -1,6 +1,6 @@ INIFile) && !is_writable(dirname($this->INIFile))) { - trigger_error('Cannot write to "' . $this->INIFile . '" file.', $silent ? E_USER_NOTICE : E_USER_ERROR); + trigger_error('Cannot write to "' . $this->INIFile . '" file.', $silent ? E_USER_WARNING : E_USER_ERROR); return ; } @@ -834,6 +834,25 @@ } /** + * Deletes all temp tables (from active sessions too) + * + */ + function deleteEditTables() + { + $table_prefix = $this->getSystemConfig('Database', 'TablePrefix'); + + $tables = $this->Conn->GetCol('SHOW TABLES'); + $mask_edit_table = '/' . $table_prefix . 'ses_(.*)_edit_(.*)/'; + $mask_search_table = '/' . $table_prefix . 'ses_(.*?)_(.*)/'; + + foreach ($tables as $table) { + if ( preg_match($mask_edit_table, $table, $rets) || preg_match($mask_search_table, $table, $rets) ) { + $this->Conn->Query('DROP TABLE IF EXISTS ' . $table); + } + } + } + + /** * Perform redirect after separate module install * * @param string $module_folder