Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin comments bug #74

Open
SeditioCMS opened this issue Oct 15, 2022 · 1 comment
Open

Admin comments bug #74

SeditioCMS opened this issue Oct 15, 2022 · 1 comment

Comments

@SeditioCMS
Copy link

SeditioCMS commented Oct 15, 2022

admin/comments

10?comments=1#c7
the link is not working

page_comcount not delete admin comments

new delete code

if ($a == 'delete')
{
sed_check_xg();

$sql = sed_sql_query("SELECT * FROM $db_com WHERE com_id='$id' LIMIT 1");
		$row = sed_sql_fetchassoc($sql);
		
		$sql = sed_sql_query("DELETE FROM $db_com WHERE com_id='$id'");

				if (mb_substr($row['com_code'], 0, 1) == 'p')
					{
					$page_id = mb_substr($row['com_code'], 1, 10);
					$sql = sed_sql_query("UPDATE $db_pages SET page_comcount=".sed_get_comcount($row['com_code'])." WHERE page_id=".$page_id);
					}
				$com_grp = ($usr['isadmin']) ? "adm" : "usr";	
				sed_log("Deleted comment #".$id." in '".$row['com_code']."'", $com_grp);

header("Location: ".$_SERVER['HTTP_REFERER']."");
exit;
}

avego added a commit that referenced this issue Oct 22, 2022
Fix comcount for deleting a comment from the admin panel
@avego
Copy link
Contributor

avego commented Oct 22, 2022

Fix 462e246
Thank's Kaan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants