diff --git a/classes/sitehistory.class.php b/classes/sitehistory.class.php index 51a744ad..da229c12 100644 --- a/classes/sitehistory.class.php +++ b/classes/sitehistory.class.php @@ -2,7 +2,7 @@ class SiteHistory { private static $Categories = array(1 => "Code", "Event", "Milestone", "Policy", "Release", "Staff Change"); - private static $SubCategories = array(1 => "Announcement", "Blog Post", "Change Log", "Forum Post", "Wiki"); + private static $SubCategories = array(1 => "Announcement", "Blog Post", "Change Log", "Forum Post", "Wiki", "Other", "External Source"); private static $Tags = array( "api", "celebration", @@ -10,6 +10,7 @@ class SiteHistory { "class.secondary", "collage", "community", + "conclusion", "contest", "design", "donate", @@ -39,6 +40,7 @@ class SiteHistory { "picks.staff", "promotion", "ratio", + "record", "report", "request", "requirement", @@ -46,6 +48,7 @@ class SiteHistory { "rippy", "search", "settings", + "start", "stats", "store", "stylesheet", diff --git a/sections/forums/take_reply.php b/sections/forums/take_reply.php index e0ed7457..0dbef820 100644 --- a/sections/forums/take_reply.php +++ b/sections/forums/take_reply.php @@ -42,7 +42,7 @@ $Body = $_POST['body']; -if ($LoggedUser['DisablePosting']) { +if (!empty($LoggedUser['DisablePosting'])) { error('Your posting privileges have been removed'); } @@ -71,8 +71,8 @@ $DB->query(" SELECT ID, Body FROM forums_posts - WHERE TopicID='$TopicID' - AND AuthorID='".$LoggedUser['ID']."' + WHERE TopicID = '$TopicID' + AND AuthorID = '".$LoggedUser['ID']."' ORDER BY ID DESC LIMIT 1"); list($PostID, $OldBody) = $DB->next_record(MYSQLI_NUM, false); @@ -81,15 +81,17 @@ $DB->query(" UPDATE forums_posts SET - Body = CONCAT(Body,'"."\n\n".db_string($Body)."'), + Body = CONCAT(Body,'\n\n".db_string($Body)."'), EditedUserID = '".$LoggedUser['ID']."', EditedTime = '$SQLTime' - WHERE ID='$PostID'"); + WHERE ID = '$PostID'"); //Store edit history $DB->query(" - INSERT INTO comments_edits (Page, PostID, EditUser, EditTime, Body) - VALUES ('forums', $PostID, ".$LoggedUser['ID'].", '$SQLTime', '".db_string($OldBody)."')"); + INSERT INTO comments_edits + (Page, PostID, EditUser, EditTime, Body) + VALUES + ('forums', $PostID, ".$LoggedUser['ID'].", '$SQLTime', '".db_string($OldBody)."')"); $Cache->delete_value("forums_edits_$PostID"); //Get the catalogue it is in @@ -105,16 +107,16 @@ $ThreadInfo['StickyPost']['Body'] .= "\n\n$Body"; $ThreadInfo['StickyPost']['EditedUserID'] = $LoggedUser['ID']; $ThreadInfo['StickyPost']['EditedTime'] = $SQLTime; - $Cache->cache_value('thread_'.$TopicID.'_info', $ThreadInfo, 0); + $Cache->cache_value("thread_$TopicID".'_info', $ThreadInfo, 0); } //Edit the post in the cache - $Cache->begin_transaction('thread_'.$TopicID.'_catalogue_'.$CatalogueID); + $Cache->begin_transaction("thread_$TopicID"."_catalogue_$CatalogueID"); $Cache->update_row($Key, array( - 'Body'=>$Cache->MemcacheDBArray[$Key]['Body']."\n\n".$Body, - 'EditedUserID'=>$LoggedUser['ID'], - 'EditedTime'=>$SQLTime, - 'Username'=>$LoggedUser['Username'] + 'Body' => $Cache->MemcacheDBArray[$Key]['Body']."\n\n$Body", + 'EditedUserID' => $LoggedUser['ID'], + 'EditedTime' => $SQLTime, + 'Username' => $LoggedUser['Username'] )); $Cache->commit_transaction(0); @@ -131,7 +133,7 @@ $DB->query(" UPDATE forums SET - NumPosts = NumPosts+1, + NumPosts = NumPosts + 1, LastPostID = '$PostID', LastPostAuthorID = '".$LoggedUser['ID']."', LastPostTopicID = '$TopicID', @@ -181,7 +183,7 @@ FROM forums_topics AS f LEFT JOIN forums_polls AS p ON p.TopicID = f.ID WHERE f.ID = '$TopicID'"); - list($AuthorID,$IsLocked,$IsSticky,$NumPosts,$NoPoll) = $DB->next_record(); + list($AuthorID, $IsLocked, $IsSticky, $NumPosts, $NoPoll) = $DB->next_record(); $Part2 = array($TopicID => array( 'ID' => $TopicID, 'Title' => $ThreadInfo['Title'], diff --git a/sections/staff/functions.php b/sections/staff/functions.php index dff47a7f..984f25fe 100644 --- a/sections/staff/functions.php +++ b/sections/staff/functions.php @@ -13,6 +13,7 @@ * @return string $Row */ function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user') { + $Text = new Text; $Row = ($Row == 'a') ? 'b' : 'a'; echo "\t\t\t @@ -27,9 +28,9 @@ function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', echo "$HiddenBy"; } echo "\n\t\t\t\t - - $Remark - + " + . $Text->full_format($Remark) . + " \n"; // the "\n" is needed for pretty HTML // the foreach loop that calls this function needs to know the new value of $Row return $Row; diff --git a/sections/user/invite.php b/sections/user/invite.php index 1d65dec3..4a4800da 100644 --- a/sections/user/invite.php +++ b/sections/user/invite.php @@ -156,7 +156,7 @@ - + @@ -189,7 +189,7 @@ $Row = 'a'; foreach ($Pending as $Invite) { list($InviteKey, $Email, $Expires) = $Invite; - $Row = (($Row == 'a') ? 'b' : 'a'); + $Row = $Row === 'a' ? 'b' : 'a'; ?> @@ -219,7 +219,7 @@ $Row = 'a'; foreach ($Invited as $User) { list($ID, $Email, $Uploaded, $Downloaded, $JoinDate, $LastAccess) = $User; - $Row = (($Row == 'a') ? 'b' : 'a'); + $Row = $Row === 'a' ? 'b' : 'a'; ?>