From f06b342f493b96c077422a22871614a520ed6386 Mon Sep 17 00:00:00 2001 From: Rhilip Date: Wed, 2 Oct 2019 20:06:14 +0800 Subject: [PATCH] feat(Torrent): Per-add torrent edit 1. Move torrent upload back to route 'torrent/upload' 2. --- CHANGELOG.md | 3 + application/Controllers/CaptchaController.php | 2 +- application/Controllers/LinksController.php | 2 +- application/Controllers/RssController.php | 1 - application/Controllers/TorrentController.php | 45 ++++ .../Controllers/TorrentsController.php | 25 -- application/Models/Form/Torrent/EditForm.php | 253 ++++++++++++++++++ .../Form/{Torrents => Torrent}/UploadForm.php | 141 +--------- application/Models/Torrent.php | 30 ++- framework/Component/I18n.php | 16 +- framework/Validators/Validator.php | 4 + framework/functions.php | 2 +- templates/auth/login.php | 6 +- templates/layout/nav_anonymous.php | 4 +- templates/layout/nav_user.php | 2 +- templates/torrent/edit.php | 210 +++++++++++++++ templates/{torrents => torrent}/upload.php | 0 translations/locale-en.json | 13 +- translations/locale-zh_CN.json | 13 +- 19 files changed, 586 insertions(+), 186 deletions(-) create mode 100644 application/Models/Form/Torrent/EditForm.php rename application/Models/Form/{Torrents => Torrent}/UploadForm.php (76%) create mode 100644 templates/torrent/edit.php rename templates/{torrents => torrent}/upload.php (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0463e9e..68f344c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## [Unreleased] +### Docs +- **Sponsor:** Add Sponsor `MeiHeZi` (ae612e0) + ## [v0.1.6-alpha] - 2019-09-20 diff --git a/application/Controllers/CaptchaController.php b/application/Controllers/CaptchaController.php index c370322..883eb14 100644 --- a/application/Controllers/CaptchaController.php +++ b/application/Controllers/CaptchaController.php @@ -18,7 +18,7 @@ public function actionIndex() $captcha = new Captcha([ 'width' => 150, 'height' => 40, - 'fontFile' => RIDPT_ROOT . '/public/static/fonts/Times New Roman.ttf', // FIXME + 'fontFile' => RIDPT_ROOT . '/public/static/fonts/Times New Roman.ttf', 'fontSize' => 20, 'wordNumber' => 6, 'angleRand' => [-20, 20], diff --git a/application/Controllers/LinksController.php b/application/Controllers/LinksController.php index 105314d..d5ba875 100644 --- a/application/Controllers/LinksController.php +++ b/application/Controllers/LinksController.php @@ -26,7 +26,7 @@ public function actionApply() $success = $form->validate(); if ($success) { $form->flush(); - return $this->render('action/success', ['msg' => 'Thanks you to apply links, Our team will check it ASAP.']); // FIXME + return $this->render('action/success', ['msg' => __('form.link_apply.msg_success')]); } else { return $this->render('action/fail', ['msg' => $form->getError()]); } diff --git a/application/Controllers/RssController.php b/application/Controllers/RssController.php index 05c0af3..21374cf 100644 --- a/application/Controllers/RssController.php +++ b/application/Controllers/RssController.php @@ -16,7 +16,6 @@ class RssController extends Controller { public function actionIndex() { - // FIXME add torrent search $feed = new FeedForm(); if (false === $feed->validate()) { return $this->render('action/fail', ['msg' => $feed->getError()]); diff --git a/application/Controllers/TorrentController.php b/application/Controllers/TorrentController.php index ba3e712..f0b736c 100644 --- a/application/Controllers/TorrentController.php +++ b/application/Controllers/TorrentController.php @@ -12,8 +12,34 @@ use Rid\Http\Controller; +use Exception; + class TorrentController extends Controller { + public function actionUpload() + { + // TODO Check user upload pos + if (app()->request->isPost()) { + $uploadForm = new Torrent\UploadForm(); + $uploadForm->setInput(app()->request->post()); + $uploadForm->setFileInput(app()->request->files()); + $success = $uploadForm->validate(); + if (!$success) { + return $this->render('action/fail', ['title' => 'Upload Failed', 'msg' => $uploadForm->getError()]); + } else { + try { + $uploadForm->flush(); + } catch (Exception $e) { + return $this->render('action/fail', ['title' => 'Upload Failed', 'msg' => $e->getMessage()]); + } + + return app()->response->redirect('/torrent/details?id=' . $uploadForm->getId()); + } + } else { + return $this->render('torrent/upload'); + } + } + public function actionDetails() { $details = new Torrent\DetailsForm(); @@ -27,7 +53,26 @@ public function actionDetails() public function actionEdit() // TODO { + $edit = new Torrent\EditForm(); + if (app()->request->isPost()) { + $edit->setInput(app()->request->get() + app()->request->post()); + $success = $edit->validate(); + if (!$success) { + return $this->render('action/fail', ['msg' => $edit->getError()]); + } else { + $edit->flush(); + return app()->response->redirect('/torrent/details?id=' . $edit->getTorrent()->getId()); + } + } else { + $edit->setInput(app()->request->get()); + $permission_check = $edit->checkUserPermission(); + if ($permission_check === false) { + return $this->render('action/fail', ['msg' => $edit->getError()]); + } else { + return $this->render('torrent/edit', ['edit' => $edit]); + } + } } public function actionSnatch() diff --git a/application/Controllers/TorrentsController.php b/application/Controllers/TorrentsController.php index 00c1116..7e072bc 100644 --- a/application/Controllers/TorrentsController.php +++ b/application/Controllers/TorrentsController.php @@ -32,31 +32,6 @@ public function actionSearch() return $this->render('torrents/search', ['search' => $search]); } - public function actionUpload() - { - // TODO Check user upload pos - if (app()->request->isPost()) { - $uploadForm = new Torrents\UploadForm(); - $uploadForm->setInput(app()->request->post()); - $uploadForm->setFileInput(app()->request->files()); - $success = $uploadForm->validate(); - if (!$success) { - return $this->render('action/fail', ['title' => 'Upload Failed', 'msg' => $uploadForm->getError()]); - } else { - try { - $uploadForm->flush(); - } catch (\Exception $e) { - return $this->render('action/fail', ['title' => 'Upload Failed', 'msg' => $e->getMessage()]); - } - - return app()->response->redirect('/torrent/details?id=' . $uploadForm->getId()); - } - } else { - return $this->render('torrents/upload'); - } - - } - public function actionTags() { $pager = new Torrents\TagsForm(); diff --git a/application/Models/Form/Torrent/EditForm.php b/application/Models/Form/Torrent/EditForm.php new file mode 100644 index 0000000..7477ba3 --- /dev/null +++ b/application/Models/Form/Torrent/EditForm.php @@ -0,0 +1,253 @@ + 'required', + 'category' => [ + ['required'], ['Integer'], + ['InList', ['list' => array_map(function ($cat) { + return $cat['id']; + }, app()->site->ruleCanUsedCategory() + )]] + ], + 'descr' => 'required', + ]; + + // Add Quality Valid + foreach (app()->site->getQualityTableList() as $quality => $title) { + $quality_id_list = [0]; + // IF enabled this quality field , then load it value list from setting + // Else we just allow the default value 0 to prevent cheating + if (config('torrent_upload.enable_quality_' . $quality)) { + foreach (app()->site->ruleQuality($quality) as $cat) { + $quality_id_list[] = $cat['id']; + } + } + + $rules[$quality] = [ + ['Integer'], + ['InList', ['list' => $quality_id_list]] + ]; + } + + // Add Team id Valid + $team_id_list = [0]; + if (config('torrent_upload.enable_teams')) { + foreach (app()->site->ruleTeam() as $team) { + if (app()->auth->getCurUser()->getClass() >= $team['class_require']) { + $team_id_list[] = $team['id']; + } + } + } + + $rules['team'] = [ + ['Integer'], + ['InList', ['list' => $team_id_list]] + ]; + + // Add Flag Valid + // Notice: we don't valid if user have privilege to use this value, + // Un privilege flag will be rewrite in rewriteFlags() when call flush() + if (config('torrent_upload.enable_anonymous')) { + $rules['uplver'] = [ + ['InList', ['list' => [0, 1]]] + ]; + } + if (config('torrent_upload.enable_hr')) { + $rules['hr'] = [ + ['InList', ['list' => [0, 1]]] + ]; + } + + return $rules; + } + + /** + * @return array + */ + public static function inputRules(): array + { + $rules = static::baseTorrentRules(); + $rules['id'] = 'Required | Integer'; + + if (config('torrent_upload.enable_upload_nfo') // Enable nfo upload + && app()->auth->getCurUser()->isPrivilege('upload_nfo_file') // This user can upload nfo + ) { + $rules['nfo_action'] = [ + ['required'], + ['InList', ['list' => ['keep', 'remove', 'update']]] + ]; + + // Nfo file upload + if (app()->request->post('nfo_action', 'keep') == 'update') { + $rules['nfo'] = [ + ['Upload\Extension', ['allowed' => ['nfo', 'txt']]], + ['Upload\Size', ['size' => config('upload.max_nfo_file_size') . 'B']] + ]; + } + } + + if (app()->auth->getCurUser()->isPrivilege('manage_torrents')) { + $rules['status'] = [ + ['required'], + ['InList', ['list' => Torrent::TORRENT_STATUSES]] + ]; + } + + return $rules; + } + + public static function callbackRules(): array + { + return ['isExistTorrent', 'checkUserPermission']; + } + + public function checkUserPermission() + { + // Get Torrent if not in validate + if ($this->torrent === null) { + $this->isExistTorrent(); + if ($this->getError()) { return false; + } + } + + if (app()->auth->getCurUser()->getId() != $this->torrent->getOwnerId() // User is torrent owner + || !app()->auth->getCurUser()->isPrivilege('manage_torrents') // User can manager torrents + ) { + $this->buildCallbackFailMsg('owner', 'You can\'t edit torrent which is not belong to you.'); + return false; + } + + // TODO Check Other Permission and store in class pro + + return true; + } + + public function flush() + { + $this->rewriteFlags(); + $tags = $this->getTags(); + app()->pdo->createCommand(' + UPDATE `torrents` SET title = :title, subtitle = :subtitle, + category = :category, team = :team, quality_audio = :audio, quality_codec = :codec, + quality_medium = :medium, quality_resolution = :resolution, + descr = :descr, tags = JSON_ARRAY(:tags), nfo=:nfo,uplver = :uplver, hr = :hr + WHERE id = :tid')->bindParams([ + 'tid' => $this->id, + 'title' => $this->title, 'subtitle' => $this->subtitle, + 'category' => $this->category, 'team' => $this->team, + 'audio' => $this->audio, 'codec' => $this->codec, 'medium' => $this->medium, 'resolution' => $this->resolution, + 'descr' => $this->descr, 'tags' => $tags, 'nfo' => $this->getInputNfo(), + 'uplver' => $this->anonymous, 'hr' => $this->hr + ])->execute(); + + app()->redis->del(Constant::torrentContent($this->id)); + // Delete cache + } + + private function getInputNfo() + { + $action = $this->getInput('nfo_action', 'keep'); + if ($action == 'remove') { + return ''; + } elseif ($action == 'update') { + return $this->nfo->getFileContent(); + } else { + return $this->torrent->getNfo(false); + } + } + + // Check and rewrite torrent flags based on site config and user's privilege of upload flags + protected function rewriteFlags() + { + foreach (['anonymous', 'hr'] as $flag) { + $config = config('torrent_upload.enable_' . $flag); + if ($config == 2) { // if global config force enabled this flag + $this->$flag = 1; + } elseif ($config == 0) { // if global config disabled this flag + $this->$flag = 0; + } else { // check if user can use this flag + if (!app()->auth->getCurUser()->isPrivilege('upload_flag_' . $flag)) { + $this->$flag = 0; + } + } + } + } + + protected function getTags(): array + { + $tags_list = []; + if (config('torrent_upload.enable_tags')) { + $tags = str_replace(',', ' ', $this->tags); + $tags_list = explode(' ', $tags); + $tags_list = array_slice($tags_list, 0, 10); // Get first 10 tags + + if (!config('torrent_upload.allow_new_custom_tags')) { + $rule_pinned_tags = array_keys(app()->site->rulePinnedTags()); + $tags_list = array_intersect($rule_pinned_tags, $tags_list); + } + } + + return $tags_list; + } + + protected function updateTagsTable(array $tags) + { + foreach ($tags as $tag) { + app()->pdo->createCommand('INSERT INTO tags (tag) VALUES (:tag) ON DUPLICATE KEY UPDATE `count` = `count` + 1;')->bindParams([ + 'tag' => $tag + ])->execute(); + } + } + +} diff --git a/application/Models/Form/Torrents/UploadForm.php b/application/Models/Form/Torrent/UploadForm.php similarity index 76% rename from application/Models/Form/Torrents/UploadForm.php rename to application/Models/Form/Torrent/UploadForm.php index 18e611b..4d4eb63 100644 --- a/application/Models/Form/Torrents/UploadForm.php +++ b/application/Models/Form/Torrent/UploadForm.php @@ -6,43 +6,20 @@ * Time: 21:45 */ -namespace App\Models\Form\Torrents; +namespace App\Models\Form\Torrent; use App\Libraries\Constant; use Rid\Http\UploadFile; -use Rid\Validators\Validator; use App\Libraries\Bencode\Bencode; use App\Libraries\Bencode\ParseErrorException; -class UploadForm extends Validator +class UploadForm extends EditForm { /** @var UploadFile */ public $file; - /** @var UploadFile */ - public $nfo; - - public $category; - public $title; - public $subtitle = ''; - public $links; - public $descr; - - public $anonymous = 0; // If user upload this torrent Anonymous - public $hr = 0; // If This torrent require hr check - - // Quality - public $audio = 0; /* 0 is default value. */ - public $codec = 0; - public $medium = 0; - public $resolution = 0; - - public $team = 0; - public $tags; - - private $id = 0; private $info_hash; // the value of sha1($this->$torrent_dict['info']) private $status = 'confirmed'; @@ -82,23 +59,12 @@ public static function defaultData(): array public static function inputRules(): array { - $categories_id_list = array_map(function ($cat) { - return $cat['id']; - }, app()->site->ruleCanUsedCategory()); - - $rules = [ - 'title' => 'required', - 'file' => [ - ['required'], - ['Upload\Required'], - ['Upload\Extension', ['allowed' => 'torrent']], - ['Upload\Size', ['size' => config('upload.max_torrent_file_size') . 'B']] - ], - 'category' => [ - ['required'], ['Integer'], - ['InList', ['list' => $categories_id_list]] - ], - 'descr' => 'required', + $rules = static::baseTorrentRules(); + $rules['file'] = [ + ['required'], + ['Upload\Required'], + ['Upload\Extension', ['allowed' => 'torrent']], + ['Upload\Size', ['size' => config('upload.max_torrent_file_size') . 'B']] ]; if (config('torrent_upload.enable_upload_nfo') && // Enable nfo upload @@ -111,52 +77,6 @@ public static function inputRules(): array ]; } - // Add Quality Valid - foreach (app()->site->getQualityTableList() as $quality => $title) { - $quality_id_list = [0]; - // IF enabled this quality field , then load it value list from setting - // Else we just allow the default value 0 to prevent cheating - if (config('torrent_upload.enable_quality_' . $quality)) { - foreach (app()->site->ruleQuality($quality) as $cat) { - $quality_id_list[] = $cat['id']; - } - } - - $rules[$quality] = [ - ['Integer'], - ['InList', ['list' => $quality_id_list]] - ]; - } - - // Add Team id Valid - $team_id_list = [0]; - if (config('torrent_upload.enable_teams')) { - foreach (app()->site->ruleTeam() as $team) { - if (app()->auth->getCurUser()->getClass() >= $team['class_require']) { - $team_id_list[] = $team['id']; - } - } - } - - $rules['team'] = [ - ['Integer'], - ['InList', ['list' => $team_id_list]] - ]; - - // Add Flag Valid - // Notice: we don't valid if user have privilege to use this value, - // Un privilege flag will be rewrite in rewriteFlags() when call flush() - if (config('torrent_upload.enable_anonymous')) { - $rules['uplver'] = [ - ['InList', ['list' => [0, 1]]] - ]; - } - if (config('torrent_upload.enable_hr')) { - $rules['hr'] = [ - ['InList', ['list' => [0, 1]]] - ]; - } - return $rules; } @@ -315,7 +235,7 @@ public function flush() 'category' => $this->category, 'filename' => $this->file->getBaseName(), 'torrent_name' => $this->torrent_name, 'type' => $this->torrent_type, 'size' => $this->torrent_size, - 'structure' => $this->torrent_structure, 'tags' => $this->getTags(), // JSON + 'structure' => $this->torrent_structure, 'tags' => $tags, // JSON 'audio' => (int)$this->audio, 'codec' => (int)$this->codec, 'medium' => (int)$this->medium, 'resolution' => (int)$this->resolution, 'team' => $this->team, @@ -351,54 +271,11 @@ public function flush() app()->site->writeLog("Torrent {$this->id} ({$this->title}) was uploaded by " . ($this->anonymous ? 'Anonymous' : app()->auth->getCurUser()->getUsername())); } - // Check and rewrite torrent flags based on site config and user's privilege of upload flags - private function rewriteFlags() - { - foreach (['anonymous', 'hr'] as $flag) { - $config = config('torrent_upload.enable_' . $flag); - if ($config == 2) { // if global config force enabled this flag - $this->$flag = 1; - } elseif ($config == 0) { // if global config disabled this flag - $this->$flag = 0; - } else { // check if user can use this flag - if (!app()->auth->getCurUser()->isPrivilege('upload_flag_' . $flag)) { - $this->$flag = 0; - } - } - } - } - // TODO update torrent status based on user class or their owned torrents count private function determineTorrentStatus() { $this->status = self::TORRENT_STATUS_CONFIRMED; } - private function getTags(): array - { - $tags_list = []; - if (config('torrent_upload.enable_tags')) { - $tags = str_replace(',', ' ', $this->tags); - $tags_list = explode(' ', $tags); - $tags_list = array_slice($tags_list, 0, 10); // Get first 10 tags - - if (!config('torrent_upload.allow_new_custom_tags')) { - $rule_pinned_tags = array_keys(app()->site->rulePinnedTags()); - $tags_list = array_intersect($rule_pinned_tags, $tags_list); - } - } - - return $tags_list; - } - - private function updateTagsTable(array $tags) - { - foreach ($tags as $tag) { - app()->pdo->createCommand('INSERT INTO tags (tag) VALUES (:tag) ON DUPLICATE KEY UPDATE `count` = `count` + 1;')->bindParams([ - 'tag' => $tag - ])->execute(); - } - } - // TODO sep to Traits private function setTorrentBuff($operator_id = 0, $beneficiary_id = 0, $buff_type = 'mod', $ratio_type = 'Normal', $upload_ratio = 1, $download_ratio = 1) { diff --git a/application/Models/Torrent.php b/application/Models/Torrent.php index 55f7592..7a0025b 100644 --- a/application/Models/Torrent.php +++ b/application/Models/Torrent.php @@ -56,6 +56,17 @@ class Torrent const TORRENT_TYPE_SINGLE = 'single'; const TORRENT_TYPE_MULTI = 'multi'; + const TORRENT_STATUSES = [ + self::TORRENT_STATUS_CONFIRMED, + self::TORRENT_STATUS_PENDING, + self::TORRENT_STATUS_BANNED, + ]; + + const TORRENT_STATUS_DELETED = 'deleted'; + const TORRENT_STATUS_BANNED = 'banned'; + const TORRENT_STATUS_PENDING = 'pending'; + const TORRENT_STATUS_CONFIRMED = 'confirmed'; + public function __construct($id = null) { $this->loadTorrentContentById($id); @@ -172,15 +183,26 @@ public function getTorrentStructure(): array return json_decode($this->torrent_structure, true); } - public function getTeam(){ + public function getTeamId() + { + return $this->team; + } + + public function getTeam() + { if ($this->team == 0) return false; return app()->site->ruleTeam()[$this->team]; } - public function getQuality($quality) + public function getQualityId(string $quality): int + { + return $this->{'quality_' . $quality} ?? 0; + } + + public function getQuality(string $quality) { - if ($this->{'quality_' . $quality} == 0) return false; - return app()->site->ruleQuality($quality)[$this->{'quality_' . $quality}]; + if ($this->getQualityId($quality) == 0) return false; + return app()->site->ruleQuality($quality)[$this->getQualityId($quality)]; } public function getDescr(): string diff --git a/framework/Component/I18n.php b/framework/Component/I18n.php index 862e602..97c94ba 100644 --- a/framework/Component/I18n.php +++ b/framework/Component/I18n.php @@ -14,18 +14,11 @@ class I18n extends Component { - /** - * Language file path - * This is the path for the language files. - * - * @var string - */ - public $fileNamespace = '\App\Lang'; - - public $cacheDir = ''; public $loader = []; public $resources = []; + public $cacheDir = ''; + /** * Allowed language * This is the set of language which is used to limit user languages. No-exist language will not accept. @@ -54,8 +47,6 @@ class I18n extends Component /* * The following properties are only available after calling init(). */ - protected $reqLangs = null; - protected $_user_lang = null; /** @var Translator */ @@ -63,7 +54,6 @@ class I18n extends Component public function onRequestBefore() { - $this->reqLangs = null; $this->_user_lang = null; parent::onRequestBefore(); } @@ -155,7 +145,7 @@ function ($res, $el) { * will be return. * * @param string $string the trans string - * @param array $args the args used for format string by using `vsprintf` + * @param array $args the args used for format string * @param string|null $domain The domain for the message or null to use the default * @param string|null $required_lang the required lang * @return string diff --git a/framework/Validators/Validator.php b/framework/Validators/Validator.php index bac178e..5514e0a 100644 --- a/framework/Validators/Validator.php +++ b/framework/Validators/Validator.php @@ -45,6 +45,10 @@ public function onConstruct() $this->_validator = new \Sirius\Validation\Validator; } + + /** + * @return array + */ public static function inputRules(): array { return []; diff --git a/framework/functions.php b/framework/functions.php index e1e87f5..0abf92e 100644 --- a/framework/functions.php +++ b/framework/functions.php @@ -29,7 +29,7 @@ function env($name = null, $default = '') } if (!function_exists('__')) { - function __($string, $avg = [], $domain = null, $lang = null) + function __(string $string, array $avg = [], $domain = null, $lang = null) { return app()->i18n->trans($string, $avg, $domain, $lang); } diff --git a/templates/auth/login.php b/templates/auth/login.php index 46411c3..3d79f75 100644 --- a/templates/auth/login.php +++ b/templates/auth/login.php @@ -20,7 +20,7 @@
-
Authenticate
+
You have 3 ? $left_attempts : "$left_attempts" ?>/ attempts left, or your IP will be banned. @@ -32,7 +32,7 @@
- +
- +
diff --git a/templates/layout/nav_anonymous.php b/templates/layout/nav_anonymous.php index 222f583..1d56adf 100644 --- a/templates/layout/nav_anonymous.php +++ b/templates/layout/nav_anonymous.php @@ -13,8 +13,8 @@
diff --git a/templates/layout/nav_user.php b/templates/layout/nav_user.php index f9d33b6..402898a 100644 --- a/templates/layout/nav_user.php +++ b/templates/layout/nav_user.php @@ -20,7 +20,7 @@
  • -
  • +
  • diff --git a/templates/torrent/edit.php b/templates/torrent/edit.php new file mode 100644 index 0000000..4434d95 --- /dev/null +++ b/templates/torrent/edit.php @@ -0,0 +1,210 @@ +getTorrent(); + +use App\Models\Torrent; ?> + +layout('layout/base') ?> + +start('title') ?>Edit Torrentend(); ?> + +start('container') ?> +

    Edit Torrent

    + + + + + + + + + + + + + + + + + + + + + + + + + + + auth->getCurUser()->isPrivilege('upload_nfo_file') + ): ?> + + + + + + + + + + + + + + + + + + + + + + + + auth->getCurUser()->isPrivilege('manage_torrents')): ?> + + + + + + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + site->getQualityTableList() as $quality => $title): ?> + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    + getUplver() ? ' checked' : '' ?>> +
    +
    +
    +
    + getHr() ? ' checked' : '' ?>> +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + +
    + +end(); ?> + +push('script'); ?> + +end();?> + diff --git a/templates/torrents/upload.php b/templates/torrent/upload.php similarity index 100% rename from templates/torrents/upload.php rename to templates/torrent/upload.php diff --git a/translations/locale-en.json b/translations/locale-en.json index 8dcb07b..864c290 100644 --- a/translations/locale-en.json +++ b/translations/locale-en.json @@ -15,6 +15,17 @@ "more": "More", "topten": "Top 10", "stats": "Stats", - "log": "Log" + "log": "Log", + "authenticate": "Authenticate", + "recruit": "Recruit" + }, + "form": { + "password": "Password", + "login": { + "username": "Username / Email address" + }, + "link_apply": { + "msg_success": "Thanks you to apply links, Our team will check it ASAP." + } } } diff --git a/translations/locale-zh_CN.json b/translations/locale-zh_CN.json index bbec467..f551c41 100644 --- a/translations/locale-zh_CN.json +++ b/translations/locale-zh_CN.json @@ -15,6 +15,17 @@ "more": "更多", "topten": "排行榜", "stats": "统计数据", - "log": "日志" + "log": "日志", + "authenticate": "登入", + "recruit": "注册" + }, + "form": { + "password": "密码", + "login": { + "username": "用户名/邮箱" + }, + "link_apply": { + "msg_success": "感谢申请友情链接,我们团队会尽快确认。" + } } }