Code Duplication    Length = 7-7 lines in 2 locations

polls.php 2 locations

@@ 291-297 (lines=7) @@
288
            $pollObject->setVar('weight', Request::getInt('weight', 0, 'POST'));
289
            $pollObject->setVar('multiple', Request::getInt('multiple', 0, 'POST'));
290
            $pollObject->setVar('user_id', Request::getInt('user_id', 0, 'POST'));
291
            if (Request::getInt('notify', 0, 'POST') && $end_time > time()) {
292
                // if notify, set mail status to "not mailed"
293
                $pollObject->setVar('mail_status', POLL_NOTMAILED);
294
            } else {
295
                // if not notify, set mail status to already "mailed"
296
                $pollObject->setVar('mail_status', POLL_MAILED);
297
            }
298
            $new_poll_id = $pollObject->store();
299
            if (empty($new_poll_id)) {
300
                xoops_error($pollObject->getHtmlErrors);
@@ 449-455 (lines=7) @@
446
            $pollObject->setVar('weight', Request::getInt('weight', 0, 'POST'));
447
            $pollObject->setVar('multiple', Request::getInt('multiple', 0, 'POST'));
448
            $pollObject->setVar('user_id', Request::getInt('user_id', 0, 'POST'));
449
            if (Request::getInt('notify', 0, 'POST') && $end_time > time()) {
450
                // if notify, set mail status to "not mailed"
451
                $pollObject->setVar('mail_status', POLL_NOTMAILED);
452
            } else {
453
                // if not notify, set mail status to already "mailed"
454
                $pollObject->setVar('mail_status', POLL_MAILED);
455
            }
456
457
            if (!$pollObject->store()) {
458
                xoops_error($pollObject->getHtmlErrors);