Empty commit

This commit is contained in:
Git 2012-07-02 08:00:15 +00:00
parent f60d556c93
commit 9bc4828bce
3 changed files with 25 additions and 5 deletions

View File

@ -59,10 +59,15 @@ function hasWhatImgThumb($url) {
function cleanImgurUrl($url) {
$extension = pathinfo($url, PATHINFO_EXTENSION);
$path = preg_replace('/\.[^.]*$/', '', $url);
$last = $path[strlen($path)-1];
if($last == 'm' || $last == 's' || $last == 'b') {
$path = substr($path, 0, -1);
}
if(strlen($path) == 6) {
$last = $path[strlen($path)-1];
if($last == 'm' || $last == 'l' || $last == 's' || $last == 'h' || $last == 'b') {
$path = substr($path, 0, -1);
}
}
elseif(strlen($path) == 5) {
$path .= 'm';
}
return $path . "." . $extension;
}
?>

View File

@ -1168,6 +1168,11 @@ function make_hash($Str,$Secret) {
*/
function format_username($UserID, $Badges = false, $IsWarned = true, $IsEnabled = true, $Class = false, $Title = false) {
global $Classes;
// This array is a hack that should be made less retarded, but whatevs
// PermID => ShortForm
$SecondaryClasses = array(
);
if($UserID == 0) {
return 'System';
@ -1195,7 +1200,15 @@ function format_username($UserID, $Badges = false, $IsWarned = true, $IsEnabled
$str.=($IsWarned && $UserInfo['Warned']!='0000-00-00 00:00:00') ? '<a href="wiki.php?action=article&amp;id=218"><img src="'.STATIC_SERVER.'common/symbols/warned.png" alt="Warned" title="Warned" /></a>' : '';
$str.=($IsEnabled && $UserInfo['Enabled'] == 2) ? '<a href="rules.php"><img src="'.STATIC_SERVER.'common/symbols/disabled.png" alt="Banned" title="Be good, and you won\'t end up like this user" /></a>' : '';
if ($Badges) {
$ClassesDisplay = array();
foreach($SecondaryClasses as $PermID => $PermHTML) {
if ($UserInfo['ExtraClasses'][$PermID]) {
$ClassesDisplay[] = '<span class="secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermHTML.'</span>';
}
}
$str .= ((!empty($ClassesDisplay))?'&nbsp;':'').implode('&nbsp;', $ClassesDisplay);
}
if ($Title && $Class) {
$str .= '<strong>';

View File

@ -1,11 +1,13 @@
<?
/*
if(isset($LoggedUser)) {
//Silly user, what are you doing here!
header('Location: index.php');
die();
}
*/
include(SERVER_ROOT.'/classes/class_validate.php');