aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/images/phpbb_logo.gifbin3883 -> 0 bytes
-rw-r--r--phpBB/adm/images/phpbb_logo.pngbin0 -> 9313 bytes
-rw-r--r--phpBB/adm/style/admin.css6
-rw-r--r--phpBB/includes/functions_admin.php15
-rw-r--r--phpBB/includes/functions_install.php42
-rw-r--r--phpBB/install/install_install.php4
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php2
7 files changed, 58 insertions, 11 deletions
diff --git a/phpBB/adm/images/phpbb_logo.gif b/phpBB/adm/images/phpbb_logo.gif
deleted file mode 100644
index 239993182b..0000000000
--- a/phpBB/adm/images/phpbb_logo.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/adm/images/phpbb_logo.png b/phpBB/adm/images/phpbb_logo.png
new file mode 100644
index 0000000000..c3f9248ed7
--- /dev/null
+++ b/phpBB/adm/images/phpbb_logo.png
Binary files differ
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 666f4921ba..b9996fd1d1 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -142,15 +142,15 @@ li {
#page-header {
clear: both;
text-align: right;
- background: url("../images/phpbb_logo.gif") top left no-repeat;
- height: 49px;
+ background: url("../images/phpbb_logo.png") top left no-repeat;
+ height: 54px;
font-size: 0.85em;
margin-bottom: 10px;
}
.rtl #page-header {
text-align: left;
- background: url("../images/phpbb_logo.gif") top right no-repeat;
+ background: url("../images/phpbb_logo.png") top right no-repeat;
}
#page-header h1 {
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 204fa9a43d..7352b3d1f3 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2294,6 +2294,21 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
}
/**
+* remove_comments will strip the sql comment lines out of an uploaded sql file
+* specifically for mssql and postgres type files in the install....
+*
+* @deprecated Use phpbb_remove_comments() instead.
+*/
+function remove_comments(&$output)
+{
+ // Remove /* */ comments (http://ostermiller.org/findcomment.html)
+ $output = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $output);
+
+ // Return by reference and value.
+ return $output;
+}
+
+/**
* Cache moderators, called whenever permissions are changed via admin_permissions. Changes of username
* and group names must be carried through for the moderators table
*/
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 9e9c48ff58..89dfb7cd2f 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -50,6 +50,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'firebird',
'MODULE' => 'interbase',
'DELIM' => ';;',
+ 'COMMENTS' => 'remove_remarks',
'DRIVER' => 'firebird',
'AVAILABLE' => true,
'2.0.x' => false,
@@ -59,6 +60,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mysql_41',
'MODULE' => 'mysqli',
'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
'DRIVER' => 'mysqli',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -68,6 +70,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mysql',
'MODULE' => 'mysql',
'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
'DRIVER' => 'mysql',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -77,6 +80,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'mssql',
'DELIM' => 'GO',
+ 'COMMENTS' => 'remove_comments',
'DRIVER' => 'mssql',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -86,6 +90,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'odbc',
'DELIM' => 'GO',
+ 'COMMENTS' => 'remove_comments',
'DRIVER' => 'mssql_odbc',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -95,6 +100,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'mssql',
'MODULE' => 'sqlsrv',
'DELIM' => 'GO',
+ 'COMMENTS' => 'remove_comments',
'DRIVER' => 'mssqlnative',
'AVAILABLE' => true,
'2.0.x' => false,
@@ -104,6 +110,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'oracle',
'MODULE' => 'oci8',
'DELIM' => '/',
+ 'COMMENTS' => 'remove_comments',
'DRIVER' => 'oracle',
'AVAILABLE' => true,
'2.0.x' => false,
@@ -113,6 +120,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'postgres',
'MODULE' => 'pgsql',
'DELIM' => ';',
+ 'COMMENTS' => 'remove_comments',
'DRIVER' => 'postgres',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -122,6 +130,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'SCHEMA' => 'sqlite',
'MODULE' => 'sqlite',
'DELIM' => ';',
+ 'COMMENTS' => 'remove_remarks',
'DRIVER' => 'sqlite',
'AVAILABLE' => true,
'2.0.x' => false,
@@ -465,16 +474,39 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
/**
* Removes comments from schema files
+*
+* @deprecated Use phpbb_remove_comments() instead.
*/
-function remove_comments($sql)
+function remove_remarks(&$sql)
{
- // Remove /* */ comments (http://ostermiller.org/findcomment.html)
- $sql = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $sql);
-
// Remove # style comments
$sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
- return $sql;
+ // Return by reference
+}
+
+/**
+* Removes "/* style" as well as "# style" comments from $input.
+*
+* @param string $input Input string
+*
+* @return string Input string with comments removed
+*/
+function phpbb_remove_comments($input)
+{
+ if (!function_exists('remove_comments'))
+ {
+ global $phpbb_root_path, $phpEx;
+ require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
+ }
+
+ // Remove /* */ comments
+ remove_comments($input);
+
+ // Remove # style comments
+ remove_remarks($input);
+
+ return $input;
}
/**
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 8e3fe0387c..f1003b07d7 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1164,7 +1164,7 @@ class install_install extends module
$sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
- $sql_query = remove_comments($sql_query);
+ $sql_query = phpbb_remove_comments($sql_query);
$sql_query = split_sql_file($sql_query, $delimiter);
@@ -1202,7 +1202,7 @@ class install_install extends module
// Change language strings...
$sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);
- $sql_query = remove_comments($sql_query);
+ $sql_query = phpbb_remove_comments($sql_query);
$sql_query = split_sql_file($sql_query, ';');
foreach ($sql_query as $sql)
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index c734c90a1a..dd022451b7 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -243,7 +243,7 @@ class phpbb_database_test_connection_manager
$filename = $directory . $schema . '_schema.sql';
$queries = file_get_contents($filename);
- $sql = remove_comments($queries);
+ $sql = phpbb_remove_comments($queries);
$sql = split_sql_file($sql, $this->dbms['DELIM']);