'
- . '
'
+ . ''
. ''
- . ''
+ . ''
. '
';
}
public static function div_vtextarea($name, $label_text, $default_value) {
- return '
'
+ return '
'
. ''
. ''
. ''
diff --git a/web/app/models/Upgrader.php b/web/app/models/Upgrader.php
index 05d83f7..3a98771 100644
--- a/web/app/models/Upgrader.php
+++ b/web/app/models/Upgrader.php
@@ -105,7 +105,7 @@ class Upgrader {
public static function upgradeToLatest() {
$names = array_filter(scandir(self::upgraderRoot()), function ($name) {
- return is_dir(self::upgraderRoot().'/'.$name) && preg_match('/^\d+_[a-zA-Z_]+$/', $name);
+ return is_dir(self::upgraderRoot().'/'.$name) && preg_match('/^\d+_[0-9a-zA-Z_]+$/', $name);
});
natsort($names);
diff --git a/web/app/route.php b/web/app/route.php
index dd77b1e..f4f2789 100644
--- a/web/app/route.php
+++ b/web/app/route.php
@@ -72,7 +72,7 @@ Route::group([
Route::any('/reset-password', '/reset_pw.php');
Route::any('/user/{username}', '/user_info.php');
- Route::any('/user/{username}/edit', '/user_info_edit.php');
+ Route::any('/user/{username}/edit(?:/{tab})?', '/user_info_edit.php');
Route::any('/user_msg', '/user_msg.php');
Route::any('/user/{username}/system_msg', '/user_system_msg.php');
diff --git a/web/app/upgrade/6_user_info_v2/README.md b/web/app/upgrade/6_user_info_v2/README.md
new file mode 100644
index 0000000..e0c36ee
--- /dev/null
+++ b/web/app/upgrade/6_user_info_v2/README.md
@@ -0,0 +1 @@
+ref: https://github.com/renbaoshuo/S2OJ/pull/6
diff --git a/web/app/upgrade/6_user_info_v2/down.sql b/web/app/upgrade/6_user_info_v2/down.sql
new file mode 100644
index 0000000..2609831
--- /dev/null
+++ b/web/app/upgrade/6_user_info_v2/down.sql
@@ -0,0 +1 @@
+ALTER TABLE `user_info` DROP COLUMN IF EXISTS `codeforces_handle`;
diff --git a/web/app/upgrade/6_user_info_v2/up.sql b/web/app/upgrade/6_user_info_v2/up.sql
new file mode 100644
index 0000000..fc94742
--- /dev/null
+++ b/web/app/upgrade/6_user_info_v2/up.sql
@@ -0,0 +1 @@
+ALTER TABLE `user_info` ADD COLUMN `codeforces_handle` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '';