Code Duplication    Length = 10-10 lines in 2 locations

modfile.php 1 location

@@ 187-196 (lines=10) @@
184
                $criteria->setSort('weight ASC, title');
185
                $criteria->setOrder('ASC');
186
                $downloads_field = $downloadsfield_Handler->getall($criteria);
187
                foreach (array_keys($downloads_field) as $i) {
188
                    if ($downloads_field[$i]->getVar('status_def') == 0) {
189
                        $objdata =& $downloadsfieldmoddata_Handler->create();
190
                        $nom_champ = 'champ' . $downloads_field[$i]->getVar('fid');
191
                        $objdata->setVar('moddata', $_POST[$nom_champ]);
192
                        $objdata->setVar('lid', $lid_dowwnloads);
193
                        $objdata->setVar('fid', $downloads_field[$i]->getVar('fid'));
194
                        $downloadsfieldmoddata_Handler->insert($objdata) or $objdata->getHtmlErrors();
195
                    }
196
                }
197
                $tags = array();
198
                $tags['MODIFYREPORTS_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/modified.php';
199
                $notification_handler =& xoops_gethandler('notification');

submit.php 1 location

@@ 185-194 (lines=10) @@
182
                $criteria->setSort('weight ASC, title');
183
                $criteria->setOrder('ASC');
184
                $downloads_field = $downloadsfield_Handler->getall($criteria);
185
                foreach (array_keys($downloads_field) as $i) {
186
                    if ($downloads_field[$i]->getVar('status_def') == 0) {
187
                        $objdata =& $downloadsfielddata_Handler->create();
188
                        $nom_champ = 'champ' . $downloads_field[$i]->getVar('fid');
189
                        $objdata->setVar('data', $_POST[$nom_champ]);
190
                        $objdata->setVar('lid', $lid_dowwnloads);
191
                        $objdata->setVar('fid', $downloads_field[$i]->getVar('fid'));
192
                        $downloadsfielddata_Handler->insert($objdata) or $objdata->getHtmlErrors();
193
                    }
194
                }
195
                if ($xoopsUser) {
196
                    if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
197
                        //permission pour t�l�charger