Empty commit

This commit is contained in:
Git 2013-04-07 08:00:41 +00:00
parent 6e8e01a471
commit a7a85c2bdb
7 changed files with 21 additions and 22 deletions

View File

@ -706,7 +706,7 @@ private function to_html ($Array) {
global $LoggedUser;
if ($LoggedUser['EnableMatureContent']) {
if (!empty($Block['Attr'])) {
$Str.='<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br \> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br /> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
$Str.='<blockquote class="hidden spoiler">'.$this->to_html($Block['Val']).'</blockquote>';
}
else {

View File

@ -458,7 +458,7 @@ public static function format_username($UserID, $Badges = false, $IsWarned = tru
if ($Badges) {
$ClassesDisplay = array();
foreach($SecondaryClasses as $PermID => $PermHTML) {
foreach ($SecondaryClasses as $PermID => $PermHTML) {
if ($UserInfo['ExtraClasses'][$PermID]) {
$ClassesDisplay[] = '<span class="secondary_class" title="'.$Classes[$PermID]['Name'].'">'.$PermHTML.'</span>';
}
@ -547,10 +547,9 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
//case 1 is avatars disabled
switch($Setting) {
case 0:
if(!empty($Avatar)) {
if (!empty($Avatar)) {
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
}
else {
} else {
$URL = STATIC_SERVER."common/avatars/default.png";
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
}
@ -587,16 +586,14 @@ public static function show_avatar($Avatar, $Username, $Setting, $Size=150, $Ret
$Type = "identicon";
}
$Rating = "pg";
if(!$Robot) {
$URL = "https://www.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
}
else {
if (!$Robot) {
$URL = "https://secure.gravatar.com/avatar/".md5(strtolower(trim($Username)))."?s=$Size&d=$Type&r=$Rating";
} else {
$URL = "https://static1.robohash.org/".md5($Username)."?set=set".$Type."&size=".$Size."x".$Size;
}
if($ShowAvatar == True && !empty($Avatar)) {
if ($ShowAvatar == True && !empty($Avatar)) {
$ToReturn = $ReturnHTML ? "<img src='$Avatar' width='$Size' style='max-height:400px;' alt='$Username avatar' />" : $Avatar;
}
else {
} else {
$ToReturn = $ReturnHTML ? "<img src='$URL' width='$Size' style='max-height:400px;' alt='Default Avatar'/>" : $URL;
}
break;

View File

@ -11,7 +11,7 @@
shell_exec('unzip GeoLiteCity-latest.zip');
shell_exec('rm GeoLiteCity-latest.zip');
if(($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
if (($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
error("Download or extraction of maxmind database failed");
}
array_shift($Locations);
@ -21,7 +21,7 @@
echo "<br />";
$CountryIDs = array();
foreach($Locations as $Location) {
foreach ($Locations as $Location) {
$Parts = explode(",", $Location);
//CountryIDs[1] = "AP";
$CountryIDs[trim($Parts[0], '"')] = trim($Parts[1], '"');
@ -30,7 +30,7 @@
echo "There are ".count($CountryIDs)." CountryIDs";
echo "<br />";
if(($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
if (($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
echo "Error";
}
array_shift($Blocks);
@ -44,19 +44,19 @@
$DB->query("TRUNCATE TABLE geoip_country");
$Values = array();
foreach($Blocks as $Index => $Block) {
foreach ($Blocks as $Index => $Block) {
list($StartIP, $EndIP, $CountryID) = explode(",", $Block);
$StartIP = trim($StartIP, '"');
$EndIP = trim($EndIP, '"');
$CountryID = trim($CountryID, '"');
$Values[] = "('".$StartIP."', '".$EndIP."', '".$CountryIDs[$CountryID]."')";
if($Index % $SplitOn == 0) {
if ($Index % $SplitOn == 0) {
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
$Values = array();
}
}
if(count($Values) > 0) {
if (count($Values) > 0) {
$DB->query("INSERT INTO geoip_country (StartIP, EndIP, Code) VALUES ".implode(", ", $Values));
}
@ -68,7 +68,9 @@
*/
/*
if (!check_perms('admin_update_geoip')) { die(); }
if (!check_perms('admin_update_geoip')) {
die();
}
enforce_login();
ini_set('memory_limit',1024*1024*1024);
@ -100,7 +102,7 @@
if (preg_match('/\|([A-Z]{2})\|ipv4\|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\|(\d+)\|/', $Country, $Matches)) {
$Start = Tools::ip_to_unsigned($Matches[2]);
if($Start == 2147483647) { continue; }
if ($Start == 2147483647) { continue; }
if (!isset($Current)) {
$Current = array('StartIP' => $Start, 'EndIP' => $Start + $Matches[3],'Code' => $Matches[1]);

View File

@ -562,7 +562,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = '') {
<td>
</td>
<? } ?>
<td class="label nobr"><span title="Units are in bytes">Uploaded:</span></td>
<td class="label nobr"><span title="Units are in gibibytes (the base 2 sibling of gigabytes)">Uploaded:</span></td>
<td width="30%">
<select name="uploaded">
<option value="equal"<? if ($_GET['uploaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>
@ -596,7 +596,7 @@ function num_compare($Field, $Operand, $Num1, $Num2 = '') {
<input type="text" name="invites1" size="6" value="<?=display_str($_GET['invites1'])?>" />
<input type="text" name="invites2" size="6" value="<?=display_str($_GET['invites2'])?>" />
</td>
<td class="label nobr"><span title="Units are in bytes">Downloaded:</span></td>
<td class="label nobr"><span title="Units are in gibibytes (the base 2 sibling of gigabytes)">Downloaded:</span></td>
<td width="30%">
<select name="downloaded">
<option value="equal"<? if ($_GET['downloaded']==='equal') {echo ' selected="selected"';}?>>Equal</option>