Code Duplication    Length = 7-7 lines in 12 locations

admin/accounts.php 1 location

@@ 204-210 (lines=7) @@
201
        $accountsCriteria->setStart($start);
202
        $accountsCriteria->setLimit($limit);
203
        $accountsObjs = $xnewsletter->getHandler('accounts')->getAll($accountsCriteria);
204
        if ($accountsCount > $limit) {
205
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
206
            $pagenav = new XoopsPageNav($accountsCount, $limit, $start, 'start', 'op=list');
207
            $pagenav = $pagenav->renderNav(4);
208
        } else {
209
            $pagenav = '';
210
        }
211
212
        // View Table
213
        if ($accountsCount > 0) {

admin/attachment.php 1 location

@@ 53-59 (lines=7) @@
50
        $attachmentCriteria->setStart($start);
51
        $attachmentCriteria->setLimit($limit);
52
        $attachmentObjs = $xnewsletter->getHandler('attachment')->getAll($attachmentCriteria);
53
        if ($attachmentsCount > $limit) {
54
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
55
            $pagenav = new XoopsPageNav($attachmentsCount, $limit, $start, 'start', 'op=list');
56
            $pagenav = $pagenav->renderNav(4);
57
        } else {
58
            $pagenav = '';
59
        }
60
61
        // View Table
62
        if ($attachmentsCount>0) {

admin/bmh.php 1 location

@@ 221-227 (lines=7) @@
218
        $bhmCriteria->setStart($start);
219
        $bhmCriteria->setLimit($limit);
220
        $bhmObjs = $xnewsletter->getHandler('bmh')->getAll($bhmCriteria);
221
        if ($bhmsCount > $limit) {
222
            include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
223
            $pagenav = new XoopsPageNav($bhmsCount, $limit, $start, 'start', 'op=list');
224
            $pagenav = $pagenav->renderNav(4);
225
        } else {
226
            $pagenav = '';
227
        }
228
229
        //form to filter result
230
        echo "<table class='outer width100' cellspacing='1'><tr class='odd'><td>";

admin/cat.php 1 location

@@ 53-59 (lines=7) @@
50
        $catCriteria->setStart($start);
51
        $catCriteria->setLimit($limit);
52
        $catObjs = $xnewsletter->getHandler('cat')->getAll($catCriteria);
53
        if ($catsCount > $limit) {
54
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
55
            $pagenav = new XoopsPageNav($catsCount, $limit, $start, 'start', 'op=list');
56
            $pagenav = $pagenav->renderNav(4);
57
        } else {
58
            $pagenav = '';
59
        }
60
61
        // View Table
62
        if ($catsCount > 0) {

admin/catsubscr.php 2 locations

@@ 52-58 (lines=7) @@
49
        $catCriteria->setStart($start);
50
        $catCriteria->setLimit($limit);
51
        $catObjs = $xnewsletter->getHandler('cat')->getAll($catCriteria);
52
        if ($catsCount > $limit) {
53
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
54
            $pagenav = new XoopsPageNav($catsCount, $limit, $start, 'start', 'op=list');
55
            $pagenav = $pagenav->renderNav(4);
56
        } else {
57
            $pagenav = '';
58
        }
59
60
        // View Table
61
        if ($catsCount>0) {
@@ 127-133 (lines=7) @@
124
        $catsubscrCriteria->setStart($start);
125
        $catsubscrCriteria->setLimit($limit);
126
        $catsubscrObjs = $xnewsletter->getHandler('catsubscr')->getAll($catsubscrCriteria);
127
        if ($catsCount > $limit) {
128
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
129
            $pagenav = new XoopsPageNav($catsCount, $limit, $start, 'start', 'op=list_cat&cat_id=' . $cat_id);
130
            $pagenav = $pagenav->renderNav(4);
131
        } else {
132
            $pagenav = '';
133
        }
134
135
        // View Table
136
        if ($catsCount>0)

admin/letter.php 1 location

@@ 155-161 (lines=7) @@
152
        $letterCriteria->setStart($start);
153
        $letterCriteria->setLimit($limit);
154
        $letterObjs = $xnewsletter->getHandler('letter')->getAll($letterCriteria);
155
        if ($lettersCount > $limit) {
156
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
157
            $pagenav = new XoopsPageNav($lettersCount, $limit, $start, 'start', 'op=list');
158
            $pagenav = $pagenav->renderNav(4);
159
        } else {
160
            $pagenav = '';
161
        }
162
163
        // View Table
164
        if ($lettersCount > 0) {

admin/mailinglist.php 1 location

@@ 51-57 (lines=7) @@
48
        $mailinglistCriteria->setStart($start);
49
        $mailinglistCriteria->setLimit($limit);
50
        $mailinglistObjs = $xnewsletter->getHandler('mailinglist')->getAll($mailinglistCriteria);
51
        if ($mailinglistsCount > $limit) {
52
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
53
            $pagenav = new XoopsPageNav($mailinglistsCount, $limit, $start, 'start', 'op=list');
54
            $pagenav = $pagenav->renderNav(4);
55
        } else {
56
            $pagenav = '';
57
        }
58
59
        // View Table
60
        if ($mailinglistsCount > 0) {

admin/protocol.php 2 locations

@@ 52-58 (lines=7) @@
49
        $letterCriteria->setStart($start);
50
        $letterCriteria->setLimit($limit);
51
        $letterObjs = $xnewsletter->getHandler('letter')->getAll($letterCriteria);
52
        if ($lettersCount > $limit) {
53
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
54
          $pagenav = new XoopsPageNav($lettersCount, $limit, $start, 'start', 'op=list');
55
          $pagenav = $pagenav->renderNav(4);
56
        } else {
57
          $pagenav = '';
58
        }
59
60
        // View Table
61
        if ($lettersCount > 0) {
@@ 176-182 (lines=7) @@
173
        $protocolCriteria->setStart($start);
174
        $protocolCriteria->setLimit($limit);
175
        $protocolObjs = $xnewsletter->getHandler('protocol')->getAll($protocolCriteria);
176
        if ($protocolsCount > $limit) {
177
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
178
            $pagenav = new XoopsPageNav($protocolsCount, $limit, $start, 'start', 'op=list_letter&letter_id=' . $letter_id);
179
            $pagenav = $pagenav->renderNav(4);
180
        } else {
181
            $pagenav = '';
182
        }
183
184
        // View Table
185
        if ($protocolsCount > 0) {

admin/template.php 1 location

@@ 54-60 (lines=7) @@
51
        $templateCriteria->setStart($start);
52
        $templateCriteria->setLimit($limit);
53
        $templateObjs = $xnewsletter->getHandler('template')->getAll($templateCriteria);
54
        if ($templatesCount > $limit) {
55
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
56
            $pagenav = new XoopsPageNav($templatesCount, $limit, $start, 'start', 'op=list');
57
            $pagenav = $pagenav->renderNav(4);
58
        } else {
59
            $pagenav = '';
60
        }
61
62
        // View Table
63
        if ($templatesCount > 0) {

letter.php 1 location

@@ 292-298 (lines=7) @@
289
        $limit = $xnewsletter->getConfig('adminperpage');
290
        $letterCriteria->setStart($start);
291
        $letterCriteria->setLimit($limit);
292
        if ($letterCount > $limit) {
293
            include_once XOOPS_ROOT_PATH . "/class/pagenav.php";
294
            $pagenav = new XoopsPageNav($letterCount, $limit, $start, 'start', "op={$op}");
295
            $pagenav = $pagenav->renderNav(4);
296
        } else {
297
            $pagenav = '';
298
        }
299
        $xoopsTpl->assign('pagenav', $pagenav);
300
        $letterObjs = $xnewsletter->getHandler('letter')->getAll($letterCriteria, null, true, true);
301
        // letters table