mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 16:08:41 +00:00
fix(web/image_hosting): watermark hash suffix
This commit is contained in:
parent
8ec306e09d
commit
e41832cca7
@ -844,7 +844,7 @@ CREATE TABLE `users_images` (
|
||||
`height` int(11) NOT NULL,
|
||||
`upload_time` datetime NOT NULL,
|
||||
`size` int(11) NOT NULL,
|
||||
`hash` varchar(70) NOT NULL,
|
||||
`hash` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uploader` (`uploader`),
|
||||
KEY `path` (`path`),
|
||||
|
@ -58,10 +58,10 @@
|
||||
$watermark_text = UOJConfig::$data['profile']['oj-name-short'];
|
||||
if (isSuperUser($myUser) && $_POST['watermark'] == 'no_watermark') {
|
||||
$watermark_text = "";
|
||||
$hash .= "__no";
|
||||
$hash .= "__no_watermark";
|
||||
} elseif ($_POST['watermark'] == 'site_shortname_and_username') {
|
||||
$watermark_text .= ' @'.Auth::id();
|
||||
$hash .= "__id";
|
||||
$hash .= "__id_".Auth::id();
|
||||
}
|
||||
|
||||
$existing_image = DB::selectFirst("SELECT * FROM users_images WHERE `hash` = '$hash'");
|
||||
|
@ -14,7 +14,7 @@ CREATE TABLE `users_images` (
|
||||
`height` int(11) NOT NULL,
|
||||
`upload_time` datetime NOT NULL,
|
||||
`size` int(11) NOT NULL,
|
||||
`hash` varchar(70) NOT NULL,
|
||||
`hash` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `uploader` (`uploader`),
|
||||
KEY `path` (`path`),
|
||||
|
Loading…
Reference in New Issue
Block a user