diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2009-12-08 01:23:40 +0000 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2009-12-08 01:23:40 +0000 |
| commit | b5dcc21280bf925a9e420b40e6aabbd374687a68 (patch) | |
| tree | 76e13707abf7c9d287c45ae6088ce0d3749de7a3 /phpBB/feed.php | |
| parent | db46647c9e82c33a689187387959c1b5f5daa22b (diff) | |
| download | forums-b5dcc21280bf925a9e420b40e6aabbd374687a68.tar forums-b5dcc21280bf925a9e420b40e6aabbd374687a68.tar.gz forums-b5dcc21280bf925a9e420b40e6aabbd374687a68.tar.bz2 forums-b5dcc21280bf925a9e420b40e6aabbd374687a68.tar.xz forums-b5dcc21280bf925a9e420b40e6aabbd374687a68.zip | |
Make things easier. #54295, r10296
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10301 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/feed.php')
| -rw-r--r-- | phpBB/feed.php | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index 2ac08c8517..ec1f03092f 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -480,17 +480,13 @@ 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; + 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); |
