Code Duplication    Length = 9-11 lines in 3 locations

xml.php 3 locations

@@ 113-121 (lines=9) @@
110
                        . $article_obj->getVar('art_id');
111
            break;
112
113
        case 'category':
114
            $pagetitle = planet_constant('MD_CATEGORY');
115
            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title'));
116
117
            $criteria->add(new Criteria('bc.cat_id', $category_id));
118
            $articles_obj =& $article_handler->getByCategory($criteria);
119
120
            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c'
121
                        . $category_id;
122
            break;
123
124
        case 'blog':
@@ 124-132 (lines=9) @@
121
                        . $category_id;
122
            break;
123
124
        case 'blog':
125
            $pagetitle = planet_constant('MD_BLOG');
126
            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title'));
127
128
            $criteria->add(new Criteria('blog_id', $blog_id));
129
            $articles_obj =& $article_handler->getAll($criteria);
130
131
            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b'
132
                        . $blog_id;
133
            break;
134
135
        case 'bookmark':
@@ 135-145 (lines=11) @@
132
                        . $blog_id;
133
            break;
134
135
        case 'bookmark':
136
            $author_name = XoopsUser::getUnameFromId($uid);
137
            $pagetitle   = planet_constant('MD_BOOKMARKS');
138
            $rssdesc     = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name);
139
140
            $criteria->add(new Criteria('bm.bm_uid', $uid));
141
            $articles_obj =& $article_handler->getByBookmark($criteria);
142
143
            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
144
145
            break;
146
147
        default:
148
            $pagetitle = planet_constant('MD_INDEX');