diff --git a/mod.php b/mod.php index 87514aec..fec65c02 100644 --- a/mod.php +++ b/mod.php @@ -100,15 +100,24 @@ $data = ''; foreach($constants as $name => $value) { if(MOD_NEVER_REAL_PASSWORD && $name == 'MY_PASSWORD') - $value = '********'; + $value = 'hidden'; else { // For some reason PHP is only giving me the first defined value (the default), so use constant() $value = constant($name); if(gettype($value) == 'boolean') { $value = $value ? 'On' : 'Off'; } elseif(gettype($value) == 'string') { - $value = '' . utf8tohtml($value) . ''; + $value = '' . utf8tohtml(substr($value, 0, 110) . (strlen($value) > 110 ? '…' : '')) . ''; } elseif(gettype($value) == 'integer') { + // Show permissions in a cleaner way + if(preg_match('/^MOD_/', $name) && $name != 'MOD_JANITOR' && $name != 'MOD_MOD' && $name != 'MOD_ADMIN') { + if($value == MOD_JANITOR) + $value = 'Janitor'; + elseif($value == MOD_MOD) + $value = 'Mod'; + elseif($value == MOD_ADMIN) + $value = 'Admin'; + } $value = '' . $value . ''; } } @@ -117,9 +126,7 @@ '