File ro_regonlinehandler.php
has 1735 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Xmf\Request;
require_once __DIR__ . '/../../mainfile.php';
Consider simplifying this complex logical expression. Open
if (($event_uid == $current_uid && $current_uid > 0) || //current user is event owner
($submitter == $current_uid && $current_uid > 0) || //current user made registration
($cal->isadmin == 1) || //current user is admin
($cal->superedit == 1) || //current user can edit/delete registrations of other persons
($submitter == $current_uid && $current_uid == 0 && $poster_ip == $current_ip)) //current user is guest, but ip is the same as guest who made registration
Avoid deeply nested control flow statements. Open
if ($cal->ro_extrainfo5 !== '') {
$retList .= "<td class='$classname'>$romextrainfo5</td>";
}
Avoid deeply nested control flow statements. Open
if ($cal->ro_extrainfo4 !== '') {
$retList .= "<td class='$classname'>$romextrainfo4</td>";
}
Avoid deeply nested control flow statements. Open
if ($cal->ro_extrainfo1 !== '') {
$retList .= "<td class='$classname'>$romextrainfo1</td>";
}
Avoid deeply nested control flow statements. Open
if ($cal->ro_extrainfo3 !== '') {
$retList .= "<td class='$classname'>$romextrainfo3</td>";
}
Avoid deeply nested control flow statements. Open
if ($cal->ro_extrainfo2 !== '') {
$retList .= "<td class='$classname'>$romextrainfo2</td>";
}
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($event_uid == $uid && $uid > 0) || //current user is event owner
($cal->isadmin == 1) || //current user is admin
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
{
if ($status == 1) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 286.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (($event_uid == $current_uid && $current_uid > 0) || //current user is event owner
($cal->isadmin == 1) || //current user is admin
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
{
if ($status == 1) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 286.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
$query = 'SELECT '
. $GLOBALS['xoopsDB']->prefix('users')
. '.uname, '
. $GLOBALS['xoopsDB']->prefix('apcal_ro_members')
. '.* FROM '
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 155.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 7 locations. Consider refactoring. Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/mail_template/');
} else {
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 120.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if ($email5 !== '') {
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email5', $submitter, ". time().")";
$res = $GLOBALS['xoopsDB']->query($query);
if (!$res) {
redirect_header($eventurl, 3, _APCAL_RO_ERROR_RO_ACTIVATE);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 97.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if ($email2 !== '') {
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email2', $submitter, ". time().")";
$res = $GLOBALS['xoopsDB']->query($query);
if (!$res) {
redirect_header($eventurl, 3, _APCAL_RO_ERROR_RO_ACTIVATE);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 97.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if ($email3 !== '') {
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email3', $submitter, ". time().")";
$res = $GLOBALS['xoopsDB']->query($query);
if (!$res) {
redirect_header($eventurl, 3, _APCAL_RO_ERROR_RO_ACTIVATE);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 97.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
if ($email4 !== '') {
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email4', $submitter, ". time().")";
$res = $GLOBALS['xoopsDB']->query($query);
if (!$res) {
redirect_header($eventurl, 3, _APCAL_RO_ERROR_RO_ACTIVATE);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 97.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Expected 0 spaces before closing bracket; 1 found Open
if ($status == 0 ) $ret .=" checked='checked'";
- Exclude checks
Blank line found at start of control structure Open
if (!empty($_POST['url'])){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if($waitinglist > 0 ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( ! empty( $_SERVER['HTTPS'] ) ) {
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Blank line found at start of control structure Open
if (isset($_POST['confirm_member']) || isset($_POST['confirm_member_x'])){
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( $num_rows == 0 ) $sender= "" ;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
else while( $member = $GLOBALS['xoopsDB']->fetchObject($res) ) {
- Exclude checks
Blank line found at start of control structure Open
if (!empty($_REQUEST['eventid'])){
- Exclude checks
Blank line found at start of control structure Open
if (isset($_POST['ro_notify_one']) || isset($_POST['ro_notify_one_x'])) {
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
<td class='odd'><input type='text' name='location' disabled='disabled' value='$location' size='80' /></td>
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='extrainfo2' value='$extrainfo2' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='extrainfo3' value='$extrainfo3' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 183 characters Open
$retList .= "<input type='image' src='$roimagestatusok' name='confirm_member' alt='"._APCAL_RO_STATUS_OK."' title='"._APCAL_RO_STATUS_OK."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
$query = "UPDATE `".$GLOBALS['xoopsDB']->prefix("apcal_ro_members")."` SET `rom_status` = '$status' WHERE `rom_id` = $rom_id;";
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks
Line exceeds 120 characters; contains 306 characters Open
$ret .= "<a href='print.php?smode=ro_list&op=exportxls&eventid=$eventid&summary=$summary&date=$date&location=$location' target='_blank'><img src='$roimagedownload' name='download' alt='" . _APCAL_RO_DOWNLOAD . "' title='" . _APCAL_RO_DOWNLOAD . "' style='height:24px;margin:0 10px;'/></a>";
- Exclude checks
Inline control structures are not allowed Open
if ($needconfirm ==1) $ret .=" checked='checked'";
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
$ret .= "<input type='image' src='$roimagedelete' name='deactivate' alt='" . _APCAL_RO_BTN_RO_DEACTIVATE . "' title='" . _APCAL_RO_BTN_RO_DEACTIVATE . "' height='24px'/>";
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
<input id='status0' type='radio' value='0' checked='checked' title=" . _APCAL_RO_STATUS_OK . " name='status' />
- Exclude checks
Line exceeds 120 characters; contains 173 characters Open
<input type='image' src='$roimageedit' name='form_edit' alt='" . _APCAL_RO_BTN_EDIT . "' title='" . _APCAL_RO_BTN_EDIT . "' height='24px' />
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 172 characters Open
$ret .= "<img src='$roimagestatusok' name='confirm_member' alt='"._APCAL_RO_STATUS_OK."' title='"._APCAL_RO_STATUS_OK."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 213 characters Open
<p style='text-align:center;align:center'><input type='image' src='$roimagesend' name='ro_notify_all' alt='" . _APCAL_RO_BTN_SEND . "' title='" . _APCAL_RO_BTN_SEND . "' height='24px'/></p>
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
$mailtext = _APCAL_RO_EVENT.": $summary\n"._APCAL_RO_DATE.": $date\n"._APCAL_RO_LOCATION.": $location\n"._APCAL_RO_LINK.": $eventurl\n\n";
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
<input type='image' src='$roimagecancel' name='cancel' alt='" . _APCAL_RO_BTN_CANCEL . "' title='" . _APCAL_RO_BTN_CANCEL . "' height='24px'/>
- Exclude checks
Inline control structures are not allowed Open
if ($needconfirm == 0) $ret .=" checked='checked'";
- Exclude checks
Line exceeds 120 characters; contains 206 characters Open
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email1', $submitter, ". time().")";
- Exclude checks
Line exceeds 120 characters; contains 180 characters Open
<input type='image' src='$roimagesave' name='add_member' alt='" . _APCAL_RO_BTN_CONF_ADD . "' title='" . _APCAL_RO_BTN_CONF_ADD . "' height='24px'/>
- Exclude checks
Inline control structures are not allowed Open
if ($poster_ip=='') $poster_ip='x';
- Exclude checks
Line exceeds 120 characters; contains 196 characters Open
$retList .= "<img type='image' src='$roimagestatuspending' name='confirm_member' alt='"._APCAL_RO_STATUS_PENDING."' title='"._APCAL_RO_STATUS_PENDING."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 187 characters Open
$ret .= "<input type='image' src='$roimagestatusok' name='confirm_member' alt='"._APCAL_RO_STATUS_OK."' title='"._APCAL_RO_STATUS_OK."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 187 characters Open
$ret .= "<img src='$roimagestatuspending' name='confirm_member' alt='"._APCAL_RO_STATUS_PENDING."' title='"._APCAL_RO_STATUS_PENDING."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 178 characters Open
$ret .= "<img src='$roimagestatuslist' name='confirm_member' alt='"._APCAL_RO_STATUS_LIST."' title='"._APCAL_RO_STATUS_LIST."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
<td class='even' width='200px'>" . _APCAL_RO_MAIL_BODY1 . ":<br><br><font size='1'>" . _APCAL_RO_MAIL_BODY2 . "</font></td>
- Exclude checks
Inline control structures are not allowed Open
if( $num_rows == 0 ) $sender= "" ;
- Exclude checks
Inline control structures are not allowed Open
else while( $member = $GLOBALS['xoopsDB']->fetchObject($res) ) {
- Exclude checks
Line exceeds 120 characters; contains 180 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
require_once XOOPS_ROOT_PATH . '/modules/apcal/language/' . $GLOBALS['xoopsConfig']['language'] . '/apcal_constants.php';
- Exclude checks
Line exceeds 120 characters; contains 207 characters Open
. " (roe_submitter, roe_eventid, roe_datelimit, roe_number, roe_needconfirm, roe_waitinglist, roe_date_created) values ($uid, $eventid, $datelimit, $number, $needconfirm, $waitinglist, "
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email4', $submitter, ". time().")";
- Exclude checks
Line exceeds 120 characters; contains 187 characters Open
$retList .= "<img type='image' src='$roimagestatuslist' name='confirm_member' alt='"._APCAL_RO_STATUS_LIST."' title='"._APCAL_RO_STATUS_LIST."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 180 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
<input type='image' src='$roimagesend' name='ro_notify_one' alt='"._APCAL_RO_BTN_SEND."' title='"._APCAL_RO_BTN_SEND."' height='32px'/>
- Exclude checks
Line exceeds 120 characters; contains 171 characters Open
<input type='image' src='$roimagesave' name='edit_member' alt='" . _APCAL_RO_BTN_CONF_EDIT . "' title='" . _APCAL_RO_BTN_CONF_EDIT . "' height='24px'/>
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='firstname' value='$firstname' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 199 characters Open
<input type='image' src='$roimagesavemore' name='add_member_more' alt='" . _APCAL_RO_BTN_CONF_ADD_MORE . "' title='" . _APCAL_RO_BTN_CONF_ADD_MORE . "' height='24px'/>
- Exclude checks
Line exceeds 120 characters; contains 179 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformeditremovemember_" . $unique_id . "' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 181 characters Open
$retList .= "<img type='image' src='$roimagestatusok' name='confirm_member' alt='"._APCAL_RO_STATUS_OK."' title='"._APCAL_RO_STATUS_OK."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
<input type='image' src='$roimagecancel' name='goback' alt='" . _APCAL_RO_BTN_BACK . "' title='" . _APCAL_RO_BTN_BACK . "' height='24px'/>
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
<input type='image' src='$roimagecancel' name='goback' alt='"._APCAL_RO_BTN_BACK."' title='"._APCAL_RO_BTN_BACK."' height='32px'/>
- Exclude checks
Inline control structures are not allowed Open
if ($status == 1) $ret .=" checked='checked'";
- Exclude checks
Inline control structures are not allowed Open
if ($poster_ip=='') $poster_ip='-';
- Exclude checks
Line exceeds 120 characters; contains 180 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
- Exclude checks
Inline control structures are not allowed Open
if ($email=='') $email='-';
- Exclude checks
Line exceeds 120 characters; contains 174 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 176 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='extrainfo1' value='$extrainfo1' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 193 characters Open
$ret .= "<input type='image' src='$roimagestatuslist' name='confirm_member' alt='"._APCAL_RO_STATUS_LIST."' title='"._APCAL_RO_STATUS_LIST."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='extrainfo5' value='$extrainfo5' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 166 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
$retList .= "<input type='image' src='$roimagestatuslist' name='confirm_member' alt='"._APCAL_RO_STATUS_LIST."' title='"._APCAL_RO_STATUS_LIST."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 168 characters Open
$mailtext = _APCAL_RO_EVENT . ": $summary\n" . _APCAL_RO_DATE . ": $date\n" . _APCAL_RO_LOCATION . ": $location\n" . _APCAL_RO_LINK . ": $eventurl\n\n";
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
- Exclude checks
Line exceeds 120 characters; contains 143 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
<td class='odd'><input type='text' name='eventdate' disabled='disabled' value='$eventdate' size='80' /></td>
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
- Exclude checks
Line exceeds 120 characters; contains 176 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
<form method='post' action='ro_regonlinehandler.php' name='roformlistconfirm_".$unique_id."' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
($submitter == $current_uid && $current_uid == 0 && $poster_ip == $current_ip)) //current user is guest, but ip is the same as guest who made registration
- Exclude checks
Inline control structures are not allowed Open
if ($status == 2) $ret .=" checked='checked'";
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
<div class='col-xs-12 col-sm-8'><input type='text' name='title' disabled='disabled' value='$summary' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformgoback' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 291 characters Open
$ret .= "<a href='print.php?smode=ro_list&eventid=$eventid&summary=$summary&date=$date&location=$location' target='_blank'><img src='$roimageprint' name='print' alt='" . _APCAL_RO_PRINT_LIST . "' title='" . _APCAL_RO_PRINT_LIST . "' style='height:24px;margin:0 10px;'/></a>";
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformsendmail' accept-charset='UTF-8'>
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='lastname' value='$lastname' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
<td class='odd'><input type='text' name='subject' size='70' value='" . _APCAL_RO_MAIL_SUBJ_TEXT . "'></td>
- Exclude checks
Line exceeds 120 characters; contains 198 characters Open
$retList .= "<input type='image' src='$roimagestatuspending' name='confirm_member' alt='"._APCAL_RO_STATUS_PENDING."' title='"._APCAL_RO_STATUS_PENDING."' height='22px' />";
- Exclude checks
Line exceeds 120 characters; contains 375 characters Open
. " (rom_submitter, rom_eventid, rom_firstname, rom_lastname, rom_email, rom_extrainfo1, rom_extrainfo2, rom_extrainfo3, rom_extrainfo4, rom_extrainfo5, rom_poster_ip, rom_status, rom_date_created) values ($uid, $eventid, '$firstname', '$lastname', '$email', '$extrainfo1', '$extrainfo2', '$extrainfo3', '$extrainfo4', '$extrainfo5', '$poster_ip', $status, "
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
$ret .= "<input type='image' src='$roimagestatuspending' name='confirm_member' alt='"._APCAL_RO_STATUS_PENDING."' title='"._APCAL_RO_STATUS_PENDING."' height='22px' />";
- Exclude checks
Inline control structures are not allowed Open
if ($current_ip=='') $current_ip='-';
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
<td class='odd'><input type='text' name='event' disabled='disabled' value='$event' size='80' /></td>
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email3', $submitter, ". time().")";
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
<div class='col-xs-12 col-sm-8'><input type='text' name='eventdate' disabled='disabled' value='$eventdate' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 144 characters Open
<div class='odd col-xs-12 col-sm-8'><input type='text' name='extrainfo4' value='$extrainfo4' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 226 characters Open
$ret .= "<div align='center'><a href='$eventurl' target='_self'><img src='$roimagecancel' name='goback' alt='" . _APCAL_RO_BTN_BACK . "' title='" . _APCAL_RO_BTN_BACK . "' style='height:24px;margin:0 10px;'/></a>";
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformactivate' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email2', $submitter, ". time().")";
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
<div class='col-xs-12 col-sm-8'><input type='text' name='location' disabled='disabled' value='$location' style='width:100%' /></div>
- Exclude checks
Line exceeds 120 characters; contains 162 characters Open
<input type='image' src='$roimagecancel' name='cancel' alt='" . _APCAL_RO_BTN_CANCEL . "' title='" . _APCAL_RO_BTN_CANCEL . "' height='24px'/>
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/mail_template/');
- Exclude checks
Line exceeds 120 characters; contains 171 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformlist_" . $unique_id . "' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformeditmember' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks
Inline control structures are not allowed Open
if ($waitinglist == 0) $ret .=" checked='checked'";
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$ret .= "<input type='image' src='$roimagesave' name='activate' alt='" . _APCAL_RO_BTN_CONF_SAVE . "' title='" . _APCAL_RO_BTN_CONF_SAVE . "' height='24px'/>";
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
$ret .= "<input type='image' src='$roimagecancel' name='cancel' alt='" . _APCAL_RO_BTN_CANCEL . "' title='" . _APCAL_RO_BTN_CANCEL . "' height='24px'/>";
- Exclude checks
Line exceeds 120 characters; contains 200 characters Open
$xoopsTpl->assign('xoops_module_header', '<link rel="stylesheet" type="text/css" href="' . XOOPS_URL . '/modules/apcal/assets/css/apcal.css" />' . $xoopsTpl->get_template_vars('xoops_module_header'));
- Exclude checks
Inline control structures are not allowed Open
if ($waitinglist == 1) $ret .=" checked='checked'";
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$ret .= "<input type='image' src='$roimagesave' name='activate' alt='" . _APCAL_RO_BTN_CONF_EDIT . "' title='" . _APCAL_RO_BTN_CONF_EDIT . "' height='24px'/>";
- Exclude checks
Line exceeds 120 characters; contains 202 characters Open
$query = 'Insert into ' . $GLOBALS['xoopsDB']->prefix('apcal_ro_notify') . " (ron_eventid, ron_email, ron_submitter, ron_date_created) values ($eventid, '$email5', $submitter, ". time().")";
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
<tr><td width='100%' class='itemHead'><span class='itemTitle'>" . _APCAL_RO_TITLE3 . "</span></td></tr>
- Exclude checks
Line exceeds 120 characters; contains 177 characters Open
<input type='image' src='$roimageedit' name='form_edit' alt='" . _APCAL_RO_BTN_EDIT . "' title='" . _APCAL_RO_BTN_EDIT . "' height='22px' />
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
<td class='even' width='200px'>"._APCAL_RO_MAIL_BODY1.":<br/><br/><font size='1'>"._APCAL_RO_MAIL_BODY2."</font></td>
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
<form class='apcalForm' method='post' id='RegOnlineForm' action='ro_regonlinehandler.php' name='roformaddmember' style='margin:0px;'>
- Exclude checks
Line exceeds 120 characters; contains 183 characters Open
<input type='image' src='$roimagedelete' name='remove_member' alt='" . _APCAL_RO_BTN_REMOVE . "' title='" . _APCAL_RO_BTN_REMOVE . "' height='24px' />
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/')) {
- Exclude checks
Line exceeds 120 characters; contains 187 characters Open
<input type='image' src='$roimagedelete' name='remove_member' alt='" . _APCAL_RO_BTN_REMOVE . "' title='" . _APCAL_RO_BTN_REMOVE . "' height='22px' />
- Exclude checks
Inline control structures are not allowed Open
if ($status == 0 ) $ret .=" checked='checked'";
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
} else {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( ! empty( $_SERVER['HTTPS'] ) ) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( $num_rows == 0 ) $sender= "" ;
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ($status == 2){
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user can edit/delete registrations of other persons\n " Open
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user can edit/delete registrations of other persons\n " Open
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
} else if ($status == 2){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
redirect_header($url.$url_redirect, 3, str_replace('%s', $cal->ro_extrainfo3, _APCAL_RO_MISSING_ITEM));
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
redirect_header($url.$url_redirect, 3, str_replace('%s', $cal->ro_extrainfo4, _APCAL_RO_MISSING_ITEM));
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($waitinglist > 0 ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
} else if ($status == 2){
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user can edit/delete registrations of other persons\n " Open
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user can edit/delete registrations of other persons\n " Open
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 24 Open
} else {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ($status == 2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if (isset($_POST['confirm_member']) || isset($_POST['confirm_member_x'])){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if (!empty($_REQUEST['eventid'])){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( ! empty( $_SERVER['HTTPS'] ) ) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ($status == 2){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
redirect_header($url.$url_redirect, 3, str_replace('%s', _APCAL_RO_LASTNAME, _APCAL_RO_MISSING_ITEM));
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
}
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
} else if ($status == 2){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( ! empty( $_SERVER['HTTPS'] ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
else while( $member = $GLOBALS['xoopsDB']->fetchObject($res) ) {
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user can edit/delete registrations of other persons\n " Open
($cal->ro_superedit == 1)) //current user can edit/delete registrations of other persons
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
} else if ($status == 2){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
} else {
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
else while( $member = $GLOBALS['xoopsDB']->fetchObject($res) ) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
redirect_header($url.$url_redirect, 3, str_replace('%s', $cal->ro_extrainfo2, _APCAL_RO_MISSING_ITEM));
- Exclude checks
Whitespace found at end of line Open
redirect_header($url, 3, _APCAL_RO_ERROR_ADD);
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!$res) {
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ($status == 2){
- Exclude checks
Closing brace indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if (!empty($_POST['url'])){
- Exclude checks
Whitespace found at end of line Open
//set template name
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 24 Open
if (($event_uid == $current_uid && $current_uid > 0) || //current user is event owner
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
} else if ($status == 2){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 24 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if( ! empty( $_SERVER['HTTPS'] ) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( $num_rows == 0 ) $sender= "" ;
- Exclude checks
Whitespace found at end of line Open
}
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ($needconfirm > 0) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if (!empty($_POST['eventid'])){
- Exclude checks
Whitespace found at end of line Open
//set sender
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
if ($status == 1) {
- Exclude checks
Expected 1 space after closing parenthesis; found " //current user is guest, but ip is the same as guest who made registration \n " Open
($submitter == $current_uid && $current_uid == 0 && $poster_ip == $current_ip)) //current user is guest, but ip is the same as guest who made registration
- Exclude checks
Whitespace found at end of line Open
($submitter == $current_uid && $current_uid == 0 && $poster_ip == $current_ip)) //current user is guest, but ip is the same as guest who made registration
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 13 Open
)
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 28 Open
if ($status == 1) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
} else if ($status == 2){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( file_exists(XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/'. $xoopsConfig['language'] .'/')) {
- Exclude checks