Commit Graph

9 Commits

Author SHA1 Message Date
Masco Skray
2dc8e74fc1 feat(uoj/1/app): move data to the root when subfolder exists in the uploaded data zip
There is subfolder in the uploaded data archive file, we can now process it.
We will move files in the subfolder out to the data rootdir of current problem.
If you have some data archives with subfolder, don't need to repack them manually.
2019-04-16 22:48:13 +08:00
Masco Skray
2e3817cabe fix(uoj/1/app/controllers): fix problem data upload zip type detection error
In the previous version when upload a zip online, even
if it is a real zip file the system refuses to accept.
Just simply disabled this function but it is not suitable.
We found that there is not just one MIME type for zip file.
So we add another common zip MIME types to temporarily solve it.
2019-04-16 21:12:52 +08:00
Masco Skray
c1294121d3 fix(uoj/1/app/libs): fix no preview of text files in problem_data_manage
When managing data, there will be a preview of test data or validator binary file.
But in PHP7 the prefiew of test data text file or problem.conf text file is not shown.
After my test it is caused by file_get_contents() when passing offset with -1.
It is strange that the manual on php.net in Chinese the default of $offset is -1,
but in English the default of $offset is 0. Use -1 will get nothing, 0 instead is fine.
The commit also change uojFilePreview() that can also be used as viewing binary file.
For backwards compatibility, we just set text as the default file type and no need to specify.
2018-10-11 23:40:05 +08:00
Masco Skray
58e70164ba fix(uoj/1/app/controllers): fix Judgement Failed submissions table not shown for superuser
When printing the table of Judgement Failed items at super-manage, there is nothing shown.
It caused by using echoSubmissionsList(), arguments that 3 passed but exactly 4 expected.
So add the missing argument, and let the result hidden because we select an exact result.
Also, because of the typo of "Judgement", there will be nothing shown if
only fixed too few arguments. This commit changes it too.
2018-10-11 23:35:32 +08:00
Masco Skray
1d72c5e914 fix(uoj/1/app/controllers): fix login failure loop when logout from user profile modify page
When logout by clicking logout button on the top of /user/modify-profile link, you will be redirected to the login page.
But if you login immediately then you will get the login page again and loop.
It is caused by an address checking error. Now try to fix.
2018-09-23 23:14:39 +08:00
vfleaking
4d2b0735dc update: fetch commits from upstream
Update from vfleaking/uoj upstream, commit aa8a85c - 9f1302c.
Because of this repo's modify, also with the adaption of community version.
2018-09-20 19:34:38 +08:00
ceabrobot
0ec962b4af feat(uoj/1/app): modify the DB operation to support PHP7
In order to support PHP7, change the way to operate database. PHP7
removed the mysql extension, so the old way to operate database is
not usable. This commit use a new way to operate database.

BREAKING CHANGE: the way to operate database has changed.
2018-09-20 17:38:21 +08:00
MascoSkray
babd30364e Initial commit for PHP7
This is the commit before changing environment to PHP7.
2018-09-20 17:38:09 +08:00
vfleaking
82ad3efce2 Initial commit 2018-09-20 17:21:40 +08:00