aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/db/oracle.php46
-rw-r--r--phpBB/includes/mcp/mcp_front.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
4 files changed, 4 insertions, 50 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index e8a0ce3605..8f65c667a7 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -219,52 +219,6 @@ class dbal_oracle extends dbal
{
$this->query_result = false;
- // Any implicit columns exist?
- if (strpos($query, '.*') !== false)
- {
- // This sucker does a few things for us. It grabs all the explicitly named columns and what tables are being used
- preg_match('/SELECT (?:DISTINCT )?(.*?)FROM(.*?)(?:WHERE|(ORDER|GROUP) BY|$)/s', $query, $tables);
-
- // The prefixes of the explicit columns don't matter, they simply get in the way
- preg_match_all('/\.(\w+)/', trim($tables[1]), $columns);
-
- // Flip lets us do an easy isset() call
- $columns = array_flip($columns[1]);
-
- $table_data = trim($tables[2]);
-
- // Grab the implicitly named columns, they need expanding...
- preg_match_all('/(\w)\.\*/', $query, $info);
-
- $cols = array();
-
- foreach ($info[1] as $table_alias)
- {
- // We need to get the name of the aliased table
- preg_match('/(\w+) ' . $table_alias . '/', $table_data, $table_name);
- $table_name = $table_name[1];
-
- $sql = "SELECT column_name
- FROM all_tab_cols
- WHERE table_name = '" . strtoupper($table_name) . "'";
-
- $result = $this->sql_query($sql);
- while ($row = $this->sql_fetchrow($result))
- {
- if (!isset($columns[strtolower($row['column_name'])]))
- {
- $cols[] = $table_alias . '.' . strtolower($row['column_name']);
- }
- }
- $this->sql_freeresult($result);
-
- // Remove the implicity .* with it's full expansion
- $query = str_replace($table_alias . '.*', implode(', ', $cols), $query);
-
- unset($cols);
- }
- }
-
$query = 'SELECT * FROM (SELECT /*+ FIRST_ROWS */ rownum AS xrownum, a.* FROM (' . $query . ') a WHERE rownum <= ' . ($offset + $total) . ') WHERE xrownum >= ' . $offset;
return $this->sql_query($query, $cache_ttl);
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 2d5aff70b6..5c4e39bfc4 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -134,7 +134,7 @@ function mcp_front_view($id, $mode, $action)
$global_id = $forum_list[0];
$sql = $db->sql_build_query('SELECT', array(
- 'SELECT' => 'r.*, p.post_id, p.post_subject, u.username, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
+ 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
'FROM' => array(
REPORTS_TABLE => 'r',
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index cc2494a611..f16b4b0841 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -131,7 +131,7 @@ function compose_pm($id, $mode, $action)
}
else
{
- $sql = 'SELECT t.*, p.*, u.username as quote_username
+ $sql = 'SELECT t.folder_id, p.*, u.username as quote_username
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE t.user_id = ' . $user->data['user_id'] . "
AND p.author_id = u.user_id
@@ -147,7 +147,7 @@ function compose_pm($id, $mode, $action)
}
// check for outbox (not read) status, we do not allow editing if one user already having the message
- $sql = 'SELECT p.*, t.*
+ $sql = 'SELECT p.*, t.folder_id
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p
WHERE t.user_id = ' . $user->data['user_id'] . '
AND t.folder_id = ' . PRIVMSGS_OUTBOX . "
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 7d87818a8c..acfa1758b8 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -519,7 +519,7 @@ function get_pm_from($folder_id, $folder, $user_id)
$sql_start = $start;
}
- $sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.user_colour
+ $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.user_colour
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE t.user_id = $user_id
AND p.author_id = u.user_id