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 {
|
class SiteHistory {
|
||||||
private static $Categories = array(1 => "Code", "Event", "Milestone", "Policy", "Release", "Staff Change");
|
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(
|
private static $Tags = array(
|
||||||
"api",
|
"api",
|
||||||
"celebration",
|
"celebration",
|
||||||
@ -10,6 +10,7 @@ class SiteHistory {
|
|||||||
"class.secondary",
|
"class.secondary",
|
||||||
"collage",
|
"collage",
|
||||||
"community",
|
"community",
|
||||||
|
"conclusion",
|
||||||
"contest",
|
"contest",
|
||||||
"design",
|
"design",
|
||||||
"donate",
|
"donate",
|
||||||
@ -39,6 +40,7 @@ class SiteHistory {
|
|||||||
"picks.staff",
|
"picks.staff",
|
||||||
"promotion",
|
"promotion",
|
||||||
"ratio",
|
"ratio",
|
||||||
|
"record",
|
||||||
"report",
|
"report",
|
||||||
"request",
|
"request",
|
||||||
"requirement",
|
"requirement",
|
||||||
@ -46,6 +48,7 @@ class SiteHistory {
|
|||||||
"rippy",
|
"rippy",
|
||||||
"search",
|
"search",
|
||||||
"settings",
|
"settings",
|
||||||
|
"start",
|
||||||
"stats",
|
"stats",
|
||||||
"store",
|
"store",
|
||||||
"stylesheet",
|
"stylesheet",
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
$Body = $_POST['body'];
|
$Body = $_POST['body'];
|
||||||
|
|
||||||
if ($LoggedUser['DisablePosting']) {
|
if (!empty($LoggedUser['DisablePosting'])) {
|
||||||
error('Your posting privileges have been removed');
|
error('Your posting privileges have been removed');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,8 +71,8 @@
|
|||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT ID, Body
|
SELECT ID, Body
|
||||||
FROM forums_posts
|
FROM forums_posts
|
||||||
WHERE TopicID='$TopicID'
|
WHERE TopicID = '$TopicID'
|
||||||
AND AuthorID='".$LoggedUser['ID']."'
|
AND AuthorID = '".$LoggedUser['ID']."'
|
||||||
ORDER BY ID DESC
|
ORDER BY ID DESC
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
list($PostID, $OldBody) = $DB->next_record(MYSQLI_NUM, false);
|
list($PostID, $OldBody) = $DB->next_record(MYSQLI_NUM, false);
|
||||||
@ -81,15 +81,17 @@
|
|||||||
$DB->query("
|
$DB->query("
|
||||||
UPDATE forums_posts
|
UPDATE forums_posts
|
||||||
SET
|
SET
|
||||||
Body = CONCAT(Body,'"."\n\n".db_string($Body)."'),
|
Body = CONCAT(Body,'\n\n".db_string($Body)."'),
|
||||||
EditedUserID = '".$LoggedUser['ID']."',
|
EditedUserID = '".$LoggedUser['ID']."',
|
||||||
EditedTime = '$SQLTime'
|
EditedTime = '$SQLTime'
|
||||||
WHERE ID='$PostID'");
|
WHERE ID = '$PostID'");
|
||||||
|
|
||||||
//Store edit history
|
//Store edit history
|
||||||
$DB->query("
|
$DB->query("
|
||||||
INSERT INTO comments_edits (Page, PostID, EditUser, EditTime, Body)
|
INSERT INTO comments_edits
|
||||||
VALUES ('forums', $PostID, ".$LoggedUser['ID'].", '$SQLTime', '".db_string($OldBody)."')");
|
(Page, PostID, EditUser, EditTime, Body)
|
||||||
|
VALUES
|
||||||
|
('forums', $PostID, ".$LoggedUser['ID'].", '$SQLTime', '".db_string($OldBody)."')");
|
||||||
$Cache->delete_value("forums_edits_$PostID");
|
$Cache->delete_value("forums_edits_$PostID");
|
||||||
|
|
||||||
//Get the catalogue it is in
|
//Get the catalogue it is in
|
||||||
@ -105,16 +107,16 @@
|
|||||||
$ThreadInfo['StickyPost']['Body'] .= "\n\n$Body";
|
$ThreadInfo['StickyPost']['Body'] .= "\n\n$Body";
|
||||||
$ThreadInfo['StickyPost']['EditedUserID'] = $LoggedUser['ID'];
|
$ThreadInfo['StickyPost']['EditedUserID'] = $LoggedUser['ID'];
|
||||||
$ThreadInfo['StickyPost']['EditedTime'] = $SQLTime;
|
$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
|
//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(
|
$Cache->update_row($Key, array(
|
||||||
'Body'=>$Cache->MemcacheDBArray[$Key]['Body']."\n\n".$Body,
|
'Body' => $Cache->MemcacheDBArray[$Key]['Body']."\n\n$Body",
|
||||||
'EditedUserID'=>$LoggedUser['ID'],
|
'EditedUserID' => $LoggedUser['ID'],
|
||||||
'EditedTime'=>$SQLTime,
|
'EditedTime' => $SQLTime,
|
||||||
'Username'=>$LoggedUser['Username']
|
'Username' => $LoggedUser['Username']
|
||||||
));
|
));
|
||||||
$Cache->commit_transaction(0);
|
$Cache->commit_transaction(0);
|
||||||
|
|
||||||
@ -131,7 +133,7 @@
|
|||||||
$DB->query("
|
$DB->query("
|
||||||
UPDATE forums
|
UPDATE forums
|
||||||
SET
|
SET
|
||||||
NumPosts = NumPosts+1,
|
NumPosts = NumPosts + 1,
|
||||||
LastPostID = '$PostID',
|
LastPostID = '$PostID',
|
||||||
LastPostAuthorID = '".$LoggedUser['ID']."',
|
LastPostAuthorID = '".$LoggedUser['ID']."',
|
||||||
LastPostTopicID = '$TopicID',
|
LastPostTopicID = '$TopicID',
|
||||||
@ -181,7 +183,7 @@
|
|||||||
FROM forums_topics AS f
|
FROM forums_topics AS f
|
||||||
LEFT JOIN forums_polls AS p ON p.TopicID = f.ID
|
LEFT JOIN forums_polls AS p ON p.TopicID = f.ID
|
||||||
WHERE f.ID = '$TopicID'");
|
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(
|
$Part2 = array($TopicID => array(
|
||||||
'ID' => $TopicID,
|
'ID' => $TopicID,
|
||||||
'Title' => $ThreadInfo['Title'],
|
'Title' => $ThreadInfo['Title'],
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* @return string $Row
|
* @return string $Row
|
||||||
*/
|
*/
|
||||||
function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user') {
|
function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user') {
|
||||||
|
$Text = new Text;
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||||
|
|
||||||
echo "\t\t\t<tr class=\"row$Row\">
|
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 "$HiddenBy";
|
||||||
}
|
}
|
||||||
echo "\n\t\t\t\t</td>
|
echo "\n\t\t\t\t</td>
|
||||||
<td class=\"nobr\">
|
<td class=\"nobr\">"
|
||||||
$Remark
|
. $Text->full_format($Remark) .
|
||||||
</td>
|
"</td>
|
||||||
</tr>\n"; // the "\n" is needed for pretty HTML
|
</tr>\n"; // the "\n" is needed for pretty HTML
|
||||||
// the foreach loop that calls this function needs to know the new value of $Row
|
// the foreach loop that calls this function needs to know the new value of $Row
|
||||||
return $Row;
|
return $Row;
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -189,7 +189,7 @@
|
|||||||
$Row = 'a';
|
$Row = 'a';
|
||||||
foreach ($Pending as $Invite) {
|
foreach ($Pending as $Invite) {
|
||||||
list($InviteKey, $Email, $Expires) = $Invite;
|
list($InviteKey, $Email, $Expires) = $Invite;
|
||||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
$Row = $Row === 'a' ? 'b' : 'a';
|
||||||
?>
|
?>
|
||||||
<tr class="row<?=$Row?>">
|
<tr class="row<?=$Row?>">
|
||||||
<td><?=display_str($Email)?></td>
|
<td><?=display_str($Email)?></td>
|
||||||
@ -219,7 +219,7 @@
|
|||||||
$Row = 'a';
|
$Row = 'a';
|
||||||
foreach ($Invited as $User) {
|
foreach ($Invited as $User) {
|
||||||
list($ID, $Email, $Uploaded, $Downloaded, $JoinDate, $LastAccess) = $User;
|
list($ID, $Email, $Uploaded, $Downloaded, $JoinDate, $LastAccess) = $User;
|
||||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
$Row = $Row === 'a' ? 'b' : 'a';
|
||||||
?>
|
?>
|
||||||
<tr class="row<?=$Row?>">
|
<tr class="row<?=$Row?>">
|
||||||
<td><?=Users::format_username($ID, true, true, true, true)?></td>
|
<td><?=Users::format_username($ID, true, true, true, true)?></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user