mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Make things easier. #54295, r10296
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10301 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
db46647c9e
commit
b5dcc21280
1 changed files with 10 additions and 16 deletions
|
@ -479,18 +479,14 @@ class phpbb_feed
|
|||
}
|
||||
|
||||
function open()
|
||||
{
|
||||
if (!$this->forum_id && !$this->topic_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ($this->forum_id && !$this->topic_id)
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
$sql = 'SELECT forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $this->forum_id;
|
||||
if ($this->topic_id)
|
||||
{
|
||||
$sql = 'SELECT topic_title
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $this->topic_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -500,13 +496,11 @@ class phpbb_feed
|
|||
return false;
|
||||
}
|
||||
}
|
||||
else if ($this->topic_id)
|
||||
else if ($this->forum_id)
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
$sql = 'SELECT topic_title
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_id = ' . $this->topic_id;
|
||||
$sql = 'SELECT forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $this->forum_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
Loading…
Add table
Reference in a new issue