mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-05 22:10:11 +00:00
Empty commit
This commit is contained in:
parent
76fed97814
commit
69f5523111
@ -1,5 +1,8 @@
|
|||||||
CHANGE LOG
|
CHANGE LOG
|
||||||
|
|
||||||
|
2016-02-18 by newman
|
||||||
|
Fix staff seeing FLS-assigned staff PMs. Add checkbox to allow adding a linked account or editing a linked account without updating staff notes
|
||||||
|
|
||||||
2016-02-13 by lawnmower
|
2016-02-13 by lawnmower
|
||||||
minor usability improvement to artist alias editing
|
minor usability improvement to artist alias editing
|
||||||
|
|
||||||
|
@ -45,6 +45,14 @@
|
|||||||
WHERE (LEAST($LevelCap, spc.Level) <= $UserLevel OR spc.AssignedToUser = '".$LoggedUser['ID']."')
|
WHERE (LEAST($LevelCap, spc.Level) <= $UserLevel OR spc.AssignedToUser = '".$LoggedUser['ID']."')
|
||||||
AND spc.Status IN ('$Status')";
|
AND spc.Status IN ('$Status')";
|
||||||
|
|
||||||
|
if ($ViewString == 'Your Unanswered') {
|
||||||
|
if ($UserLevel >= $Classes[MOD]['Level']) {
|
||||||
|
$WhereCondition .= " AND spc.Level >= " . $Classes[MOD]['Level'];
|
||||||
|
} else if ($UserLevel == $Classes[FORUM_MOD]['Level']) {
|
||||||
|
$WhereCondition .= " AND spc.Level >= " . $Classes[FORUM_MOD]['Level'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
list($Page, $Limit) = Format::page_limit(MESSAGES_PER_PAGE);
|
list($Page, $Limit) = Format::page_limit(MESSAGES_PER_PAGE);
|
||||||
// Get messages
|
// Get messages
|
||||||
$StaffPMs = $DB->query("
|
$StaffPMs = $DB->query("
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
function link_users($UserID, $TargetID) {
|
function link_users($UserID, $TargetID, $IgnoreComments) {
|
||||||
|
|
||||||
global $DB, $LoggedUser;
|
global $DB, $LoggedUser;
|
||||||
|
|
||||||
authorize();
|
authorize();
|
||||||
@ -69,12 +70,14 @@ function link_users($UserID, $TargetID) {
|
|||||||
$DB->query("INSERT INTO users_dupes (UserID, GroupID) VALUES ($UserID, $GroupID)");
|
$DB->query("INSERT INTO users_dupes (UserID, GroupID) VALUES ($UserID, $GroupID)");
|
||||||
}
|
}
|
||||||
|
|
||||||
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] and [user]".$TargetInfo['Username']."[/user] linked by ".$LoggedUser['Username'];
|
if (!$IgnoreComments) {
|
||||||
$DB->query("
|
$AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] and [user]".$TargetInfo['Username']."[/user] linked by ".$LoggedUser['Username'];
|
||||||
UPDATE users_info AS i
|
$DB->query("
|
||||||
JOIN users_dupes AS d ON d.UserID = i.UserID
|
UPDATE users_info AS i
|
||||||
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
JOIN users_dupes AS d ON d.UserID = i.UserID
|
||||||
WHERE d.GroupID = $GroupID");
|
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
||||||
|
WHERE d.GroupID = $GroupID");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function unlink_user($UserID) {
|
function unlink_user($UserID) {
|
||||||
@ -122,7 +125,7 @@ function delete_dupegroup($GroupID) {
|
|||||||
$DB->query("DELETE FROM dupe_groups WHERE ID = '$GroupID'");
|
$DB->query("DELETE FROM dupe_groups WHERE ID = '$GroupID'");
|
||||||
}
|
}
|
||||||
|
|
||||||
function dupe_comments($GroupID, $Comments) {
|
function dupe_comments($GroupID, $Comments, $IgnoreComments) {
|
||||||
global $DB, $LoggedUser;
|
global $DB, $LoggedUser;
|
||||||
|
|
||||||
authorize();
|
authorize();
|
||||||
@ -140,7 +143,9 @@ function dupe_comments($GroupID, $Comments) {
|
|||||||
WHERE ID = $GroupID");
|
WHERE ID = $GroupID");
|
||||||
list($OldCommentHash) = $DB->next_record();
|
list($OldCommentHash) = $DB->next_record();
|
||||||
if ($OldCommentHash != sha1($Comments)) {
|
if ($OldCommentHash != sha1($Comments)) {
|
||||||
$AdminComment = sqltime()." - Linked accounts updated: Comments updated by ".$LoggedUser['Username'];
|
if (!$IgnoreComments) {
|
||||||
|
$AdminComment = sqltime()." - Linked accounts updated: Comments updated by ".$LoggedUser['Username'];
|
||||||
|
}
|
||||||
if ($_POST['form_comment_hash'] == $OldCommentHash) {
|
if ($_POST['form_comment_hash'] == $OldCommentHash) {
|
||||||
$DB->query("
|
$DB->query("
|
||||||
UPDATE dupe_groups
|
UPDATE dupe_groups
|
||||||
@ -153,11 +158,13 @@ function dupe_comments($GroupID, $Comments) {
|
|||||||
WHERE ID = '$GroupID'");
|
WHERE ID = '$GroupID'");
|
||||||
}
|
}
|
||||||
|
|
||||||
$DB->query("
|
if (!$IgnoreComments) {
|
||||||
UPDATE users_info AS i
|
$DB->query("
|
||||||
JOIN users_dupes AS d ON d.UserID = i.UserID
|
UPDATE users_info AS i
|
||||||
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
JOIN users_dupes AS d ON d.UserID = i.UserID
|
||||||
WHERE d.GroupID = $GroupID");
|
SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment)
|
||||||
|
WHERE d.GroupID = $GroupID");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +248,9 @@ function user_dupes_table($UserID) {
|
|||||||
</table>
|
</table>
|
||||||
<div class="pad hidden linkedaccounts">
|
<div class="pad hidden linkedaccounts">
|
||||||
<label for="target">Link this user with: </label>
|
<label for="target">Link this user with: </label>
|
||||||
<input type="text" name="target" id="target" />
|
<input type="text" name="target" id="target" /><br />
|
||||||
|
<label for="ignore_comments">Do not update staff notes</label>
|
||||||
|
<input type="checkbox" name="ignore_comments" id="ignore_comments" /><br />
|
||||||
<input type="submit" value="Update" id="submitlink" />
|
<input type="submit" value="Update" id="submitlink" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
FROM users_main
|
FROM users_main
|
||||||
WHERE Username LIKE '".db_string($Target)."'");
|
WHERE Username LIKE '".db_string($Target)."'");
|
||||||
if (list($TargetID) = $DB->next_record()) {
|
if (list($TargetID) = $DB->next_record()) {
|
||||||
link_users($UserID, $TargetID);
|
link_users($UserID, $TargetID, (isset($_REQUEST['ignore_comments'])) ? true : false);
|
||||||
} else {
|
} else {
|
||||||
error("User '$Target' not found.");
|
error("User '$Target' not found.");
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@
|
|||||||
list($GroupID) = $DB->next_record();
|
list($GroupID) = $DB->next_record();
|
||||||
|
|
||||||
if ($_REQUEST['dupecomments'] && $GroupID) {
|
if ($_REQUEST['dupecomments'] && $GroupID) {
|
||||||
dupe_comments($GroupID, $_REQUEST['dupecomments']);
|
dupe_comments($GroupID, $_REQUEST['dupecomments'], (isset($_REQUEST['ignore_comments'])) ? true : false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user