mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-20 09:30:49 +08:00
user modify migrate
This commit is contained in:
@@ -77,7 +77,11 @@ class NexusWebUserProvider implements UserProvider
|
||||
public function validateCredentials(Authenticatable $user, array $credentials)
|
||||
{
|
||||
if ($credentials["c_secure_login"] == base64("yeah")) {
|
||||
if ($credentials["c_secure_pass"] != md5($user->passhash . getip())) {
|
||||
/**
|
||||
* Not IP related
|
||||
* @since 1.8.0
|
||||
*/
|
||||
if ($credentials["c_secure_pass"] != md5($user->passhash)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -35,12 +35,14 @@ class PluginResource extends Resource
|
||||
return self::getNavigationLabel();
|
||||
}
|
||||
|
||||
protected static bool $shouldRegisterNavigation = false;
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
Forms\Components\TextInput::make('package_name')->label(__('label.plugin.package_name')),
|
||||
Forms\Components\TextInput::make('remote_url')->label(__('label.plugin.remote_url')),
|
||||
Forms\Components\TextInput::make('package_name')->label(__('plugin.labels.package_name')),
|
||||
Forms\Components\TextInput::make('remote_url')->label(__('plugin.labels.remote_url')),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
+24
-3
@@ -82,6 +82,16 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
self::DONATE_NO => ['text' => 'No'],
|
||||
];
|
||||
|
||||
const GENDER_FEMALE = 'Female';
|
||||
const GENDER_MALE = 'Male';
|
||||
const GENDER_UNKNOWN = 'N/A';
|
||||
|
||||
public static array $genders = [
|
||||
self::GENDER_MALE => 'Male',
|
||||
self::GENDER_FEMALE => 'Female',
|
||||
self::GENDER_UNKNOWN => 'N/A',
|
||||
];
|
||||
|
||||
public static array $cardTitles = [
|
||||
'uploaded_human' => '上传量',
|
||||
'downloaded_human' => '下载量',
|
||||
@@ -269,12 +279,16 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
public function getLocaleAttribute()
|
||||
{
|
||||
$locale = Locale::getLocaleFromCookie();
|
||||
$log = "locale from cookie: $locale";
|
||||
$locale = null;
|
||||
$log = "user: " . $this->id;
|
||||
if (get_user_id() == $this->id) {
|
||||
$locale = Locale::getLocaleFromCookie();
|
||||
$log .= ", locale from cookie: $locale";
|
||||
}
|
||||
if (!$locale) {
|
||||
$lang = $this->language->site_lang_folder;
|
||||
$locale = Locale::$languageMaps[$lang] ?? 'en';
|
||||
$log .= ", [NO_DATA], lang from database: $lang, locale: $locale";
|
||||
$log .= ", [NO_DATA_FROM_COOKIE], lang from database: $lang, locale: $locale";
|
||||
}
|
||||
do_log($log);
|
||||
return $locale;
|
||||
@@ -303,6 +317,13 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
);
|
||||
}
|
||||
|
||||
protected function genderText(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
get: fn($value, $attributes) => nexus_trans('user.genders.' . $attributes['gender'])
|
||||
);
|
||||
}
|
||||
|
||||
public static function getMinSeedPoints($class)
|
||||
{
|
||||
$setting = Setting::get("account.{$class}_min_seed_points");
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Codec;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
|
||||
class CodecPolicy extends BasePolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function viewAny(User $user)
|
||||
{
|
||||
return $this->can($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view the model.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Models\Codec $codec
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function view(User $user, Codec $codec)
|
||||
{
|
||||
return $this->can($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function create(User $user)
|
||||
{
|
||||
return $this->can($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Models\Codec $codec
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function update(User $user, Codec $codec)
|
||||
{
|
||||
return $this->can($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Models\Codec $codec
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function delete(User $user, Codec $codec)
|
||||
{
|
||||
return $this->can($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can restore the model.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Models\Codec $codec
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function restore(User $user, Codec $codec)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can permanently delete the model.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Models\Codec $codec
|
||||
* @return \Illuminate\Auth\Access\Response|bool
|
||||
*/
|
||||
public function forceDelete(User $user, Codec $codec)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
private function can(User $user)
|
||||
{
|
||||
if ($user->class >= User::CLASS_SYSOP) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,23 @@ namespace App\Providers;
|
||||
|
||||
use App\Auth\NexusWebGuard;
|
||||
use App\Auth\NexusWebUserProvider;
|
||||
use App\Models\Permission;
|
||||
use App\Models\Role;
|
||||
use App\Models\AudioCodec;
|
||||
use App\Models\Category;
|
||||
use App\Models\Codec;
|
||||
use App\Models\Icon;
|
||||
use App\Models\Media;
|
||||
use App\Models\Plugin;
|
||||
use App\Models\Processing;
|
||||
use App\Models\SearchBox;
|
||||
use App\Models\SecondIcon;
|
||||
use App\Models\Source;
|
||||
use App\Models\Standard;
|
||||
use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use App\Policies\CodecPolicy;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -20,7 +30,20 @@ class AuthServiceProvider extends ServiceProvider
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
SearchBox::class => CodecPolicy::class,
|
||||
Category::class => CodecPolicy::class,
|
||||
Icon::class => CodecPolicy::class,
|
||||
SecondIcon::class => CodecPolicy::class,
|
||||
|
||||
Codec::class => CodecPolicy::class,
|
||||
AudioCodec::class => CodecPolicy::class,
|
||||
Source::class => CodecPolicy::class,
|
||||
Media::class => CodecPolicy::class,
|
||||
Standard::class => CodecPolicy::class,
|
||||
Team::class => CodecPolicy::class,
|
||||
Processing::class => CodecPolicy::class,
|
||||
|
||||
Plugin::class => CodecPolicy::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -58,7 +81,11 @@ class AuthServiceProvider extends ServiceProvider
|
||||
return null;
|
||||
}
|
||||
if ($cookie["c_secure_login"] == base64("yeah")) {
|
||||
if ($cookie["c_secure_pass"] != md5($user->passhash . getip())) {
|
||||
/**
|
||||
* Not IP related
|
||||
* @since 1.8.0
|
||||
*/
|
||||
if ($cookie["c_secure_pass"] != md5($user->passhash)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -177,6 +177,9 @@ class DashboardRepository extends BaseRepository
|
||||
|
||||
$statGender = User::query()->groupBy('gender')->selectRaw('gender, count(*) as counts')->get()->pluck('counts','gender');
|
||||
foreach ($statGender as $gender => $value) {
|
||||
if (!isset(User::$genders[$gender])) {
|
||||
$gender = User::GENDER_UNKNOWN;
|
||||
}
|
||||
$name = "gender_$gender";
|
||||
$result[$name] = [
|
||||
'name' => $name,
|
||||
|
||||
@@ -360,7 +360,9 @@ class HitAndRunRepository extends BaseRepository
|
||||
}
|
||||
$users = User::query()
|
||||
->with('language')
|
||||
->where('class', '<', User::CLASS_VIP)
|
||||
->where('enabled', User::ENABLED_YES)
|
||||
->where('donor', 'no')
|
||||
->find($result->pluck('uid')->toArray(), ['id', 'username', 'lang']);
|
||||
do_log("$logPrefix, Going to disable user: " . json_encode($users->toArray()));
|
||||
foreach ($users as $user) {
|
||||
|
||||
@@ -468,9 +468,22 @@ class UserRepository extends BaseRepository
|
||||
public function addMeta($user, array $metaData, array $keyExistsUpdates = [])
|
||||
{
|
||||
$user = $this->getUser($user);
|
||||
$locale = $user->locale;
|
||||
$metaKey = $metaData['meta_key'];
|
||||
$metaName = nexus_trans("label.user_meta.meta_keys.$metaKey", [], $locale);
|
||||
$allowMultiple = UserMeta::$metaKeys[$metaKey]['multiple'];
|
||||
$log = "user: {$user->id}, metaKey: $metaKey, allowMultiple: $allowMultiple";
|
||||
$log = "user: {$user->id}, locale: $locale, metaKey: $metaKey, allowMultiple: $allowMultiple";
|
||||
$message = [
|
||||
'receiver' => $user->id,
|
||||
'added' => now(),
|
||||
'subject' => nexus_trans('user.grant_props_notification.subject', ['name' => $metaName], $locale),
|
||||
];
|
||||
if (!empty($keyExistsUpdates['duration']) && $metaKey != UserMeta::META_KEY_CHANGE_USERNAME) {
|
||||
$durationText = $keyExistsUpdates['duration'] . " Days";
|
||||
} else {
|
||||
$durationText = nexus_trans('label.permanent', [], $locale);
|
||||
}
|
||||
$message['msg'] = nexus_trans('user.grant_props_notification.body', ['name' => $metaName, 'operator' => Auth::user()->username, 'duration' => $durationText], $locale);
|
||||
if ($allowMultiple) {
|
||||
//Allow multiple, just insert
|
||||
$result = $user->metas()->create($metaData);
|
||||
@@ -503,6 +516,7 @@ class UserRepository extends BaseRepository
|
||||
}
|
||||
if ($result) {
|
||||
clear_user_cache($user->id, $user->passkey);
|
||||
Message::query()->insert($message);
|
||||
}
|
||||
do_log($log);
|
||||
return $result;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
"ext-zend-opcache": "*",
|
||||
"doctrine/dbal": "^3.1",
|
||||
"elasticsearch/elasticsearch": "^7.16",
|
||||
"filament/filament": "2.16.36",
|
||||
"filament/filament": "2.16.41",
|
||||
"flowframe/laravel-trend": "^0.1.1",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"geoip2/geoip2": "~2.0",
|
||||
|
||||
Generated
+187
-188
File diff suppressed because it is too large
Load Diff
@@ -738,6 +738,30 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
//remove donor status if time's up
|
||||
$res = sql_query("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil is not null and donoruntil != '0000-00-00 00:00:00' and donoruntil < NOW()") or sqlerr(__FILE__, __LINE__);
|
||||
if (mysql_num_rows($res) > 0)
|
||||
{
|
||||
while ($arr = mysql_fetch_assoc($res))
|
||||
{
|
||||
$dt = sqlesc(date("Y-m-d H:i:s"));
|
||||
$subject = sqlesc($lang_cleanup_target[get_user_lang($arr['id'])]['msg_donor_status_removed']);
|
||||
$msg = sqlesc($lang_cleanup_target[get_user_lang($arr['id'])]['msg_donor_status_removed_body']);
|
||||
///---AUTOSYSTEM MODCOMMENT---//
|
||||
$modcomment = htmlspecialchars($arr["modcomment"]);
|
||||
$modcomment = date("Y-m-d") . " - donor status removed by - AutoSystem.\n". $modcomment;
|
||||
$modcom = sqlesc($modcomment);
|
||||
///---end
|
||||
sql_query("UPDATE users SET donor = 'no', modcomment = $modcom WHERE id = {$arr['id']}") or sqlerr(__FILE__, __LINE__);
|
||||
sql_query("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, {$arr['id']}, $dt, $msg, $subject)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
}
|
||||
$log = "remove donor status if time's up";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
// promote peasant back to user
|
||||
|
||||
peasant_to_user($psdlfive_account,0, $psratiofive_account);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-11-07');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-11-08');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -2659,7 +2659,7 @@ else {
|
||||
<?php if(\App\Models\Claim::getConfigIsEnabled()) { ?><font class='color_bonus'><?php echo $lang_functions['menu_claim']?></font> <?php echo sprintf('[<a href="claim.php?uid=%s">%s</a>]', $CURUSER['id'], (new \App\Repositories\ClaimRepository())->getStats($CURUSER['id']))?><?php }?>
|
||||
</span>
|
||||
</td>
|
||||
<?php if(get_setting('main.spsct') == 'yes'){?>
|
||||
<?php if(get_setting('main.spsct') == 'yes' && get_setting('main.enable_global_search') == 'yes'){?>
|
||||
<td class="bottom" align="left" style="border: none">
|
||||
<form action="search.php" method="get" target="<?php echo nexus()->getScript() == 'search' ? '_self' : '_blank'?>">
|
||||
<div style="display: flex;align-items: center">
|
||||
|
||||
@@ -16,6 +16,8 @@ $lang_cleanup_target = array
|
||||
'msg_days_or_get_banned' => " days or your account will be banned. If you have no idea of what is ratio or how it affects you, we suggest you read the [url=faq.php#idid17][b]FAQ[/b][/url].",
|
||||
'msg_vip_status_removed' => "VIP status removed by system.",
|
||||
'msg_vip_status_removed_body' => "Your VIP status has timed out and has been auto-removed by the system. Become a VIP again by exchanging some Karma Bonus Points. Cheers!",
|
||||
'msg_donor_status_removed' => "Donor status removed by system.",
|
||||
'msg_donor_status_removed_body' => "Your donor status has timed out and has been auto-removed by the system. Become a donor again by donate to us. Cheers!",
|
||||
'msg_warning_removed' => "Warning removed by System",
|
||||
'msg_your_warning_removed' => "Your warning is removed by System. We hope you would behave from now on.",
|
||||
'msg_your_torrent_deleted' => "Your torrent was deleted",
|
||||
@@ -36,6 +38,8 @@ $lang_cleanup_target = array
|
||||
'msg_days_or_get_banned' => "天内仍未设法提高分享率,你的帐户将被禁用!如果你不明白什么是分享率及其要求,请参考[url=faq.php#id17]常见问题[/url]。",
|
||||
'msg_vip_status_removed' => "VIP待遇到期",
|
||||
'msg_vip_status_removed_body' => "你的VIP待遇因到期而被系统停止。你可以使用魔力值再次获得该待遇。好运!",
|
||||
'msg_donor_status_removed' => "捐赠者待遇到期",
|
||||
'msg_donor_status_removed_body' => "你的捐赠者待遇因到期而被系统停止。你可以捐赠我们再次获得该待遇。好运!",
|
||||
'msg_warning_removed' => "警告被系统移除",
|
||||
'msg_your_warning_removed' => "你的警告被系统移除。我们希望你自此能好好表现。",
|
||||
'msg_your_torrent_deleted' => "你发布的种子被删除",
|
||||
@@ -56,6 +60,8 @@ $lang_cleanup_target = array
|
||||
'msg_days_or_get_banned' => "天內仍未設法提高分享率,你的帳戶將被禁用!如果你不明白什麼是分享率及其要求,請參考[url=faq.php#id17]常見問題[/url]。",
|
||||
'msg_vip_status_removed' => "VIP待遇到期",
|
||||
'msg_vip_status_removed_body' => "你的VIP待遇因到期而被系統停止。你可以使用魔力值再次獲得該待遇。好運!",
|
||||
'msg_donor_status_removed' => "捐贈者待遇到期",
|
||||
'msg_donor_status_removed_body' => "你的捐赠者待遇因到期而被系統停止。你可以捐贈我们再次獲得該待遇。好運!",
|
||||
'msg_warning_removed' => "警告被系統移除",
|
||||
'msg_your_warning_removed' => "你的警告被系統移除。我們希望你自此能好好表現。",
|
||||
'msg_your_torrent_deleted' => "你發布的種子被刪除",
|
||||
|
||||
@@ -51,6 +51,8 @@ $lang_modtask_target = array
|
||||
'msg_to_new' =>" to ",
|
||||
'msg_your_vip_status_changed' => "Your VIP status changed",
|
||||
'msg_vip_status_changed_by' => "Your VIP status changed by ",
|
||||
'msg_your_donor_status_changed' => "Your donor status changed",
|
||||
'msg_donor_status_changed_by' => "Your donor status changed by ",
|
||||
),
|
||||
'chs' => array(
|
||||
'msg_promoted' => "提升",
|
||||
@@ -101,6 +103,8 @@ $lang_modtask_target = array
|
||||
'msg_to_new' =>"改为",
|
||||
'msg_your_vip_status_changed' => "你的贵宾资格状态被改变",
|
||||
'msg_vip_status_changed_by' => "你的贵宾资格状态被改变。管理员:",
|
||||
'msg_your_donor_status_changed' => "你的捐赠者资格状态被改变",
|
||||
'msg_donor_status_changed_by' => "你的捐赠者资格状态被改变。管理员:",
|
||||
),
|
||||
'cht' => array(
|
||||
'msg_promoted' => "提升",
|
||||
@@ -151,6 +155,8 @@ $lang_modtask_target = array
|
||||
'msg_to_new' =>"改為",
|
||||
'msg_your_vip_status_changed' => "你的貴賓資格狀態被改變",
|
||||
'msg_vip_status_changed_by' => "你的貴賓資格狀態被改變。管理員:",
|
||||
'msg_your_donor_status_changed' => "你的捐贈資格狀態被改變",
|
||||
'msg_donor_status_changed_by' => "你的捐贈資格狀態被改變。管理員:",
|
||||
),
|
||||
'ko' => array(
|
||||
'msg_promoted' => "승급",
|
||||
|
||||
@@ -794,6 +794,8 @@ $lang_settings = array
|
||||
'row_destroy_disabled' => '彻底删除账号',
|
||||
'text_destroy_disabled_note_one' => '被封禁的账号如果连续',
|
||||
'text_destroy_disabled_note_two' => "天不登录,将被从数据库彻底物理删除。默认'500',请设置一个大于上边任何一种导致封禁的值。设为'0'来禁止此规则。",
|
||||
'row_enable_global_search_system' => '启用全站搜索',
|
||||
'text_global_search_system_note' => "默认:'是'。若启用,当有多个分区时,主菜单右下角显示全站搜索入口。",
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -794,6 +794,8 @@ $lang_settings = array
|
||||
'row_destroy_disabled' => '徹底刪除賬號',
|
||||
'text_destroy_disabled_note_one' => '被封禁的賬號如果連續',
|
||||
'text_destroy_disabled_note_two' => "天不登錄,將被從數據庫徹底物理刪除。默認'500',請設置一個大於上邊任何一種導致封禁的值。設為'0'來禁止此規則。",
|
||||
'row_enable_global_search_system' => '啟用全站搜索',
|
||||
'text_global_search_system_note' => "默認:'是'。若啟用,當有多個分區時,主菜單右下角顯示全站搜索入口。",
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -794,6 +794,8 @@ $lang_settings = array
|
||||
'row_destroy_disabled' => 'Delete account completely',
|
||||
'text_destroy_disabled_note_one' => 'Disabled accounts if they are continuously',
|
||||
'text_destroy_disabled_note_two' => "Days without logging in, will be physically deleted from the database completely. Default '500', please set a value greater than any of the above to cause disable. Set to '0' to disable this rule." ,
|
||||
'row_enable_global_search_system' => 'Enable global search',
|
||||
'text_global_search_system_note' => "Default: 'Yes'. If enabled, when there are multiple sections, the global search portal is displayed in the bottom right corner of the main menu.",
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -93,6 +93,7 @@ return array (
|
||||
'imdb_language' => 'en-US',
|
||||
'offer_skip_approved_count' => 5,
|
||||
'upload_deny_approval_deny_count' => 2,
|
||||
'enable_global_search' => 'yes',
|
||||
),
|
||||
'smtp' =>
|
||||
array (
|
||||
|
||||
+65
-52
@@ -75,7 +75,8 @@ if ($action == "edituser")
|
||||
$updateset[] = "stafffor = " . sqlesc($stafffor);
|
||||
$updateset[] = "pickfor = " . sqlesc($pickfor);
|
||||
$updateset[] = "picker = " . sqlesc($moviepicker);
|
||||
$updateset[] = "enabled = " . sqlesc($enabled);
|
||||
//migrate to management
|
||||
// $updateset[] = "enabled = " . sqlesc($enabled);
|
||||
$updateset[] = "uploadpos = " . sqlesc($uploadpos);
|
||||
$updateset[] = "downloadpos = " . sqlesc($downloadpos);
|
||||
$updateset[] = "forumpost = " . sqlesc($forumpost);
|
||||
@@ -126,38 +127,41 @@ if ($action == "edituser")
|
||||
];
|
||||
\App\Models\UsernameChangeLog::query()->create($changeLog);
|
||||
}
|
||||
if ($ori_downloaded != $downloaded){
|
||||
$updateset[] = "downloaded = " . sqlesc($downloaded);
|
||||
$modcomment = date("Y-m-d") . " - Downloaded amount changed from $arr[downloaded] to $downloaded by {$CURUSER['username']}.\n". $modcomment;
|
||||
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_downloaded_change']);
|
||||
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_downloaded_changed_from'].mksize($arr['downloaded']).$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . mksize($downloaded) .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
if ($ori_uploaded != $uploaded){
|
||||
$updateset[] = "uploaded = " . sqlesc($uploaded);
|
||||
$modcomment = date("Y-m-d") . " - Uploaded amount changed from $arr[uploaded] to $uploaded by {$CURUSER['username']}.\n". $modcomment;
|
||||
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_uploaded_change']);
|
||||
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_uploaded_changed_from'].mksize($arr['uploaded']).$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . mksize($uploaded) .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
if ($ori_bonus != $bonus){
|
||||
$updateset[] = "seedbonus = " . sqlesc($bonus);
|
||||
$modcomment = date("Y-m-d") . " - Bonus amount changed from $arr[seedbonus] to $bonus by {$CURUSER['username']}.\n". $modcomment;
|
||||
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_bonus_change']);
|
||||
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_bonus_changed_from'].$arr['seedbonus'].$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . $bonus .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
if ($arr['invites'] != $invites){
|
||||
$updateset[] = "invites = " . sqlesc($invites);
|
||||
$modcomment = date("Y-m-d") . " - Invite amount changed from $arr[invites] to $invites by {$CURUSER['username']}.\n". $modcomment;
|
||||
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_invite_change']);
|
||||
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_invite_changed_from'].$arr['invites'].$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . $invites .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
//migrate to management
|
||||
// if ($ori_downloaded != $downloaded){
|
||||
// $updateset[] = "downloaded = " . sqlesc($downloaded);
|
||||
// $modcomment = date("Y-m-d") . " - Downloaded amount changed from $arr[downloaded] to $downloaded by {$CURUSER['username']}.\n". $modcomment;
|
||||
// $subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_downloaded_change']);
|
||||
// $msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_downloaded_changed_from'].mksize($arr['downloaded']).$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . mksize($downloaded) .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
// sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
//
|
||||
// if ($ori_uploaded != $uploaded){
|
||||
// $updateset[] = "uploaded = " . sqlesc($uploaded);
|
||||
// $modcomment = date("Y-m-d") . " - Uploaded amount changed from $arr[uploaded] to $uploaded by {$CURUSER['username']}.\n". $modcomment;
|
||||
// $subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_uploaded_change']);
|
||||
// $msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_uploaded_changed_from'].mksize($arr['uploaded']).$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . mksize($uploaded) .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
// sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
// if ($ori_bonus != $bonus){
|
||||
// $updateset[] = "seedbonus = " . sqlesc($bonus);
|
||||
// $modcomment = date("Y-m-d") . " - Bonus amount changed from $arr[seedbonus] to $bonus by {$CURUSER['username']}.\n". $modcomment;
|
||||
// $subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_bonus_change']);
|
||||
// $msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_bonus_changed_from'].$arr['seedbonus'].$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . $bonus .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
// sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
// if ($arr['invites'] != $invites){
|
||||
// $updateset[] = "invites = " . sqlesc($invites);
|
||||
// $modcomment = date("Y-m-d") . " - Invite amount changed from $arr[invites] to $invites by {$CURUSER['username']}.\n". $modcomment;
|
||||
// $subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_invite_change']);
|
||||
// $msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_invite_changed_from'].$arr['invites'].$lang_modtask_target[get_user_lang($userid)]['msg_to_new'] . $invites .$lang_modtask_target[get_user_lang($userid)]['msg_by'].$CURUSER['username']);
|
||||
// sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
}
|
||||
if(get_user_class() == UC_STAFFLEADER)
|
||||
{
|
||||
$donor = $_POST["donor"];
|
||||
$donoruntil = !empty($_POST['donoruntil']) ? $_POST['donoruntil'] : null;
|
||||
$donated = $_POST["donated"];
|
||||
$donated_cny = $_POST["donated_cny"];
|
||||
$this_donated_usd = $donated - $arr["donated"];
|
||||
@@ -171,7 +175,15 @@ if ($action == "edituser")
|
||||
$updateset[] = "donated_cny = " . sqlesc($donated_cny);
|
||||
}
|
||||
$updateset[] = "donor = " . sqlesc($donor);
|
||||
$updateset[] = "donoruntil = " . sqlesc(!empty($_POST['donoruntil']) ? $_POST['donoruntil'] : null);
|
||||
$updateset[] = "donoruntil = " . sqlesc($donoruntil);
|
||||
|
||||
if (($donor != $arr['donor']) && (($donor == 'yes' && $donoruntil && $donoruntil >= date('Y-m-d H:i:s')) || ($donor == 'no'))) {
|
||||
$subject = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_your_donor_status_changed']);
|
||||
$msg = sqlesc($lang_modtask_target[get_user_lang($userid)]['msg_donor_status_changed_by'].$CURUSER['username']);
|
||||
$added = sqlesc(date("Y-m-d H:i:s"));
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
$modcomment = date("Y-m-d") . " - donor status changed by {$CURUSER['username']}. Current donor status: $donor \n". $modcomment;
|
||||
}
|
||||
}
|
||||
|
||||
if ($chpassword != "" AND $passagain != "") {
|
||||
@@ -251,28 +263,29 @@ if ($action == "edituser")
|
||||
sql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES (0, $userid, $subject, $msg, $added)") or sqlerr(__FILE__, __LINE__);
|
||||
$updateset[] = "warned = 'yes', timeswarned = timeswarned+1, lastwarned=$added, warnedby={$CURUSER['id']}";
|
||||
}
|
||||
if ($enabled != $curenabled)
|
||||
{
|
||||
if ($enabled == 'yes') {
|
||||
$modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
||||
$length = 30*86400; // warn users until 30 days
|
||||
$until = sqlesc(date("Y-m-d H:i:s",(strtotime(date("Y-m-d H:i:s")) + $length)));
|
||||
sql_query("UPDATE users SET enabled='yes', leechwarn='yes', leechwarnuntil=$until WHERE id = ".sqlesc($userid));
|
||||
}
|
||||
else{
|
||||
sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
||||
}
|
||||
} else {
|
||||
$modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
$banLog = [
|
||||
'uid' => $userid,
|
||||
'username' => $user->username,
|
||||
'operator' => $CURUSER['id'],
|
||||
'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||
];
|
||||
}
|
||||
}
|
||||
//migrate to management
|
||||
// if ($enabled != $curenabled)
|
||||
// {
|
||||
// if ($enabled == 'yes') {
|
||||
// $modcomment = date("Y-m-d") . " - Enabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
// if (get_single_value("users","class","WHERE id = ".sqlesc($userid)) == UC_PEASANT){
|
||||
// $length = 30*86400; // warn users until 30 days
|
||||
// $until = sqlesc(date("Y-m-d H:i:s",(strtotime(date("Y-m-d H:i:s")) + $length)));
|
||||
// sql_query("UPDATE users SET enabled='yes', leechwarn='yes', leechwarnuntil=$until WHERE id = ".sqlesc($userid));
|
||||
// }
|
||||
// else{
|
||||
// sql_query("UPDATE users SET enabled='yes', leechwarn='no' WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
|
||||
// }
|
||||
// } else {
|
||||
// $modcomment = date("Y-m-d") . " - Disabled by " . $CURUSER['username']. ".\n". $modcomment;
|
||||
// $banLog = [
|
||||
// 'uid' => $userid,
|
||||
// 'username' => $user->username,
|
||||
// 'operator' => $CURUSER['id'],
|
||||
// 'reason' => nexus_trans('user.edit_ban_reason', [], $user->locale),
|
||||
// ];
|
||||
// }
|
||||
// }
|
||||
if ($arr['noad'] != $noad){
|
||||
$updateset[]='noad = '.sqlesc($noad);
|
||||
$modcomment = date("Y-m-d") . " - No Ad set to ".$noad." by ". $CURUSER['username']. ".\n". $modcomment;
|
||||
|
||||
+3
-5
@@ -42,7 +42,7 @@ if ($action == 'savesettings_main') // save main
|
||||
'smalldescription','altname','extforum','extforumurl','defaultlang','defstylesheet', 'donation','spsct','browsecat','specialcat','waitsystem',
|
||||
'maxdlsystem','bitbucket','torrentnameprefix', 'showforumstats','verification','invite_count','invite_timeout', 'seeding_leeching_time_calc_start',
|
||||
'startsubid', 'logo', 'showlastxforumposts', 'enable_technical_info', 'site_language_enabled', 'show_top_uploader', 'imdb_language', 'offer_skip_approved_count',
|
||||
'upload_deny_approval_deny_count'
|
||||
'upload_deny_approval_deny_count', 'enable_global_search'
|
||||
);
|
||||
GetVar($validConfig);
|
||||
$MAIN = [];
|
||||
@@ -811,21 +811,20 @@ elseif ($action == 'mainsettings') // main settings
|
||||
yesorno($lang_settings['row_enable_nfo'],'enablenfo', $MAIN['enablenfo'], $lang_settings['text_enable_nfo_note']);
|
||||
yesorno($lang_settings['row_enable_technical_info'],'enable_technical_info', $MAIN['enable_technical_info'], $lang_settings['text_enable_technical_info']);
|
||||
yesorno($lang_settings['row_enable_school_system'],'enableschool', $MAIN['enableschool'], $lang_settings['text_school_system_note']);
|
||||
yesorno($lang_settings['row_enable_global_search_system'],'enable_global_search', $MAIN['enable_global_search'], $lang_settings['text_global_search_system_note']);
|
||||
yesorno($lang_settings['row_restrict_email_domain'],'restrictemail', $MAIN['restrictemail'], $lang_settings['text_restrict_email_domain_note']);
|
||||
yesorno($lang_settings['row_show_shoutbox'],'showshoutbox', $MAIN['showshoutbox'], $lang_settings['text_show_shoutbox_note']);
|
||||
yesorno($lang_settings['row_show_funbox'],'showfunbox', $MAIN['showfunbox'], $lang_settings['text_show_funbox_note']);
|
||||
yesorno($lang_settings['row_enable_offer_section'],'showoffer', $MAIN['showoffer'], $lang_settings['text_offer_section_note']);
|
||||
yesorno($lang_settings['row_show_donation'],'donation', $MAIN['donation'], $lang_settings['text_show_donation_note']);
|
||||
// if (THISTRACKER == "HDStar")
|
||||
yesorno($lang_settings['row_show_special_section'],'spsct', $MAIN['spsct'], $lang_settings['text_show_special_section_note']);
|
||||
yesorno($lang_settings['row_weekend_free_uploading'],'sptime', $MAIN['sptime'], $lang_settings['text_weekend_free_uploading_note']);
|
||||
yesorno($lang_settings['row_enable_helpbox'],'showhelpbox', $MAIN['showhelpbox'], $lang_settings['text_helpbox_note']);
|
||||
yesorno($lang_settings['row_enable_bitbucket'],'enablebitbucket', $MAIN['enablebitbucket'], $lang_settings['text_bitbucket_note']);
|
||||
yesorno($lang_settings['row_enable_small_description'],'smalldescription', $MAIN['smalldescription'], $lang_settings['text_small_description_note']);
|
||||
// if (THISTRACKER == "PTShow")
|
||||
yesorno($lang_settings['row_ptshow_naming_style'],'altname', $MAIN['altname'], $lang_settings['text_ptshow_naming_style_note']);
|
||||
yesorno($lang_settings['row_use_external_forum'],'extforum', $MAIN['extforum'], $lang_settings['text_use_external_forum_note']);
|
||||
tr($lang_settings['row_external_forum_url'],"<input type='text' style=\"width: 300px\" name=extforumurl value='".($MAIN["extforumurl"] ? $MAIN["extforumurl"] : "")."'> ".$lang_settings['text_external_forum_url_note'], 1);
|
||||
yesorno($lang_settings['row_show_special_section'],'spsct', $MAIN['spsct'], $lang_settings['text_show_special_section_note']);
|
||||
$res = sql_query("SELECT id, name FROM searchbox") or sqlerr(__FILE__, __LINE__);
|
||||
$catlist = "";
|
||||
$bcatlist = $scatlist = '';
|
||||
@@ -834,7 +833,6 @@ elseif ($action == 'mainsettings') // main settings
|
||||
$scatlist .= "<input type=radio name=specialcat value='".$array['id']."'".($MAIN["specialcat"] == $array['id'] ? " checked" : "").">".$array['name']." ";
|
||||
}
|
||||
tr($lang_settings['row_torrents_category_mode'], $bcatlist."<br />".$lang_settings['text_torrents_category_mode_note'], 1);
|
||||
// if (THISTRACKER == "HDStar")
|
||||
tr($lang_settings['row_special_category_mode'], $scatlist."<br />".$lang_settings['text_special_category_mode_note'], 1);
|
||||
|
||||
$allSiteLanguages = \App\Models\Language::query()->where('site_lang', 1)->get();
|
||||
|
||||
@@ -123,6 +123,7 @@ if ($CURUSER['id'] == $user['id'] || user_can('cruprfmanage'))
|
||||
$userIdDisplay = $user['id'];
|
||||
$userManageSystemUrl = sprintf('%s/%s/users/%s',getSchemeAndHttpHost(), nexus_env('FILAMENT_PATH', 'nexusphp'), $user['id']);
|
||||
$userManageSystemText = sprintf('<a href="%s" target="_blank" class="altlink">%s</a>', $userManageSystemUrl, $lang_functions['text_management_system']);
|
||||
$migratedHelp = sprintf($lang_userdetails['change_field_value_migrated'], $userManageSystemText);
|
||||
if (user_can('prfmanage') && $user["class"] < get_user_class()) {
|
||||
$userIdDisplay .= " [$userManageSystemText]";
|
||||
}
|
||||
@@ -587,8 +588,7 @@ JS;
|
||||
print("<td class=\"rowfollow\">".$lang_userdetails['text_no_warned']."</td></tr>\n");
|
||||
}
|
||||
print("</table></td></tr>");
|
||||
tr($lang_userdetails['row_enabled'], "<input name=\"enabled\" value=\"yes\" type=\"radio\"" . ($enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input name=\"enabled\" value=\"no\" type=\"radio\"" . (!$enabled ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
// tr($lang_userdetails['row_enabled'], $lang_userdetails['disable_user_migrated'], 1);
|
||||
tr($lang_userdetails['row_enabled'], $migratedHelp, 1);
|
||||
tr($lang_userdetails['row_forum_post_possible'], "<input type=\"radio\" name=\"forumpost\" value=\"yes\"" .($user["forumpost"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"forumpost\" value=\"no\"" .($user["forumpost"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_upload_possible'], "<input type=\"radio\" name=\"uploadpos\" value=\"yes\"" .($user["uploadpos"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"uploadpos\" value=\"no\"" .($user["uploadpos"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_download_possible'], "<input type=\"radio\" name=\"downloadpos\" value=\"yes\"" .($user["downloadpos"]=="yes" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_yes']."<input type=\"radio\" name=\"downloadpos\" value=\"no\"" .($user["downloadpos"]=="no" ? " checked=\"checked\"" : "") . " />".$lang_userdetails['radio_no'], 1);
|
||||
@@ -606,7 +606,6 @@ JS;
|
||||
|
||||
if (user_can('cruprfmanage'))
|
||||
{
|
||||
$migratedHelp = sprintf($lang_userdetails['change_field_value_migrated'], $userManageSystemText);
|
||||
tr($lang_userdetails['row_amount_uploaded'], "<input disabled type=\"text\" size=\"60\" name=\"uploaded\" value=\"" . htmlspecialchars($user['uploaded']) . "\" /><input type=\"hidden\" name=\"ori_uploaded\" value=\"" . htmlspecialchars($user['uploaded']) . "\" />".$migratedHelp, 1);
|
||||
tr($lang_userdetails['row_amount_downloaded'], "<input disabled type=\"text\" size=\"60\" name=\"downloaded\" value=\"" .htmlspecialchars($user['downloaded']) . "\" /><input type=\"hidden\" name=\"ori_downloaded\" value=\"" .htmlspecialchars($user['downloaded']) . "\" />".$migratedHelp, 1);
|
||||
tr($lang_userdetails['row_seeding_karma'], "<input disabled type=\"text\" size=\"60\" name=\"bonus\" value=\"" .number_format($user['seedbonus'], 1) . "\" /><input type=\"hidden\" name=\"ori_bonus\" value=\"" .number_format($user['seedbonus'], 1) . "\" />".$migratedHelp, 1);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'actions' => [
|
||||
'install' => 'Install',
|
||||
'delete' => 'Remove',
|
||||
'update' => 'Upgrade',
|
||||
],
|
||||
'labels' => [
|
||||
'display_name' => 'Name',
|
||||
'package_name' => 'Package name',
|
||||
'remote_url' => 'Repository address',
|
||||
'installed_version' => 'Installed version',
|
||||
'status' => 'Status',
|
||||
'updated_at' => 'Last action at',
|
||||
],
|
||||
'status' => [
|
||||
\App\Models\Plugin::STATUS_NORMAL => 'Normal',
|
||||
\App\Models\Plugin::STATUS_NOT_INSTALLED => 'Not installed',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_INSTALL => 'Ready to install',
|
||||
\App\Models\Plugin::STATUS_INSTALLING => 'Installing',
|
||||
\App\Models\Plugin::STATUS_INSTALL_FAILED => 'Install fail',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_UPDATE => 'Ready to upgrade',
|
||||
\App\Models\Plugin::STATUS_UPDATING => 'Upgrading',
|
||||
\App\Models\Plugin::STATUS_UPDATE_FAILED => 'Upgrade fail',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_DELETE => 'Ready to remove',
|
||||
\App\Models\Plugin::STATUS_DELETING => 'Removing',
|
||||
\App\Models\Plugin::STATUS_DELETE_FAILED => 'Remove fail',
|
||||
],
|
||||
];
|
||||
@@ -29,4 +29,13 @@ return [
|
||||
'change_username_lte_min_interval' => 'Last change time: :last_change_time, unmet minimum interval: :interval days',
|
||||
'destroy_by_admin' => 'Physical delete by administrator',
|
||||
'disable_by_admin' => 'Disable by administrator',
|
||||
'genders' => [
|
||||
\App\Models\User::GENDER_MALE => 'Male',
|
||||
\App\Models\User::GENDER_FEMALE => 'Female',
|
||||
\App\Models\User::GENDER_UNKNOWN => 'Unknown',
|
||||
],
|
||||
'grant_props_notification' => [
|
||||
'subject' => 'Get Props::name',
|
||||
'body' => ':operator Grant you :name, Validity period: :duration.',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -29,4 +29,13 @@ return [
|
||||
'change_username_lte_min_interval' => '上次修改时间::last_change_time,未满足最小间隔::interval 天',
|
||||
'destroy_by_admin' => '被管理员物理删除',
|
||||
'disable_by_admin' => '被管理員封禁',
|
||||
'genders' => [
|
||||
\App\Models\User::GENDER_MALE => '男',
|
||||
\App\Models\User::GENDER_FEMALE => '女',
|
||||
\App\Models\User::GENDER_UNKNOWN => '未知',
|
||||
],
|
||||
'grant_props_notification' => [
|
||||
'subject' => '获得道具::name',
|
||||
'body' => ':operator 授予你 :name, 有效期::duration。',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'actions' => [
|
||||
'install' => '安裝',
|
||||
'delete' => '刪除',
|
||||
'update' => '升級',
|
||||
],
|
||||
'labels' => [
|
||||
'display_name' => '名稱',
|
||||
'package_name' => '包名',
|
||||
'remote_url' => '倉庫地址',
|
||||
'installed_version' => '已安裝版本',
|
||||
'status' => '狀態',
|
||||
'updated_at' => '上次執行操作',
|
||||
],
|
||||
'status' => [
|
||||
\App\Models\Plugin::STATUS_NORMAL => '正常',
|
||||
\App\Models\Plugin::STATUS_NOT_INSTALLED => '未安裝',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_INSTALL => '準備安裝',
|
||||
\App\Models\Plugin::STATUS_INSTALLING => '安裝中',
|
||||
\App\Models\Plugin::STATUS_INSTALL_FAILED => '安裝失敗',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_UPDATE => '準備升級',
|
||||
\App\Models\Plugin::STATUS_UPDATING => '升級中',
|
||||
\App\Models\Plugin::STATUS_UPDATE_FAILED => '升級失敗',
|
||||
|
||||
\App\Models\Plugin::STATUS_PRE_DELETE => '準備刪除',
|
||||
\App\Models\Plugin::STATUS_DELETING => '刪除中',
|
||||
\App\Models\Plugin::STATUS_DELETE_FAILED => '刪除失敗',
|
||||
],
|
||||
];
|
||||
@@ -29,4 +29,13 @@ return [
|
||||
'change_username_lte_min_interval' => '上次修改時間::last_change_time,未滿足最小間隔::interval 天',
|
||||
'destroy_by_admin' => '被管理員物理刪除',
|
||||
'disable_by_admin' => '被管理员封禁',
|
||||
'genders' => [
|
||||
\App\Models\User::GENDER_MALE => '男',
|
||||
\App\Models\User::GENDER_FEMALE => '女',
|
||||
\App\Models\User::GENDER_UNKNOWN => '未知',
|
||||
],
|
||||
'grant_props_notification' => [
|
||||
'subject' => '獲得道具::name',
|
||||
'body' => ':operator 授予你 :name, 有效期::duration。',
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user