mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
some missing merges...
git-svn-id: file:///svn/phpbb/trunk@8545 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
771fd3696d
commit
eb664ddafb
7 changed files with 60 additions and 20 deletions
|
@ -173,6 +173,7 @@ class acp_database
|
||||||
default:
|
default:
|
||||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||||
$tables = get_tables($db);
|
$tables = get_tables($db);
|
||||||
|
asort($tables);
|
||||||
foreach ($tables as $table_name)
|
foreach ($tables as $table_name)
|
||||||
{
|
{
|
||||||
if (strlen($table_prefix) === 0 || stripos($table_name, $table_prefix) === 0)
|
if (strlen($table_prefix) === 0 || stripos($table_name, $table_prefix) === 0)
|
||||||
|
@ -346,7 +347,25 @@ class acp_database
|
||||||
while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
|
while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false)
|
||||||
{
|
{
|
||||||
$query = trim($sql);
|
$query = trim($sql);
|
||||||
$db->sql_query($query);
|
|
||||||
|
if (substr($query, 0, 13) == 'CREATE DOMAIN')
|
||||||
|
{
|
||||||
|
list(, , $domain) = explode(' ', $query);
|
||||||
|
$sql = "SELECT domain_name
|
||||||
|
FROM information_schema.domains
|
||||||
|
WHERE domain_name = '$domain';";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
if (!$db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$db->sql_query($query);
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->sql_query($query);
|
||||||
|
}
|
||||||
|
|
||||||
if (substr($query, 0, 4) == 'COPY')
|
if (substr($query, 0, 4) == 'COPY')
|
||||||
{
|
{
|
||||||
while (($sub = $fgetd($fp, "\n", $read, $seek, $eof)) !== '\.')
|
while (($sub = $fgetd($fp, "\n", $read, $seek, $eof)) !== '\.')
|
||||||
|
@ -971,7 +990,7 @@ class postgres_extractor extends base_extractor
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_data = '-- Table: ' . $table_name . "\n";
|
$sql_data = '-- Table: ' . $table_name . "\n";
|
||||||
//$sql_data .= "DROP TABLE $table_name;\n";
|
$sql_data .= "DROP TABLE $table_name;\n";
|
||||||
// PGSQL does not "tightly" bind sequences and tables, we must guess...
|
// PGSQL does not "tightly" bind sequences and tables, we must guess...
|
||||||
$sql = "SELECT relname
|
$sql = "SELECT relname
|
||||||
FROM pg_class
|
FROM pg_class
|
||||||
|
@ -1040,7 +1059,7 @@ class postgres_extractor extends base_extractor
|
||||||
$line .= ')';
|
$line .= ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($row['rowdefault']))
|
if (isset($row['rowdefault']))
|
||||||
{
|
{
|
||||||
$line .= ' DEFAULT ' . $row['rowdefault'];
|
$line .= ' DEFAULT ' . $row['rowdefault'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1536,7 +1536,8 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||||
$sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
|
$sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts
|
||||||
FROM ' . TOPICS_TABLE . ' t
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||||
AND t.topic_approved = 1';
|
AND t.topic_approved = 1
|
||||||
|
AND t.topic_status <> ' . ITEM_MOVED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1544,6 +1545,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||||
FROM ' . TOPICS_TABLE . ' t
|
FROM ' . TOPICS_TABLE . ' t
|
||||||
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
|
||||||
AND t.topic_approved = 1
|
AND t.topic_approved = 1
|
||||||
|
AND t.topic_status <> ' . ITEM_MOVED . '
|
||||||
GROUP BY t.forum_id';
|
GROUP BY t.forum_id';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ class compress_zip extends compress
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Some archivers are punks, they don't don't include folders in their archives!
|
// Some archivers are punks, they don't include folders in their archives!
|
||||||
$str = '';
|
$str = '';
|
||||||
$folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
|
$folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
|
||||||
|
|
||||||
|
@ -507,12 +507,14 @@ class compress_tar extends compress
|
||||||
$tmp = unpack('A12size', substr($buffer, 124, 12));
|
$tmp = unpack('A12size', substr($buffer, 124, 12));
|
||||||
$filesize = octdec((int) trim($tmp['size']));
|
$filesize = octdec((int) trim($tmp['size']));
|
||||||
|
|
||||||
|
$target_filename = "$dst$filename";
|
||||||
|
|
||||||
if ($filetype == 5)
|
if ($filetype == 5)
|
||||||
{
|
{
|
||||||
if (!is_dir("$dst$filename"))
|
if (!is_dir($target_filename))
|
||||||
{
|
{
|
||||||
$str = '';
|
$str = '';
|
||||||
$folders = explode('/', "$dst$filename");
|
$folders = explode('/', $target_filename);
|
||||||
|
|
||||||
// Create and folders and subfolders if they do not exist
|
// Create and folders and subfolders if they do not exist
|
||||||
foreach ($folders as $folder)
|
foreach ($folders as $folder)
|
||||||
|
@ -529,17 +531,35 @@ class compress_tar extends compress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($filesize != 0 && ($filetype == 0 || $filetype == "\0"))
|
else if ($filesize >= 0 && ($filetype == 0 || $filetype == "\0"))
|
||||||
{
|
{
|
||||||
|
// Some archivers are punks, they don't properly order the folders in their archives!
|
||||||
|
$str = '';
|
||||||
|
$folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME));
|
||||||
|
|
||||||
|
// Create and folders and subfolders if they do not exist
|
||||||
|
foreach ($folders as $folder)
|
||||||
|
{
|
||||||
|
$str = (!empty($str)) ? $str . '/' . $folder : $folder;
|
||||||
|
if (!is_dir($str))
|
||||||
|
{
|
||||||
|
if (!@mkdir($str, 0777))
|
||||||
|
{
|
||||||
|
trigger_error("Could not create directory $folder");
|
||||||
|
}
|
||||||
|
@chmod($str, 0777);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Write out the files
|
// Write out the files
|
||||||
if (!($fp = fopen("$dst$filename", 'wb')))
|
if (!($fp = fopen($target_filename, 'wb')))
|
||||||
{
|
{
|
||||||
trigger_error("Couldn't create file $filename");
|
trigger_error("Couldn't create file $filename");
|
||||||
}
|
}
|
||||||
@chmod("$dst$filename", 0777);
|
@chmod($target_filename, 0777);
|
||||||
|
|
||||||
// Grab the file contents
|
// Grab the file contents
|
||||||
fwrite($fp, $fzread($this->fp, ($filesize + 511) &~ 511), $filesize);
|
fwrite($fp, ($filesize) ? $fzread($this->fp, ($filesize + 511) &~ 511) : '', $filesize);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,7 +311,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
|
||||||
{
|
{
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
case 'mysqli':
|
case 'mysqli':
|
||||||
if (strpos($table_prefix, '-') !== false || strpos($table_prefix, '.') !== false)
|
if (strspn($table_prefix, '-./\\') !== 0)
|
||||||
{
|
{
|
||||||
$error[] = $lang['INST_ERR_PREFIX_INVALID'];
|
$error[] = $lang['INST_ERR_PREFIX_INVALID'];
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -68,7 +68,7 @@ class session
|
||||||
|
|
||||||
foreach ($args as $key => $argument)
|
foreach ($args as $key => $argument)
|
||||||
{
|
{
|
||||||
if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0)
|
if (strpos($argument, 'sid=') === 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -219,9 +219,9 @@ class session
|
||||||
// Load limit check (if applicable)
|
// Load limit check (if applicable)
|
||||||
if ($config['limit_load'] || $config['limit_search_load'])
|
if ($config['limit_load'] || $config['limit_search_load'])
|
||||||
{
|
{
|
||||||
if ($load = @file_get_contents('/proc/loadavg'))
|
if ((function_exists('sys_getloadavg') && $load = sys_getloadavg()) || ($load = explode(' ', @file_get_contents('/proc/loadavg'))))
|
||||||
{
|
{
|
||||||
$this->load = array_slice(explode(' ', $load), 0, 1);
|
$this->load = array_slice($load, 0, 1);
|
||||||
$this->load = floatval($this->load[0]);
|
$this->load = floatval($this->load[0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1440,7 +1440,7 @@ function utf8_clean_string($text)
|
||||||
/**
|
/**
|
||||||
* A wrapper for htmlspecialchars($value, ENT_COMPAT, 'UTF-8')
|
* A wrapper for htmlspecialchars($value, ENT_COMPAT, 'UTF-8')
|
||||||
*/
|
*/
|
||||||
function utf8_htmlspecialchars(&$value)
|
function utf8_htmlspecialchars($value)
|
||||||
{
|
{
|
||||||
return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
|
return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,9 +253,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.rtl ul.topiclist li.row dt a.subforum {
|
.rtl ul.topiclist li.row dt a.subforum {
|
||||||
padding: 0 0 0 12px;
|
padding-right: 12px;
|
||||||
background-position: 100% 100%;
|
background-position: right;
|
||||||
position: static;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rtl .forum-image {
|
.rtl .forum-image {
|
||||||
|
|
Loading…
Add table
Reference in a new issue