mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
ded9f7ddad
commit
e0246b7d98
@ -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",
|
||||
|
@ -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'],
|
||||
|
@ -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<tr class=\"row$Row\">
|
||||
@ -27,9 +28,9 @@ function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '',
|
||||
echo "$HiddenBy";
|
||||
}
|
||||
echo "\n\t\t\t\t</td>
|
||||
<td class=\"nobr\">
|
||||
$Remark
|
||||
</td>
|
||||
<td class=\"nobr\">"
|
||||
. $Text->full_format($Remark) .
|
||||
"</td>
|
||||
</tr>\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;
|
||||
|
@ -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';
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td><?=display_str($Email)?></td>
|
||||
@ -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';
|
||||
?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td><?=Users::format_username($ID, true, true, true, true)?></td>
|
||||
|
Loading…
Reference in New Issue
Block a user