Clean code
This commit is contained in:
parent
ad04646c05
commit
741806f47e
@ -378,9 +378,8 @@ if ($result)
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($action != 'edit' || GETPOST('rowid') != $obj->rowid)
|
if ($action != 'edit' || GETPOST('rowid') != $obj->rowid)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit&token='.newToken().((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_edit().'</a>';
|
print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=edit&token='.newToken().((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_edit().'</a>';
|
||||||
print ' ';
|
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=delete&token='.newToken().((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_delete().'</a>';
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&mode='.$mode.'&action=delete&token='.newToken().((empty($user->entity) && $debug) ? '&debug=1' : '').'">'.img_delete().'</a>';
|
|
||||||
} else {
|
} else {
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$id.'">';
|
print '<input type="hidden" name="rowid" value="'.$id.'">';
|
||||||
|
|||||||
@ -122,24 +122,6 @@ if (!function_exists("utf8_encode"))
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>MBString support</td><td>';
|
|
||||||
if (!function_exists("mb_check_encoding"))
|
|
||||||
{
|
|
||||||
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupport", "mbstring");
|
|
||||||
} else {
|
|
||||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupport", "mbstring");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>JSon support</td><td>';
|
|
||||||
if (!function_exists("json_decode"))
|
|
||||||
{
|
|
||||||
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupport", "json");
|
|
||||||
} else {
|
|
||||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupport", "json");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -156,6 +138,28 @@ print '<td align="center">'.$langs->trans("FunctionTest").'</td>';
|
|||||||
print '<td>'.$langs->trans("Result").'</td>';
|
print '<td>'.$langs->trans("Result").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$functions = ["mb_check_encoding"];
|
||||||
|
$name = "MBString";
|
||||||
|
|
||||||
|
print "<tr>";
|
||||||
|
print "<td>".$name."</td>";
|
||||||
|
//print getTableColumn($name, $activatedExtensions);
|
||||||
|
print getTableColumn($name, $loadedExtensions);
|
||||||
|
print getTableColumnFunction($functions);
|
||||||
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
|
$functions = ["json_decode"];
|
||||||
|
$name = "JSON";
|
||||||
|
|
||||||
|
print "<tr>";
|
||||||
|
print "<td>".$name."</td>";
|
||||||
|
//print getTableColumn($name, $activatedExtensions);
|
||||||
|
print getTableColumn($name, $loadedExtensions);
|
||||||
|
print getTableColumnFunction($functions);
|
||||||
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
$functions = ["imagecreate"];
|
$functions = ["imagecreate"];
|
||||||
$name = "GD";
|
$name = "GD";
|
||||||
|
|
||||||
@ -189,7 +193,6 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
|||||||
print getTableColumn($name, $loadedExtensions);
|
print getTableColumn($name, $loadedExtensions);
|
||||||
print getTableColumnFunction($functions);
|
print getTableColumnFunction($functions);
|
||||||
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,7 +431,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function
|
|||||||
}
|
}
|
||||||
|
|
||||||
$html = "<td>";
|
$html = "<td>";
|
||||||
$html .= $result ? $langs->trans("PHPSupport".$name) : $langs->trans("ErrorPHPDoesNotSupport".$name);
|
$html .= $result ? $langs->trans("PHPSupport", $name) : $langs->trans("ErrorPHPDoesNotSupport".$name);
|
||||||
$html .= "</td>";
|
$html .= "</td>";
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
|
|||||||
@ -8,15 +8,9 @@ ConfFileIsNotWritable=Configuration file <b>%s</b> is not writable. Check permis
|
|||||||
ConfFileIsWritable=Configuration file <b>%s</b> is writable.
|
ConfFileIsWritable=Configuration file <b>%s</b> is writable.
|
||||||
ConfFileMustBeAFileNotADir=Configuration file <b>%s</b> must be a file, not a directory.
|
ConfFileMustBeAFileNotADir=Configuration file <b>%s</b> must be a file, not a directory.
|
||||||
ConfFileReload=Reloading parameters from configuration file.
|
ConfFileReload=Reloading parameters from configuration file.
|
||||||
PHPSupportSessions=This PHP supports sessions.
|
|
||||||
PHPSupportPOSTGETOk=This PHP supports variables POST and GET.
|
PHPSupportPOSTGETOk=This PHP supports variables POST and GET.
|
||||||
PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter <b>variables_order</b> in php.ini.
|
PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter <b>variables_order</b> in php.ini.
|
||||||
PHPSupportGD=This PHP supports GD graphical functions.
|
PHPSupportSessions=This PHP supports sessions.
|
||||||
PHPSupportCurl=This PHP supports Curl.
|
|
||||||
PHPSupportCalendar=This PHP supports calendars extensions.
|
|
||||||
PHPSupportUTF8=This PHP supports UTF8 functions.
|
|
||||||
PHPSupportIntl=This PHP supports Intl functions.
|
|
||||||
PHPSupportxDebug=This PHP supports extended debug functions.
|
|
||||||
PHPSupport=This PHP supports %s functions.
|
PHPSupport=This PHP supports %s functions.
|
||||||
PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough.
|
PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough.
|
||||||
PHPMemoryTooLow=Your PHP max session memory is set to <b>%s</b> bytes. This is too low. Change your <b>php.ini</b> to set <b>memory_limit</b> parameter to at least <b>%s</b> bytes.
|
PHPMemoryTooLow=Your PHP max session memory is set to <b>%s</b> bytes. This is too low. Change your <b>php.ini</b> to set <b>memory_limit</b> parameter to at least <b>%s</b> bytes.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user