// Male/female or company?
switch ($gender) {
- case 'M', 'M', 'C':
+ case 'M': // Male
+ case 'F': // Female
+ case 'C': // Company
$ret = sprintf("{--GENDER_%s--}", $gender);
break;
}
// Scramble a string
-function scrambleString($str) {
+function scrambleString ($str) {
// Init
$scrambled = '';
}
// De-scramble a string scrambled by scrambleString()
-function descrambleString($str) {
+function descrambleString ($str) {
// Scramble only 40 chars long strings
if (strlen($str) != 40) return $str;
}
// Generates an error code from given account status
-function generateErrorCodeFromUserStatus ($status='') {
+function generateErrorCodeFromUserStatus ($status = '') {
// If no status is provided, use the default, cached
if ((empty($status)) && (isMember())) {
// Get user status
// Finally contruct the message
// @TODO Rewrite this old lost code to a template
- $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
- {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
- {--MEMBER_LAST_TLOCK--}: ".$timestamp;
+ $message = '{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ' . $STD . '
+ {--_HOURS--}, ' . $MIN . ' {--_MINUTES--} {--_AND--} ' . $SEC . ' {--_SECONDS--}<br />
+ {--MEMBER_LAST_TLOCK--}: ' . $timestamp;
break;
default:
// Debug regex?
if (isDebugRegularExpressionEnabled()) {
// @TODO Are these convertions still required?
- $pat = str_replace('.', "\.", $pat);
- $pat = str_replace('@', "\@", $pat);
- //* DEBUG: */ debugOutput($key."= " . $pat);
+ $pat = str_replace('.', '\.', $pat);
+ $pat = str_replace('@', '\@', $pat);
+ //* DEBUG: */ debugOutput($key . '= ' . $pat);
} // END - if
// Check if expression matches
// Ignore zero values
if (getSession('mailer_' . $accessLevel . '_failures') > 0) {
// Non-guest has login failures found, get both data and prepare it for template
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "accessLevel={$accessLevel}<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'accessLevel=' . $accessLevel . '<br />');
$content = array(
'login_failures' => 'mailer_' . $accessLevel . '_failures',
'last_failure' => generateDateTime(getSession('mailer_' . $accessLevel . '_last_failure'), 2)
$excludeArray[] = '.svn';
$excludeArray[] = '.htaccess';
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix} - Entered!");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'baseDir=' . $baseDir . ',prefix=' . $prefix . ' - Entered!');
// Init includes
$files = array();
continue;
} elseif (substr($baseFile, 0, strlen($prefix)) != $prefix) {
// Skip this file
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Invalid prefix in file " . $baseFile . ", prefix=" . $prefix);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Invalid prefix in file ' . $baseFile . ', prefix=' . $prefix);
continue;
} elseif ((!empty($suffix)) && (substr($baseFile, -(strlen($suffix . $extension)), (strlen($suffix . $extension))) != $suffix . $extension)) {
// Skip wrong suffix as well
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "Invalid suffix in file " . $baseFile . ", suffix=" . $suffix);
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Invalid suffix in file ' . $baseFile . ', suffix=' . $suffix);
continue;
} elseif (!isFileReadable($FQFN)) {
// Not readable so skip it
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "File " . $FQFN . " is not readable!");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'File ' . $FQFN . ' is not readable!');
continue;
}
// Is the file a PHP script or other?
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "baseDir={$baseDir},prefix={$prefix},baseFile={$baseFile}");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'baseDir=' . $baseDir . ',prefix=' . $prefix . ',baseFile=' . $baseFile);
if ((substr($baseFile, -4, 4) == '.php') || (($fileIncludeDirs === true) && (isDirectory($FQFN)))) {
// Is this a valid include file?
if ($extension == '.php') {