diff --git a/classes/class_torrents.php b/classes/class_torrents.php index e3fb6364..7d11622c 100644 --- a/classes/class_torrents.php +++ b/classes/class_torrents.php @@ -455,7 +455,7 @@ public static function regenerate_filelist($TorrentID) { $TmpFileList[] = self::filelist_format_file($File); } $FilePath = isset($Tor->Val['info']->Val['files']) ? Format::make_utf8($Tor->get_name()) : ""; - $FileString = Format::make_utf8(implode("\n", $TmpFileList)); + $FileString = implode("\n", $TmpFileList); $DB->query("UPDATE torrents SET Size = ".$TotalSize.", FilePath = '".db_string($FilePath)."', FileList = '".db_string($FileString)."' WHERE ID = ".$TorrentID); $Cache->delete_value('torrents_details_'.$GroupID); } @@ -482,8 +482,8 @@ public static function filelist_format_file($File) { list($Size, $Name) = $File; $Name = Format::make_utf8(strtr($Name, "\n\r\t", " ")); $ExtPos = strrpos($Name, '.'); - $Ext = $ExtPos ? substr($Name, $ExtPos) : ''; - return sprintf("%s s%ds %s %s", $Ext, $Size, $Name, self::filelist_delim()); + $Ext = $ExtPos ? trim(substr($Name, $ExtPos+1)) : ''; + return sprintf("%s s%ds %s %s", ".$Ext", $Size, $Name, self::filelist_delim()); } /** diff --git a/design/privateheader.php b/design/privateheader.php index d16a8f2b..bf1b8e99 100644 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -242,6 +242,34 @@ $Alerts[] = ''.'New Blog Post!'.''; } +// Staff blog +if(check_perms('users_mod')) { + global $SBlogReadTime, $LatestSBlogTime; + if (!$SBlogReadTime && ($SBlogReadTime = $Cache->get_value('staff_blog_read_'.$LoggedUser['ID'])) === false) { + $DB->query("SELECT Time FROM staff_blog_visits WHERE UserID = ".$LoggedUser['ID']); + if (list($SBlogReadTime) = $DB->next_record()) { + $SBlogReadTime = strtotime($SBlogReadTime); + } else { + $SBlogReadTime = 0; + } + $Cache->cache_value('staff_blog_read_'.$LoggedUser['ID'], $SBlogReadTime, 1209600); + } + if (!$LatestSBlogTime && ($LatestSBlogTime = $Cache->get_value('staff_blog_latest_time')) === false) { + $DB->query("SELECT MAX(Time) FROM staff_blog"); + if (list($LatestSBlogTime) = $DB->next_record()) { + $LatestSBlogTime = strtotime($LatestSBlogTime); + } else { + $LatestSBlogTime = 0; + } + $Cache->cache_value('staff_blog_latest_time', $LatestSBlogTime, 1209600); + } + if ($SBlogReadTime < $LatestSBlogTime) { + global $Debug; + $Debug->log_var(array('b' => $SBlogReadTime, 'l' => $LatestSBlogTime), 'Times'); + $Alerts[] = ''.'New Staff Blog Post!'.''; + } +} + //Staff PM $NewStaffPMs = $Cache->get_value('staff_pm_new_'.$LoggedUser['ID']); if ($NewStaffPMs === false) { diff --git a/design/views/generic/reply/staffpm.php b/design/views/generic/reply/staffpm.php index 7b8ddceb..1803555d 100644 --- a/design/views/generic/reply/staffpm.php +++ b/design/views/generic/reply/staffpm.php @@ -1,25 +1,25 @@ -
-
- -

- -
- -

- -
- - Send to: - - - - - -
+
+
+ +

+ +
+ +

+ +
+ + Send to: + + + + + +
\ No newline at end of file diff --git a/sections/artist/artist_rearrange.php b/sections/artist/artist_rearrange.php index 5e8d8bb5..9d404b5c 100644 --- a/sections/artist/artist_rearrange.php +++ b/sections/artist/artist_rearrange.php @@ -360,7 +360,7 @@ function display_name($ReleaseType) { - [ DL ] + DL   »  diff --git a/sections/forums/forum.php b/sections/forums/forum.php index be2ed7d9..a6095837 100644 --- a/sections/forums/forum.php +++ b/sections/forums/forum.php @@ -111,9 +111,6 @@
- - Scoreboard - to_array(); - $Cache->cache_value('staff_blog',$Blog,1209600); + $Blog = $DB->to_array(false, MYSQLI_NUM); + $Cache->cache_value('staff_blog', $Blog, 1209600); } -if(($ReadTime = $Cache->get_value('staff_blog_read_'.$LoggedUser['ID'])) === false) { +if (($SBlogReadTime = $Cache->get_value('staff_blog_read_'.$LoggedUser['ID'])) === false) { $DB->query("SELECT Time FROM staff_blog_visits WHERE UserID = ".$LoggedUser['ID']); - if (list($ReadTime) = $DB->next_record()) { - $ReadTime = strtotime($ReadTime); + if (list($SBlogReadTime) = $DB->next_record()) { + $SBlogReadTime = strtotime($SBlogReadTime); } else { - $ReadTime = 0; + $SBlogReadTime = 0; } - $Cache->cache_value('staff_blog_read_'.$LoggedUser['ID'],$ReadTime,1209600); + $Cache->cache_value('staff_blog_read_'.$LoggedUser['ID'], $SBlogReadTime, 1209600); } ?>